mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 21:39:50 +02:00
Display an archived icon if the post is archived. Display a locked icon if the post is locked.
This commit is contained in:
9
app/src/main/res/drawable/ic_archive_outline_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_archive_outline_24dp.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M20.54,5.23l-1.39,-1.68C18.88,3.21 18.47,3 18,3L6,3c-0.47,0 -0.88,0.21 -1.16,0.55L3.46,5.23C3.17,5.57 3,6.02 3,6.5L3,19c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,6.5c0,-0.48 -0.17,-0.93 -0.46,-1.27zM6.24,5h11.52l0.81,0.97L5.44,5.97l0.8,-0.97zM5,19L5,8h14v11L5,19zM13.45,10h-2.9v3L8,13l4,4 4,-4h-2.55z"/>
|
||||
</vector>
|
@@ -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"
|
||||
|
@@ -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"
|
||||
|
@@ -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"
|
||||
|
@@ -51,4 +51,8 @@
|
||||
<color name="singleCommentThreadBackgroundColor">#B3E5F9</color>
|
||||
|
||||
<color name="unreadMessageBackgroundColor">#B3E5F9</color>
|
||||
|
||||
<color name="archivedTint">#B4009F</color>
|
||||
|
||||
<color name="lockedIconTint">#EE7302</color>
|
||||
</resources>
|
||||
|
Reference in New Issue
Block a user