diff options
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/item_comment.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/layout/item_post.xml | 80 | ||||
-rw-r--r-- | app/src/main/res/layout/item_post_detail.xml | 93 |
3 files changed, 148 insertions, 29 deletions
diff --git a/app/src/main/res/layout/item_comment.xml b/app/src/main/res/layout/item_comment.xml index a9489d0a..16c4dafa 100644 --- a/app/src/main/res/layout/item_comment.xml +++ b/app/src/main/res/layout/item_comment.xml @@ -92,8 +92,10 @@ android:src="@drawable/ic_arrow_downward_black_20dp" android:tint="@android:color/tab_indicator_text" app:layout_constraintStart_toEndOf="@+id/score_text_view_item_post_comment" + app:layout_constraintEnd_toStartOf="@id/more_button_item_post_comment" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" /> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintHorizontal_bias="0" /> <ImageView android:id="@+id/more_button_item_post_comment" diff --git a/app/src/main/res/layout/item_post.xml b/app/src/main/res/layout/item_post.xml index 4c536025..10a9fbdd 100644 --- a/app/src/main/res/layout/item_post.xml +++ b/app/src/main/res/layout/item_post.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <com.google.android.material.card.MaterialCardView 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:layout_marginTop="8dp" @@ -80,67 +81,94 @@ android:textSize="18sp" android:textColor="@color/primaryTextColor"/> - <RelativeLayout + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingStart="16dp" - android:paddingEnd="16dp" - android:paddingTop="16dp"> + android:padding="16dp"> <com.google.android.material.chip.Chip android:id="@+id/type_text_view_item_post" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginEnd="16dp" android:textColor="@android:color/white" - android:layout_centerVertical="true" - app:chipBackgroundColor="@color/backgroundColorPrimaryDark" /> + app:chipBackgroundColor="@color/backgroundColorPrimaryDark" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> <ImageView android:id="@+id/gilded_image_view_item_post" android:layout_width="24dp" android:layout_height="24dp" - android:layout_toEndOf="@id/type_text_view_item_post" - android:layout_centerVertical="true" - android:visibility="gone" /> + android:layout_marginStart="16dp" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@+id/type_text_view_item_post" + app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/gilded_number_text_view_item_post" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="4dp" - android:layout_marginEnd="8dp" - android:layout_toEndOf="@id/gilded_image_view_item_post" - android:visibility="gone" - android:textSize="20sp" android:textColor="@color/gold" - android:layout_centerVertical="true"/> + android:textSize="20sp" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@+id/gilded_image_view_item_post" + app:layout_constraintTop_toTopOf="parent" /> + + <ImageView + android:id="@+id/archived_image_view_item_post" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_marginStart="16dp" + android:src="@drawable/ic_archive_outline_24dp" + android:tint="@color/archivedTint" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@+id/crosspost_image_view_item_post" + app:layout_constraintTop_toTopOf="parent" /> + + <ImageView + android:id="@+id/locked_image_view_item_post" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_marginStart="16dp" + android:src="@drawable/ic_outline_lock_24px" + android:tint="@color/lockedIconTint" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/nsfw_text_view_item_post" + app:layout_constraintStart_toEndOf="@+id/archived_image_view_item_post" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintHorizontal_bias="0" /> <ImageView android:id="@+id/crosspost_image_view_item_post" android:layout_width="24dp" android:layout_height="24dp" - android:layout_marginStart="8dp" - android:layout_marginEnd="8dp" - android:layout_toEndOf="@id/gilded_number_text_view_item_post" + android:layout_marginStart="16dp" android:src="@drawable/crosspost" android:tint="@color/colorAccent" - android:layout_centerVertical="true" - android:visibility="gone"/> + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@+id/gilded_number_text_view_item_post" + app:layout_constraintTop_toTopOf="parent" /> <com.google.android.material.chip.Chip android:id="@+id/nsfw_text_view_item_post" - android:text="@string/nsfw" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentEnd="true" - android:layout_marginStart="8dp" + android:text="@string/nsfw" android:textColor="@android:color/white" android:visibility="gone" - android:layout_centerVertical="true" - app:chipBackgroundColor="@color/colorAccent"/> + app:chipBackgroundColor="@color/colorAccent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" /> - </RelativeLayout> + </androidx.constraintlayout.widget.ConstraintLayout> <LinearLayout android:id="@+id/spoiler_flair_linear_layout_item_post" diff --git a/app/src/main/res/layout/item_post_detail.xml b/app/src/main/res/layout/item_post_detail.xml index 886f169f..b1299ca5 100644 --- a/app/src/main/res/layout/item_post_detail.xml +++ b/app/src/main/res/layout/item_post_detail.xml @@ -80,7 +80,96 @@ android:layout_marginTop="16dp" android:visibility="gone" /> - <RelativeLayout + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="16dp"> + + <com.google.android.material.chip.Chip + android:id="@+id/type_text_view_item_post_detail" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@android:color/white" + app:chipBackgroundColor="@color/backgroundColorPrimaryDark" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <ImageView + android:id="@+id/gilded_image_view_item_post_detail" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_marginStart="16dp" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@+id/type_text_view_item_post_detail" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/gilded_number_text_view_item_post_detail" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="4dp" + android:textColor="@color/gold" + android:textSize="20sp" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@+id/gilded_image_view_item_post_detail" + app:layout_constraintTop_toTopOf="parent" /> + + <ImageView + android:id="@+id/archived_image_view_item_post_detail" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_marginStart="16dp" + android:src="@drawable/ic_archive_outline_24dp" + android:tint="@color/archivedTint" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@+id/crosspost_image_view_item_post_detail" + app:layout_constraintTop_toTopOf="parent" /> + + <ImageView + android:id="@+id/locked_image_view_item_post_detail" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_marginStart="16dp" + android:src="@drawable/ic_outline_lock_24px" + android:tint="@color/lockedIconTint" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/nsfw_text_view_item_post_detail" + app:layout_constraintStart_toEndOf="@+id/archived_image_view_item_post_detail" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintHorizontal_bias="0" /> + + <ImageView + android:id="@+id/crosspost_image_view_item_post_detail" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_marginStart="16dp" + android:src="@drawable/crosspost" + android:tint="@color/colorAccent" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@+id/gilded_number_text_view_item_post_detail" + app:layout_constraintTop_toTopOf="parent" /> + + <com.google.android.material.chip.Chip + android:id="@+id/nsfw_text_view_item_post_detail" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/nsfw" + android:textColor="@android:color/white" + android:visibility="gone" + app:chipBackgroundColor="@color/colorAccent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + <!--<RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingStart="16dp" @@ -140,7 +229,7 @@ android:layout_centerVertical="true" app:chipBackgroundColor="@color/colorAccent"/> - </RelativeLayout> + </RelativeLayout>--> <LinearLayout android:id="@+id/spoiler_flair_linear_layout_item_post_detail" |