summaryrefslogtreecommitdiffstats
path: root/app/src/main/res/layout/drawer_status.xml
diff options
context:
space:
mode:
authorThomas <tschneider.ac@gmail.com>2022-05-30 14:51:50 +0200
committerThomas <tschneider.ac@gmail.com>2022-05-30 14:51:50 +0200
commite39fc38a5162176c9f77242d9eaf0719c9b6c500 (patch)
tree1de68a76252c7b013ba308233e9d99af4151e8da /app/src/main/res/layout/drawer_status.xml
parentbcc05074b1f62bdc388bc5a6bedf4264e89df6ed (diff)
Change layout for statuses - Use a similar view as the old app.
Diffstat (limited to 'app/src/main/res/layout/drawer_status.xml')
-rw-r--r--app/src/main/res/layout/drawer_status.xml188
1 files changed, 123 insertions, 65 deletions
diff --git a/app/src/main/res/layout/drawer_status.xml b/app/src/main/res/layout/drawer_status.xml
index 65a127ccc..22b4d1118 100644
--- a/app/src/main/res/layout/drawer_status.xml
+++ b/app/src/main/res/layout/drawer_status.xml
@@ -30,71 +30,122 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="6dp"
+ android:id="@+id/main_container"
android:clipChildren="false"
android:clipToPadding="false"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
+ android:id="@+id/status_booster_info"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:padding="6dp">
+
+ <androidx.appcompat.widget.AppCompatImageView
+ android:id="@+id/status_boost_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:src="@drawable/ic_repeat" />
+
+ <androidx.appcompat.widget.AppCompatImageView
+ android:id="@+id/status_booster_avatar"
+ android:layout_width="20dp"
+ android:layout_height="20dp"
+ android:scaleType="centerInside"
+ android:src="@drawable/ic_person"
+ tools:src="@tools:sample/avatars" />
+
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/status_booster_display_name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="6dp"
+ android:ellipsize="end"
+ android:maxLines="1"
+ tools:text="@tools:sample/full_names" />
+
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/status_booster_username"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="6dp"
+ android:layout_weight="1"
+ android:ellipsize="end"
+ android:maxLines="1"
+ tools:text="@tools:sample/full_names" />
+ </androidx.appcompat.widget.LinearLayoutCompat>
+
+ <com.google.android.material.divider.MaterialDivider
+ android:id="@+id/booster_divider"
+ android:layout_width="match_parent"
+ android:layout_height="1dp" />
+
+ <androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/header_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/status_user_info"
- android:layout_width="0dp"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="6dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/avatar"
- android:layout_width="20dp"
- android:layout_height="20dp"
+ android:layout_width="36dp"
+ android:layout_height="36dp"
android:scaleType="centerInside"
- tools:src="@drawable/ic_person" />
+ tools:src="@tools:sample/avatars" />
- <androidx.appcompat.widget.AppCompatTextView
- android:id="@+id/display_name"
- android:layout_width="wrap_content"
+ <androidx.appcompat.widget.LinearLayoutCompat
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginStart="6dp"
- android:ellipsize="end"
- android:maxLines="1"
- tools:text="Display Name" />
+ android:orientation="vertical">
- <androidx.appcompat.widget.AppCompatTextView
- android:id="@+id/username"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="6dp"
- android:alpha="0.7"
- android:ellipsize="end"
- android:maxLines="1"
- tools:text="\@username\@instance.test" />
- </androidx.appcompat.widget.LinearLayoutCompat>
+ <androidx.appcompat.widget.LinearLayoutCompat
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="horizontal">
- <androidx.appcompat.widget.LinearLayoutCompat
- android:id="@+id/status_booster_info"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:padding="6dp">
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/display_name"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="6dp"
+ android:layout_weight="1"
+ android:ellipsize="end"
+ android:maxLines="1"
+ tools:text="@tools:sample/full_names" />
- <androidx.appcompat.widget.AppCompatImageView
- android:id="@+id/status_boost_icon"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:scaleType="centerInside"
- android:src="@drawable/ic_repeat" />
+ <TextView
+ android:id="@+id/date_short"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:layout_marginEnd="10dp" />
- <androidx.appcompat.widget.AppCompatImageView
- android:id="@+id/status_booster_avatar"
- android:layout_width="20dp"
- android:layout_height="20dp"
- android:scaleType="centerInside"
- android:src="@drawable/ic_person" />
- </androidx.appcompat.widget.LinearLayoutCompat>
+ </androidx.appcompat.widget.LinearLayoutCompat>
+
+
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/username"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="6dp"
+ android:alpha="0.7"
+ android:ellipsize="end"
+ android:maxLines="1"
+ tools:text="\@username\@instance.test" />
+ </androidx.appcompat.widget.LinearLayoutCompat>
+
+ </androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/status_pinned"
@@ -107,12 +158,12 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/type_of_notification"
+ android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical|end"
android:layout_marginStart="6dp"
android:layout_marginEnd="6dp"
android:tint="@color/cyanea_accent_reference"
- android:layout_width="20dp"
android:visibility="gone" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -125,27 +176,29 @@
android:id="@+id/spoiler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginHorizontal="6dp"
+ android:layout_marginStart="48dp"
android:layout_marginTop="6dp"
+ android:layout_marginEnd="6dp"
tools:text="Warning: Lorem Ipsum below" />
<app.fedilab.android.helper.CustomTextView
android:id="@+id/spoiler_expand"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginHorizontal="6dp"
+ android:layout_marginStart="48dp"
android:layout_marginTop="6dp"
+ android:layout_marginEnd="6dp"
+ android:text="@string/show_content"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
- android:textColor="@color/cyanea_accent_dark_reference"
- android:text="@string/show_content" />
-
+ android:textColor="@color/cyanea_accent_dark_reference" />
<app.fedilab.android.helper.CustomTextView
android:id="@+id/status_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginHorizontal="6dp"
+ android:layout_marginStart="48dp"
android:layout_marginTop="6dp"
+ android:layout_marginEnd="6dp"
android:textIsSelectable="true"
tools:maxLines="10"
tools:text="@tools:sample/lorem/random" />
@@ -158,20 +211,22 @@
android:layout_gravity="center"
android:drawableEnd="@drawable/ic_display_more"
android:gravity="center_vertical"
- app:strokeColor="@color/cyanea_accent_dark_reference"
android:singleLine="true"
android:text="@string/display_toot_truncate"
- app:iconTint="@color/cyanea_accent_reference"
android:textAllCaps="false"
+ app:iconTint="@color/cyanea_accent_reference"
+ app:strokeColor="@color/cyanea_accent_dark_reference" />
- />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/container_trans"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_margin="5dp"
+ android:layout_marginStart="48dp"
+ android:layout_marginTop="6dp"
+ android:layout_marginEnd="6dp"
android:orientation="vertical"
android:visibility="gone">
+
<View
android:id="@+id/translation_border_view"
android:layout_width="match_parent"
@@ -218,8 +273,9 @@
android:id="@+id/card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginHorizontal="6dp"
+ android:layout_marginStart="48dp"
android:layout_marginTop="6dp"
+ android:layout_marginEnd="6dp"
android:visibility="gone"
app:cardCornerRadius="8dp"
app:cardElevation="2dp"
@@ -297,16 +353,18 @@
android:id="@+id/media_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginHorizontal="6dp"
+ android:layout_marginStart="48dp"
android:layout_marginTop="6dp"
+ android:layout_marginEnd="6dp"
android:visibility="gone" />
<HorizontalScrollView
android:id="@+id/attachments_list_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginHorizontal="6dp"
+ android:layout_marginStart="48dp"
android:layout_marginTop="6dp"
+ android:layout_marginEnd="6dp"
android:visibility="gone">
<androidx.appcompat.widget.LinearLayoutCompat
@@ -321,13 +379,20 @@
<include
android:id="@+id/poll"
- layout="@layout/layout_poll" />
+ layout="@layout/layout_poll"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="48dp"
+ android:layout_marginTop="6dp"
+ android:layout_marginEnd="6dp" />
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/status_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginStart="48dp"
android:layout_marginTop="6dp"
+ android:layout_marginEnd="6dp"
android:alpha="0.8"
android:gravity="center_vertical"
android:padding="6dp"
@@ -370,10 +435,10 @@
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatImageView
+ android:id="@+id/fav_info"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="12dp"
- android:id="@+id/fav_info"
app:srcCompat="@drawable/ic_star_outline" />
<androidx.appcompat.widget.AppCompatTextView
@@ -403,7 +468,9 @@
android:id="@+id/action_buttons"
android:layout_width="match_parent"
android:layout_height="28dp"
+ android:layout_marginStart="48dp"
android:layout_marginTop="6dp"
+ android:layout_marginEnd="6dp"
android:clipChildren="false"
android:clipToPadding="false">
@@ -472,20 +539,11 @@
android:layout_height="wrap_content"
android:layout_weight="1" />
- <TextView
- android:id="@+id/date_short"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:layout_marginEnd="10dp"
- android:visibility="gone" />
-
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/action_button_more"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="28dp"
android:layout_height="28dp"
- android:layout_marginEnd="6dp"
android:adjustViewBounds="true"
app:srcCompat="@drawable/ic_more_horiz" />
@@ -493,4 +551,4 @@
</androidx.appcompat.widget.LinearLayoutCompat>
-</com.google.android.material.card.MaterialCardView> \ No newline at end of file
+</com.google.android.material.card.MaterialCardView>