Files
moshidon/mastodon/src/main/res/layout/fragment_profile.xml
2023-07-02 10:50:01 +03:00

341 lines
12 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<me.grishka.appkit.views.RecursiveSwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<org.joinmastodon.android.ui.views.NestedRecyclerScrollView
android:id="@+id/scroller"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:nestedScrollingEnabled="true">
<org.joinmastodon.android.ui.views.CustomDrawingOrderLinearLayout
android:id="@+id/scrollable_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<org.joinmastodon.android.ui.views.CoverImageView
android:id="@+id/cover"
android:layout_width="match_parent"
android:layout_height="144dp"
android:background="#808080"
android:contentDescription="@string/profile_header"
android:scaleType="centerCrop" />
<TextView
android:id="@+id/follows_you"
android:layout_width="wrap_content"
android:layout_height="28dp"
android:layout_alignEnd="@id/cover"
android:layout_alignBottom="@id/cover"
android:layout_margin="16dp"
android:background="@drawable/bg_profile_follows_you"
android:fontFamily="sans-serif-medium"
android:gravity="center"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:text="@string/follows_you"
android:textAllCaps="true"
android:textColor="#fff"
android:textSize="14dp"
android:visibility="gone"
tools:visibility="visible" />
<FrameLayout
android:id="@+id/avatar_border"
android:layout_width="104dp"
android:layout_height="104dp"
android:layout_below="@id/cover"
android:layout_alignParentStart="true"
android:layout_marginStart="12dp"
android:layout_marginTop="-44dp"
android:background="@drawable/profile_ava_bg"
android:outlineProvider="@null">
<ImageView
android:id="@+id/avatar"
android:layout_width="96dp"
android:layout_height="96dp"
android:layout_gravity="center"
android:contentDescription="@string/profile_picture"
android:scaleType="centerCrop"
tools:src="#0f0" />
</FrameLayout>
<FrameLayout
android:id="@+id/profile_action_btn_wrap"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/cover"
android:layout_alignParentEnd="true"
android:layout_marginTop="16dp"
android:layout_marginHorizontal="16dp"
android:paddingStart="120dp">
<org.joinmastodon.android.ui.views.ProgressBarButton
android:id="@+id/profile_action_btn"
android:layout_width="wrap_content"
android:layout_height="40dp"
style="@style/Widget.Mastodon.M3.Button.Filled"
android:minWidth="156dp"
android:paddingHorizontal="16dp"
tools:text="@string/save_changes" />
<ProgressBar
android:id="@+id/action_progress"
style="?android:progressBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:elevation="10dp"
android:indeterminate="true"
android:outlineProvider="none"
android:visibility="gone" />
</FrameLayout>
</RelativeLayout>
<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="12dp"
android:layout_marginRight="16dp"
android:fontFamily="sans-serif"
android:textAlignment="viewStart"
android:textAppearance="@style/m3_title_large"
android:textColor="?colorM3OnSurface"
tools:text="Eugen" />
<TextView
android:id="@+id/username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="2dp"
android:layout_marginRight="16dp"
android:textAppearance="@style/m3_title_small"
android:textColor="?colorM3OnSurfaceVariant"
tools:text="\@Gargron" />
<org.joinmastodon.android.ui.views.LinkedTextView
android:id="@+id/bio"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="8dp"
android:layout_marginRight="16dp"
android:textAppearance="@style/m3_body_medium"
android:textColor="?colorM3OnSurface"
android:textSize="16sp"
tools:text="Founder, CEO and lead developer @Mastodon, Germany." />
<LinearLayout
android:id="@+id/profile_counters"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginTop="4dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="4dp">
<LinearLayout
android:id="@+id/followers_btn"
android:layout_width="wrap_content"
android:layout_height="28dp"
android:background="@drawable/bg_button_borderless_rounded"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingLeft="8dp"
android:paddingTop="4dp"
android:paddingRight="8dp"
android:paddingBottom="4dp">
<TextView
android:id="@+id/followers_count"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="4dp"
android:ellipsize="end"
android:fontFamily="sans-serif-black"
android:gravity="center_vertical"
android:singleLine="true"
android:textColor="?colorM3OnSurfaceVariant"
android:textSize="14dp"
tools:text="123" />
<TextView
android:id="@+id/followers_label"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="middle"
android:gravity="center_vertical"
android:singleLine="true"
android:textAppearance="@style/m3_label_large"
android:textColor="?colorM3OnSurfaceVariant"
tools:text="followers" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="28dp"
android:gravity="center"
android:text="·"
android:textAppearance="@style/m3_label_large"
android:textColor="?colorM3OnSurfaceVariant" />
<LinearLayout
android:id="@+id/following_btn"
android:layout_width="wrap_content"
android:layout_height="28dp"
android:background="@drawable/bg_button_borderless_rounded"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingLeft="8dp"
android:paddingTop="4dp"
android:paddingRight="8dp"
android:paddingBottom="4dp">
<TextView
android:id="@+id/following_count"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="4dp"
android:ellipsize="end"
android:fontFamily="sans-serif-black"
android:gravity="center_vertical"
android:singleLine="true"
android:textColor="?colorM3OnSurfaceVariant"
android:textSize="14dp"
tools:text="123" />
<TextView
android:id="@+id/following_label"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="middle"
android:gravity="center_vertical"
android:singleLine="true"
android:textAppearance="@style/m3_label_large"
android:textColor="?colorM3OnSurfaceVariant"
tools:text="following" />
</LinearLayout>
</LinearLayout>
<org.joinmastodon.android.ui.views.FloatingHintEditTextLayout
android:id="@+id/name_edit_wrap"
android:layout_width="match_parent"
android:layout_height="80dp"
android:foreground="@drawable/bg_m3_outlined_text_field"
android:paddingTop="4dp"
android:visibility="gone"
app:labelTextColor="@color/m3_outlined_text_field_label">
<EditText
android:id="@+id/name_edit"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:background="@null"
android:elevation="0dp"
android:hint="@string/display_name"
android:inputType="textPersonName|textCapWords"
android:padding="16dp"
tools:text="Eugen" />
</org.joinmastodon.android.ui.views.FloatingHintEditTextLayout>
<org.joinmastodon.android.ui.views.FloatingHintEditTextLayout
android:id="@+id/bio_edit_wrap"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-8dp"
android:layout_marginBottom="-4dp"
android:paddingBottom="12dp"
android:foreground="@drawable/bg_m3_outlined_text_field"
android:paddingTop="4dp"
android:visibility="gone"
app:labelTextColor="@color/m3_outlined_text_field_label">
<EditText
android:id="@+id/bio_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:background="@null"
android:elevation="0dp"
android:hint="@string/profile_bio"
android:inputType="textMultiLine|textCapSentences"
android:padding="16dp"
tools:text="Founder, CEO and lead developer @Mastodon, Germany." />
</org.joinmastodon.android.ui.views.FloatingHintEditTextLayout>
<org.joinmastodon.android.ui.tabs.TabLayout
android:id="@+id/tabbar"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/bg_onboarding_panel"
app:tabGravity="fill"
app:tabIndicator="@drawable/tab_indicator_m3"
app:tabIndicatorAnimationMode="elastic"
app:tabIndicatorColor="?colorM3Primary"
app:tabIndicatorFullWidth="false"
app:tabMinWidth="0dp"
app:tabMode="fixed" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<View
android:id="@+id/tabs_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?colorM3SurfaceVariant"/>
</FrameLayout>
</org.joinmastodon.android.ui.views.CustomDrawingOrderLinearLayout>
</org.joinmastodon.android.ui.views.NestedRecyclerScrollView>
<ImageButton
android:id="@+id/fab"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_gravity="end|bottom"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:background="@drawable/bg_fab"
android:contentDescription="@string/new_post"
android:scaleType="center"
android:src="@drawable/ic_edit_24px"
android:stateListAnimator="@animator/fab_shadow"
android:tint="?colorM3Primary" />
</FrameLayout>
</me.grishka.appkit.views.RecursiveSwipeRefreshLayout>