mirror of https://github.com/ThmmyNoLife/mTHMMY
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
262 lines
12 KiB
262 lines
12 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<LinearLayout 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:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:paddingEnd="4dp"
|
|
android:paddingStart="4dp"
|
|
tools:ignore="SmallSp">
|
|
|
|
<androidx.cardview.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
|
android:id="@+id/card_view"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="center"
|
|
android:foreground="?android:attr/selectableItemBackground"
|
|
card_view:cardBackgroundColor="@color/background_light"
|
|
card_view:cardCornerRadius="5dp"
|
|
card_view:cardElevation="2dp"
|
|
card_view:cardPreventCornerOverlap="false"
|
|
card_view:cardUseCompatPadding="true">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/card_child_linear"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="horizontal">
|
|
|
|
<RelativeLayout
|
|
android:id="@+id/header"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:paddingLeft="16dp"
|
|
android:paddingRight="16dp"
|
|
android:paddingTop="16dp">
|
|
|
|
<FrameLayout
|
|
android:id="@+id/thumbnail_holder"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentTop="true"
|
|
android:layout_centerVertical="true"
|
|
android:layout_marginEnd="16dp">
|
|
|
|
<ImageView
|
|
android:id="@+id/thumbnail"
|
|
android:layout_width="@dimen/thumbnail_size"
|
|
android:layout_height="@dimen/thumbnail_size"
|
|
android:layout_gravity="center"
|
|
android:adjustViewBounds="true"
|
|
android:contentDescription="@string/post_thumbnail"
|
|
android:transitionName="user_thumbnail"
|
|
app:srcCompat="@drawable/ic_default_user_avatar_darker" />
|
|
</FrameLayout>
|
|
|
|
<TextView
|
|
android:id="@+id/username"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentTop="true"
|
|
android:layout_toEndOf="@+id/thumbnail_holder"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:text="@string/post_author"
|
|
android:textColor="@color/primary_text"
|
|
android:textStyle="bold" />
|
|
|
|
<TextView
|
|
android:id="@+id/subject"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_below="@+id/username"
|
|
android:layout_toEndOf="@+id/thumbnail_holder"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:text="@string/post_subject" />
|
|
</RelativeLayout>
|
|
|
|
<ImageButton
|
|
android:id="@+id/toggle_quote_button"
|
|
android:layout_width="@dimen/post_image_button"
|
|
android:layout_height="@dimen/post_image_button"
|
|
android:layout_marginTop="9dp"
|
|
android:background="@color/background_light"
|
|
android:clickable="true"
|
|
android:contentDescription="@string/post_quote_button"
|
|
android:focusable="true"
|
|
app:srcCompat="@drawable/ic_format_quote_unchecked_24dp" />
|
|
<!--<ImageButton
|
|
android:id="@+id/post_share_button"
|
|
android:layout_width="@dimen/post_image_button"
|
|
android:layout_height="@dimen/post_image_button"
|
|
android:layout_marginEnd="9dp"
|
|
android:layout_marginTop="9dp"
|
|
android:background="@color/card_background"
|
|
android:clickable="true"
|
|
android:contentDescription="@string/post_share_button"
|
|
android:focusable="true"
|
|
android:src="@drawable/ic_share" />-->
|
|
<ImageButton
|
|
android:id="@+id/post_overflow_menu"
|
|
android:layout_width="@dimen/post_image_button"
|
|
android:layout_height="@dimen/post_image_button"
|
|
android:layout_marginTop="9dp"
|
|
android:layout_marginEnd="9dp"
|
|
android:background="@color/background_light"
|
|
android:clickable="true"
|
|
android:contentDescription="@string/post_overflow_menu_button"
|
|
android:focusable="true"
|
|
app:srcCompat="@drawable/ic_more_vert_white_24dp" />
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/user_extra_info"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:orientation="vertical"
|
|
android:paddingLeft="16dp"
|
|
android:paddingRight="16dp"
|
|
android:paddingTop="3dp"
|
|
android:visibility="gone"
|
|
android:weightSum="1.0">
|
|
|
|
<TextView
|
|
android:id="@+id/special_rank"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:textColor="@color/card_expand_text_color"
|
|
android:textSize="10sp"
|
|
android:visibility="gone" />
|
|
|
|
<TextView
|
|
android:id="@+id/rank"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:textColor="@color/card_expand_text_color"
|
|
android:textSize="10sp"
|
|
android:visibility="gone" />
|
|
|
|
<TextView
|
|
android:id="@+id/stars"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="2dp"
|
|
android:textSize="10sp"
|
|
android:visibility="gone" />
|
|
|
|
<TextView
|
|
android:id="@+id/gender"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:textColor="@color/card_expand_text_color"
|
|
android:textSize="10sp"
|
|
android:visibility="gone" />
|
|
|
|
<TextView
|
|
android:id="@+id/number_of_posts"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:textColor="@color/card_expand_text_color"
|
|
android:textSize="10sp"
|
|
android:visibility="gone" />
|
|
|
|
<TextView
|
|
android:id="@+id/personal_text"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:textColor="@color/card_expand_text_color"
|
|
android:textSize="10sp"
|
|
android:textStyle="italic"
|
|
android:visibility="gone" />
|
|
|
|
</LinearLayout>
|
|
|
|
<FrameLayout
|
|
android:id="@+id/post_date_and_number_exp"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginLeft="16dp"
|
|
android:layout_marginRight="16dp"
|
|
android:layout_marginTop="16dp">
|
|
|
|
<TextView
|
|
android:id="@+id/post_date"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="start"
|
|
android:text=""
|
|
android:textColor="@color/accent"
|
|
android:textSize="11sp" />
|
|
|
|
<TextView
|
|
android:id="@+id/post_number"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="end"
|
|
android:text=""
|
|
android:textColor="@color/accent"
|
|
android:textSize="11sp" />
|
|
</FrameLayout>
|
|
|
|
|
|
<View
|
|
android:id="@+id/header_body_divider"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:layout_marginBottom="9dp"
|
|
android:layout_marginLeft="16dp"
|
|
android:layout_marginRight="16dp"
|
|
android:layout_marginTop="5dp"
|
|
android:background="@color/divider" />
|
|
|
|
<FrameLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_marginBottom="16dp"
|
|
android:descendantFocusability="blocksDescendants">
|
|
|
|
<gr.thmmy.mthmmy.views.ReactiveWebView
|
|
android:id="@+id/post"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_marginLeft="16dp"
|
|
android:layout_marginRight="16dp"
|
|
android:background="@color/background_light"
|
|
android:text="@string/post" />
|
|
</FrameLayout>
|
|
|
|
<View
|
|
android:id="@+id/body_footer_divider"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:layout_marginBottom="5dp"
|
|
android:layout_marginLeft="16dp"
|
|
android:layout_marginRight="16dp"
|
|
android:layout_marginTop="9dp"
|
|
android:background="@color/divider"
|
|
android:visibility="gone" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/post_footer"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:paddingBottom="9dp"
|
|
android:paddingLeft="16dp"
|
|
android:paddingRight="16dp" />
|
|
</LinearLayout>
|
|
</androidx.cardview.widget.CardView>
|
|
</LinearLayout>
|