Skip to content

Commit

Permalink
Move the statistics bar in the detailed view below the button bar (#4205
Browse files Browse the repository at this point in the history
)

Rationale: In the current layout, when performing multiple interactions
(e.g. fav+boost, fav+reply) on a post that hasn't been interacted with
before, the statistics bar appears and pushes the buttons down, so the
second tap goes to the statistics bar instead
  • Loading branch information
Tak authored Feb 20, 2024
1 parent 7173d5e commit 6994693
Showing 1 changed file with 42 additions and 46 deletions.
88 changes: 42 additions & 46 deletions app/src/main/res/layout/item_status_detailed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -283,50 +283,6 @@
app:layout_constraintTop_toBottomOf="@id/status_poll_description"
tools:text="21 Dec 2018 18:45" />

<View
android:id="@+id/status_info_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@id/status_meta_info"
android:layout_marginStart="14dp"
android:layout_marginTop="6dp"
android:layout_marginEnd="14dp"
android:background="?android:attr/listDivider"
android:importantForAccessibility="no"
android:paddingStart="16dp"
android:paddingEnd="16dp"
app:layout_constraintTop_toBottomOf="@id/status_meta_info" />

<TextView
android:id="@+id/status_reblogs"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:background="?attr/selectableItemBackground"
android:importantForAccessibility="no"
android:padding="4dp"
android:textSize="?attr/status_text_medium"
app:layout_constraintStart_toStartOf="@id/status_info_divider"
app:layout_constraintTop_toBottomOf="@id/status_info_divider"
tools:text="4 reblogs"
tools:visibility="visible" />

<TextView
android:id="@+id/status_favourites"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="6dp"
android:background="?attr/selectableItemBackground"
android:importantForAccessibility="no"
android:padding="4dp"
android:textSize="?attr/status_text_medium"
app:layout_constraintStart_toEndOf="@id/status_reblogs"
app:layout_constraintTop_toBottomOf="@id/status_info_divider"
app:layout_goneMarginStart="0dp"
tools:text="8 favs"
tools:visibility="visible" />

<androidx.constraintlayout.widget.Barrier
android:id="@+id/status_counters_barrier"
android:layout_width="wrap_content"
Expand All @@ -345,7 +301,7 @@
android:importantForAccessibility="no"
android:paddingStart="16dp"
android:paddingEnd="16dp"
app:layout_constraintTop_toBottomOf="@id/status_counters_barrier" />
app:layout_constraintTop_toBottomOf="@id/status_meta_info" />

<ImageButton
android:id="@+id/status_reply"
Expand All @@ -355,7 +311,6 @@
android:contentDescription="@string/action_reply"
android:importantForAccessibility="no"
android:padding="4dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/status_inset"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintStart_toStartOf="parent"
Expand Down Expand Up @@ -427,4 +382,45 @@
app:layout_constraintTop_toTopOf="@id/status_reply"
app:srcCompat="@drawable/ic_more_horiz_24dp" />

<View
android:id="@+id/status_info_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@id/status_meta_info"
android:layout_marginStart="14dp"
android:layout_marginEnd="14dp"
android:background="?android:attr/listDivider"
android:importantForAccessibility="no"
android:paddingStart="16dp"
android:paddingEnd="16dp"
app:layout_constraintTop_toBottomOf="@id/status_reply" />

<TextView
android:id="@+id/status_reblogs"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:importantForAccessibility="no"
android:padding="4dp"
android:textSize="?attr/status_text_medium"
app:layout_constraintStart_toStartOf="@id/status_info_divider"
app:layout_constraintTop_toBottomOf="@id/status_info_divider"
tools:text="4 reblogs"
tools:visibility="visible" />

<TextView
android:id="@+id/status_favourites"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:background="?attr/selectableItemBackground"
android:importantForAccessibility="no"
android:padding="4dp"
android:textSize="?attr/status_text_medium"
app:layout_constraintStart_toEndOf="@id/status_reblogs"
app:layout_constraintTop_toBottomOf="@id/status_info_divider"
app:layout_goneMarginStart="0dp"
tools:text="8 favs"
tools:visibility="visible" />

</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit 6994693

Please sign in to comment.