Skip to content

Commit

Permalink
Show info: use horizontal buttons for secondary actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
UweTrottmann committed Nov 17, 2023
1 parent ece3c9e commit a6e6f2e
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 80 deletions.
96 changes: 56 additions & 40 deletions app/src/main/res/layout/fragment_show_narrow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,48 +162,64 @@

</com.google.android.material.card.MaterialCardView>

<Button
android:id="@+id/buttonShowTrailer"
style="@style/Widget.SeriesGuide.Button.Borderless.Sheet"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayoutShowButtons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/trailer"
app:icon="@drawable/ic_movie_white_24dp"
app:iconGravity="start" />

<Button
android:id="@+id/buttonShowSimilar"
style="@style/Widget.SeriesGuide.Button.Borderless.Sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/title_similar_shows"
app:icon="@drawable/ic_search_white_24dp"
app:iconGravity="start" />

<Button
android:id="@+id/buttonShowShare"
style="@style/Widget.SeriesGuide.Button.Borderless.Sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/share_show"
app:icon="@drawable/ic_share_white_24dp"
app:iconGravity="start" />

<Button
android:id="@+id/buttonShowComments"
style="@style/Widget.SeriesGuide.Button.Borderless.Sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/comments"
app:icon="@drawable/ic_forum_black_24dp"
app:iconGravity="start" />

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="@dimen/large_padding"
android:layout_marginRight="@dimen/large_padding"
android:background="?attr/sgColorDivider" />
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp">

<androidx.constraintlayout.helper.widget.Flow
android:layout_width="0dp"
android:layout_height="wrap_content"
app:constraint_referenced_ids="buttonShowTrailer,buttonShowSimilar,buttonShowShare,buttonShowComments"
app:flow_horizontalBias="0"
app:flow_horizontalGap="4dp"
app:flow_horizontalStyle="packed"
app:flow_wrapMode="chain"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<Button
android:id="@+id/buttonShowTrailer"
style="@style/Widget.SeriesGuide.Button.Outlined.Icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/trailer"
app:icon="@drawable/ic_movie_white_24dp"
app:iconGravity="start" />

<Button
android:id="@+id/buttonShowSimilar"
style="@style/Widget.SeriesGuide.Button.Outlined.Icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title_similar_shows"
app:icon="@drawable/ic_search_white_24dp"
app:iconGravity="start" />

<Button
android:id="@+id/buttonShowShare"
style="@style/Widget.SeriesGuide.Button.Outlined.Icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/share_show"
app:icon="@drawable/ic_share_white_24dp"
app:iconGravity="start" />

<Button
android:id="@+id/buttonShowComments"
style="@style/Widget.SeriesGuide.Button.Outlined.Icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/comments"
app:icon="@drawable/ic_forum_black_24dp"
app:iconGravity="start" />

</androidx.constraintlayout.widget.ConstraintLayout>

<include
android:id="@+id/containerRatings"
Expand Down
96 changes: 56 additions & 40 deletions app/src/main/res/layout/fragment_show_regular.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,48 +155,64 @@

</com.google.android.material.card.MaterialCardView>

<Button
android:id="@+id/buttonShowTrailer"
style="@style/Widget.SeriesGuide.Button.Borderless.Sheet"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayoutShowButtons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/trailer"
app:icon="@drawable/ic_movie_white_24dp"
app:iconGravity="start" />

<Button
android:id="@+id/buttonShowSimilar"
style="@style/Widget.SeriesGuide.Button.Borderless.Sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/title_similar_shows"
app:icon="@drawable/ic_search_white_24dp"
app:iconGravity="start" />

<Button
android:id="@+id/buttonShowShare"
style="@style/Widget.SeriesGuide.Button.Borderless.Sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/share_show"
app:icon="@drawable/ic_share_white_24dp"
app:iconGravity="start" />

<Button
android:id="@+id/buttonShowComments"
style="@style/Widget.SeriesGuide.Button.Borderless.Sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/comments"
app:icon="@drawable/ic_forum_black_24dp"
app:iconGravity="start" />

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="@dimen/large_padding"
android:layout_marginRight="@dimen/large_padding"
android:background="?attr/sgColorDivider" />
android:layout_marginStart="8dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="8dp">

<androidx.constraintlayout.helper.widget.Flow
android:layout_width="0dp"
android:layout_height="wrap_content"
app:constraint_referenced_ids="buttonShowTrailer,buttonShowSimilar,buttonShowShare,buttonShowComments"
app:flow_horizontalBias="0"
app:flow_horizontalGap="4dp"
app:flow_horizontalStyle="packed"
app:flow_wrapMode="chain"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<Button
android:id="@+id/buttonShowTrailer"
style="@style/Widget.SeriesGuide.Button.Outlined.Icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/trailer"
app:icon="@drawable/ic_movie_white_24dp"
app:iconGravity="start" />

<Button
android:id="@+id/buttonShowSimilar"
style="@style/Widget.SeriesGuide.Button.Outlined.Icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title_similar_shows"
app:icon="@drawable/ic_search_white_24dp"
app:iconGravity="start" />

<Button
android:id="@+id/buttonShowShare"
style="@style/Widget.SeriesGuide.Button.Outlined.Icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/share_show"
app:icon="@drawable/ic_share_white_24dp"
app:iconGravity="start" />

<Button
android:id="@+id/buttonShowComments"
style="@style/Widget.SeriesGuide.Button.Outlined.Icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/comments"
app:icon="@drawable/ic_forum_black_24dp"
app:iconGravity="start" />

</androidx.constraintlayout.widget.ConstraintLayout>

<include
android:id="@+id/containerRatings"
Expand Down

0 comments on commit a6e6f2e

Please sign in to comment.