Skip to content

Commit

Permalink
Shows discover: revert floating button to search icon and description
Browse files Browse the repository at this point in the history
  • Loading branch information
UweTrottmann committed Dec 5, 2024
1 parent 9803268 commit 3bc807e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Releases marked with 🧪 (or previously with the "beta" suffix) were released o

## Version 2024.5

### Unreleased

* 🔧 Shows: revert to search symbol for primary button on discover screen.

### 2024.5.2 - 2024-12-04 🧪

* 🔧 Shows: when viewing the stream or purchase provider filters, the reset button is shown as
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void testAddShowAndSetWatchedThenReturn() {

// Open discover screen
ViewInteraction floatingActionButton = onView(
allOf(withId(R.id.buttonShowsAdd), isDisplayed()));
allOf(withId(R.id.buttonShowsFloating), isDisplayed()));
floatingActionButton.perform(click());

// Added a sleep statement to match the app's execution delay.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ open class ShowsActivityImpl : BaseTopActivity() {
}

private fun setupViews() {
// setup floating action button for adding shows
val buttonAddShow = findViewById<FloatingActionButton>(R.id.buttonShowsAdd)
buttonAddShow.setOnClickListener {
// setup floating action button
val floatingActionButton = findViewById<FloatingActionButton>(R.id.buttonShowsFloating)
floatingActionButton.setOnClickListener {
startActivity(ShowsDiscoverPagingActivity.intentSearch(this))
}

Expand All @@ -204,7 +204,7 @@ open class ShowsActivityImpl : BaseTopActivity() {
tabs.setOnPageChangeListener(
ShowsPageChangeListener(
findViewById(R.id.sgAppBarLayout),
buttonAddShow,
floatingActionButton,
viewModel
)
)
Expand Down Expand Up @@ -357,7 +357,6 @@ open class ShowsActivityImpl : BaseTopActivity() {
}
appBarLayout.liftOnScrollTargetViewId = liftOnScrollTarget

// only display add show button on Shows tab
if (position == Tab.DISCOVER.index) {
floatingActionButton.show()
} else {
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/activity_shows.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
app:layout_behavior="@string/appbar_scrolling_view_behavior" />

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/buttonShowsAdd"
android:id="@+id/buttonShowsFloating"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginStart="0dp"
android:layout_marginTop="0dp"
android:layout_marginEnd="@dimen/fab_margin"
android:layout_marginBottom="@dimen/fab_margin"
android:contentDescription="@string/action_shows_add"
app:srcCompat="@drawable/ic_add_white_24dp" />
android:contentDescription="@string/search"
app:srcCompat="@drawable/ic_search_white_24dp" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>

Expand Down

0 comments on commit 3bc807e

Please sign in to comment.