TiebaLite/app/src/main/res/layout/fragment_my_info.xml

385 lines
21 KiB
XML
Raw Normal View History

2020-04-05 13:15:03 +08:00
<?xml version="1.0" encoding="utf-8"?>
2020-09-19 21:38:41 +08:00
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
2020-04-05 13:15:03 +08:00
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".fragments.MyInfoFragment">
2020-09-19 21:38:41 +08:00
<com.huanchengfly.tieba.post.widgets.theme.TintSwipeRefreshLayout
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:id="@+id/my_refresh"
2020-04-05 13:15:03 +08:00
android:layout_width="match_parent"
android:layout_height="match_parent">
2020-09-19 21:38:41 +08:00
<androidx.core.widget.NestedScrollView
2020-04-05 13:15:03 +08:00
android:layout_width="match_parent"
android:layout_height="match_parent">
2020-09-19 21:38:41 +08:00
<LinearLayout
android:orientation="vertical"
2020-04-05 13:15:03 +08:00
android:layout_width="match_parent"
android:layout_height="match_parent">
2020-09-19 21:38:41 +08:00
<com.huanchengfly.tieba.post.widgets.theme.TintLinearLayout
android:background="@drawable/bg_radius_10dp"
app:backgroundTint="@color/default_color_card"
2020-04-05 13:15:03 +08:00
android:layout_width="match_parent"
2020-09-19 21:38:41 +08:00
android:layout_height="wrap_content"
android:layout_margin="@dimen/card_margin"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:orientation="vertical">
2020-04-05 13:15:03 +08:00
2020-09-19 21:38:41 +08:00
<com.huanchengfly.tieba.post.widgets.theme.TintRelativeLayout
android:background="?selectableItemBackground"
2020-04-05 13:15:03 +08:00
android:id="@+id/my_info"
2020-09-19 21:38:41 +08:00
android:padding="16dp"
2020-04-05 13:15:03 +08:00
android:layout_width="match_parent"
2020-09-19 21:38:41 +08:00
android:layout_height="wrap_content">
2020-04-05 13:15:03 +08:00
<ImageView
android:id="@+id/my_info_avatar"
2020-09-19 21:38:41 +08:00
android:layout_width="48dp"
android:layout_height="48dp"
2020-04-05 13:15:03 +08:00
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:contentDescription="@string/content_avatar"
android:scaleType="centerInside"
tools:srcCompat="@tools:sample/avatars" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
2020-09-19 21:38:41 +08:00
android:layout_toStartOf="@id/my_info_edit_btn"
2020-04-05 13:15:03 +08:00
android:layout_toEndOf="@id/my_info_avatar">
2020-08-15 22:05:07 +08:00
<com.huanchengfly.tieba.post.widgets.theme.TintTextView
2020-04-05 13:15:03 +08:00
android:id="@+id/my_info_username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2020-09-19 21:38:41 +08:00
app:tint="@color/default_color_text"
android:textSize="20sp"
2020-04-05 13:15:03 +08:00
android:textStyle="bold" />
2020-08-15 22:05:07 +08:00
<com.huanchengfly.tieba.post.widgets.theme.TintTextView
2020-04-05 13:15:03 +08:00
android:layout_marginTop="4dp"
android:id="@+id/my_info_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/my_info_username"
2020-09-19 21:38:41 +08:00
app:tint="@color/default_color_text_secondary"
2020-04-05 13:15:03 +08:00
android:textSize="14sp" />
</RelativeLayout>
2020-09-19 21:38:41 +08:00
<com.huanchengfly.tieba.post.widgets.theme.TintMaterialButton
style="@style/Widget.Button.Dense"
android:text="@string/button_edit"
android:id="@+id/my_info_edit_btn"
2020-04-05 13:15:03 +08:00
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
2020-09-19 21:38:41 +08:00
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
2020-04-05 13:15:03 +08:00
2020-09-19 21:38:41 +08:00
</com.huanchengfly.tieba.post.widgets.theme.TintRelativeLayout>
2020-04-05 13:15:03 +08:00
<androidx.gridlayout.widget.GridLayout
android:id="@+id/my_info_grid"
android:layout_width="match_parent"
android:layout_height="@dimen/my_info_total_height"
app:columnCount="4"
2020-09-19 21:38:41 +08:00
android:layout_marginTop="8dp"
2020-04-05 13:15:03 +08:00
app:orientation="vertical"
app:rowCount="1">
2020-08-15 22:05:07 +08:00
<com.huanchengfly.tieba.post.widgets.theme.TintSuperTextView
2020-04-05 13:15:03 +08:00
android:id="@+id/my_info_grid_follows"
android:layout_width="0dp"
android:layout_height="match_parent"
app:layout_column="0"
app:layout_columnSpan="1"
app:layout_columnWeight="1"
app:centerBottomTextColor="@color/default_color_text_secondary"
app:centerTextColor="@color/default_color_text"
app:sCenterBottomTextSize="14sp"
app:sCenterBottomTextString="关注"
app:sCenterTextSize="21sp"
app:sDividerLineType="none"
app:sBackgroundDrawableRes="?attr/selectableItemBackground"
tools:sCenterTextString="999" />
2020-08-15 22:05:07 +08:00
<com.huanchengfly.tieba.post.widgets.theme.TintSuperTextView
2020-04-05 13:15:03 +08:00
android:id="@+id/my_info_grid_fans"
android:layout_width="0dp"
android:layout_height="match_parent"
app:layout_column="0"
app:layout_columnSpan="1"
app:layout_columnWeight="1"
app:centerBottomTextColor="@color/default_color_text_secondary"
app:centerTextColor="@color/default_color_text"
app:sCenterBottomTextSize="14sp"
app:sCenterBottomTextString="粉丝"
app:sCenterTextSize="21sp"
app:sDividerLineType="none"
app:sBackgroundDrawableRes="?attr/selectableItemBackground"
tools:sCenterTextString="999" />
2020-08-15 22:05:07 +08:00
<com.huanchengfly.tieba.post.widgets.theme.TintSuperTextView
2020-04-05 13:15:03 +08:00
android:id="@+id/my_info_grid_forums"
android:layout_width="0dp"
android:layout_height="match_parent"
app:layout_column="0"
app:layout_columnSpan="1"
app:layout_columnWeight="1"
app:centerBottomTextColor="@color/default_color_text_secondary"
app:centerTextColor="@color/default_color_text"
app:sCenterBottomTextSize="14sp"
app:sCenterBottomTextString="关注的吧"
app:sCenterTextSize="21sp"
app:sDividerLineType="none"
app:sBackgroundDrawableRes="?attr/selectableItemBackground"
tools:sCenterTextString="999" />
2020-08-15 22:05:07 +08:00
<com.huanchengfly.tieba.post.widgets.theme.TintSuperTextView
2020-04-05 13:15:03 +08:00
android:id="@+id/my_info_grid_threads"
android:layout_width="0dp"
android:layout_height="match_parent"
app:layout_column="0"
app:layout_columnSpan="1"
app:layout_columnWeight="1"
app:centerBottomTextColor="@color/default_color_text_secondary"
app:centerTextColor="@color/default_color_text"
app:sCenterBottomTextSize="14sp"
app:sCenterBottomTextString="贴子"
app:sCenterTextSize="21sp"
app:sDividerLineType="none"
app:sBackgroundDrawableRes="?attr/selectableItemBackground"
tools:sCenterTextString="999" />
</androidx.gridlayout.widget.GridLayout>
2020-09-19 21:38:41 +08:00
</com.huanchengfly.tieba.post.widgets.theme.TintLinearLayout>
<LinearLayout
2020-09-19 21:38:41 +08:00
android:layout_marginStart="@dimen/card_margin"
android:layout_marginEnd="@dimen/card_margin"
android:layout_marginBottom="@dimen/card_margin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.huanchengfly.tieba.post.widgets.theme.TintLinearLayout
2020-09-19 21:38:41 +08:00
android:id="@+id/my_info_collect"
android:background="@drawable/bg_top_radius_10dp_ripple"
app:backgroundTint="@color/default_color_card"
2020-09-19 21:38:41 +08:00
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:orientation="horizontal"
2020-04-05 13:15:03 +08:00
android:layout_width="match_parent"
2020-09-19 21:38:41 +08:00
android:layout_height="wrap_content">
<ImageView
android:layout_gravity="center_vertical"
android:src="@drawable/ic_round_star_yellow"
android:layout_marginEnd="16dp"
android:layout_width="24dp"
android:layout_height="24dp" />
<com.huanchengfly.tieba.post.widgets.theme.TintTextView
android:text="@string/my_info_collect"
android:textStyle="bold"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</com.huanchengfly.tieba.post.widgets.theme.TintLinearLayout>
2020-09-19 21:38:41 +08:00
<com.huanchengfly.tieba.post.widgets.theme.TintLinearLayout
2020-09-19 21:38:41 +08:00
android:id="@+id/my_info_history"
app:backgroundTint="@color/default_color_divider"
android:background="@drawable/bg_ripple"
2020-09-19 21:38:41 +08:00
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_gravity="center_vertical"
android:src="@drawable/ic_round_watch_later_blue"
android:layout_marginEnd="16dp"
android:layout_width="24dp"
android:layout_height="24dp" />
<com.huanchengfly.tieba.post.widgets.theme.TintTextView
android:text="@string/my_info_history"
android:textStyle="bold"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</com.huanchengfly.tieba.post.widgets.theme.TintLinearLayout>
2020-09-19 21:38:41 +08:00
<com.huanchengfly.tieba.post.widgets.theme.TintLinearLayout
2020-09-19 21:38:41 +08:00
android:id="@+id/my_info_theme"
android:background="@drawable/bg_ripple"
app:backgroundTint="@color/default_color_card"
2020-09-19 21:38:41 +08:00
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_gravity="center_vertical"
android:src="@drawable/ic_round_format_paint_red"
android:layout_marginEnd="16dp"
android:layout_width="24dp"
android:layout_height="24dp" />
<com.huanchengfly.tieba.post.widgets.theme.TintTextView
android:text="@string/my_info_theme"
android:textStyle="bold"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<View
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<RelativeLayout
android:layout_gravity="center_vertical|end"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<com.huanchengfly.tieba.post.widgets.theme.TintTextView
android:textStyle="bold"
app:tint="@color/default_color_text_secondary"
android:layout_marginEnd="8dp"
android:id="@+id/my_info_night_tv"
android:text="@string/my_info_night"
android:gravity="center"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<com.huanchengfly.tieba.post.widgets.theme.TintSwitch
app:track="@drawable/switch_ios_track"
android:thumb="@drawable/switch_ios_thumb"
style="@style/Widget.Switch"
app:trackTintList="@color/selector_switch_track"
app:thumbTint="@color/white"
android:minHeight="0dp"
app:switchBackgroundTint="@color/transparent"
android:id="@+id/my_info_night_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/my_info_night_tv" />
</RelativeLayout>
</com.huanchengfly.tieba.post.widgets.theme.TintLinearLayout>
2020-09-19 21:38:41 +08:00
<com.huanchengfly.tieba.post.widgets.theme.TintLinearLayout
2020-09-19 21:38:41 +08:00
android:id="@+id/my_info_service_center"
android:background="@drawable/bg_bottom_radius_10dp_ripple"
app:backgroundTint="@color/default_color_divider"
2020-09-19 21:38:41 +08:00
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_gravity="center_vertical"
android:src="@drawable/ic_round_help_green"
android:layout_marginEnd="16dp"
android:layout_width="24dp"
android:layout_height="24dp" />
<com.huanchengfly.tieba.post.widgets.theme.TintTextView
android:text="@string/my_info_service_center"
android:textStyle="bold"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</com.huanchengfly.tieba.post.widgets.theme.TintLinearLayout>
</LinearLayout>
2020-09-19 21:38:41 +08:00
<LinearLayout
2020-09-19 21:38:41 +08:00
android:layout_marginStart="@dimen/card_margin"
android:layout_marginEnd="@dimen/card_margin"
android:layout_marginBottom="@dimen/card_margin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.huanchengfly.tieba.post.widgets.theme.TintLinearLayout
2020-09-19 21:38:41 +08:00
android:id="@+id/my_info_settings"
android:background="@drawable/bg_top_radius_10dp_ripple"
app:backgroundTint="@color/default_color_card"
2020-09-19 21:38:41 +08:00
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_gravity="center_vertical"
android:src="@drawable/ic_round_settings_grey"
android:layout_marginEnd="16dp"
android:layout_width="24dp"
android:layout_height="24dp" />
<com.huanchengfly.tieba.post.widgets.theme.TintTextView
android:text="@string/my_info_settings"
android:textStyle="bold"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</com.huanchengfly.tieba.post.widgets.theme.TintLinearLayout>
2020-09-19 21:38:41 +08:00
<com.huanchengfly.tieba.post.widgets.theme.TintLinearLayout
2020-09-19 21:38:41 +08:00
android:id="@+id/my_info_about"
app:backgroundTint="@color/default_color_divider"
android:background="@drawable/bg_bottom_radius_10dp_ripple"
2020-09-19 21:38:41 +08:00
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
2020-09-19 21:41:55 +08:00
<androidx.appcompat.widget.AppCompatImageView
2020-09-19 21:38:41 +08:00
android:layout_gravity="center_vertical"
2020-09-19 21:41:55 +08:00
app:srcCompat="@drawable/ic_round_info"
app:tint="#3CA7F1"
2020-09-19 21:38:41 +08:00
android:layout_marginEnd="16dp"
android:layout_width="24dp"
android:layout_height="24dp" />
<com.huanchengfly.tieba.post.widgets.theme.TintTextView
android:text="@string/my_info_about"
android:textStyle="bold"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</com.huanchengfly.tieba.post.widgets.theme.TintLinearLayout>
</LinearLayout>
2020-09-19 21:38:41 +08:00
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</com.huanchengfly.tieba.post.widgets.theme.TintSwipeRefreshLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>