Skip to content

Commit

Permalink
#1293 fix: checkbox FABs not visible in multiple screens
Browse files Browse the repository at this point in the history
Moving this to after the appbar in the xml file fixed the problem for some reason.
  • Loading branch information
sds100 committed Sep 8, 2024
1 parent 7a6a2e4 commit 71cb6fa
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 49 deletions.
19 changes: 10 additions & 9 deletions app/src/main/res/layout/fragment_config_intent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,16 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>

<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/appBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:fabAlignmentMode="end"
app:fabAnimationMode="slide"
app:menuAlignmentMode="auto"
app:navigationIcon="@drawable/ic_baseline_arrow_back_24" />

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
Expand All @@ -339,14 +349,5 @@
android:src="@drawable/ic_baseline_done_24"
app:layout_anchor="@id/appBar" />

<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/appBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:fabAlignmentMode="end"
app:fabAnimationMode="slide"
app:menuAlignmentMode="auto"
app:navigationIcon="@drawable/ic_baseline_arrow_back_24" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>
20 changes: 10 additions & 10 deletions app/src/main/res/layout/fragment_config_key_event.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,6 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_done_configuring_key_event"
android:enabled="@{viewModel.uiState.isDoneButtonEnabled}"
android:onClick="@{() -> viewModel.onDoneClick()}"
android:src="@drawable/ic_baseline_done_24"
app:layout_anchor="@id/appBar" />

<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/appBar"
app:menuAlignmentMode="auto"
Expand All @@ -190,5 +180,15 @@
app:fabAnimationMode="slide"
app:navigationIcon="@drawable/ic_baseline_arrow_back_24" />

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_done_configuring_key_event"
android:enabled="@{viewModel.uiState.isDoneButtonEnabled}"
android:onClick="@{() -> viewModel.onDoneClick()}"
android:src="@drawable/ic_baseline_done_24"
app:layout_anchor="@id/appBar" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>
20 changes: 10 additions & 10 deletions app/src/main/res/layout/fragment_pick_coordinate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,6 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_done_configuring_coordinate"
android:enabled="@{viewModel.isDoneButtonEnabled()}"
android:onClick="@{() -> viewModel.onDoneClick()}"
android:src="@drawable/ic_baseline_done_24"
app:layout_anchor="@id/appBar" />

<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/appBar"
app:menuAlignmentMode="auto"
Expand All @@ -143,5 +133,15 @@
app:fabAnimationMode="slide"
app:navigationIcon="@drawable/ic_baseline_arrow_back_24" />

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_done_configuring_coordinate"
android:enabled="@{viewModel.isDoneButtonEnabled()}"
android:onClick="@{() -> viewModel.onDoneClick()}"
android:src="@drawable/ic_baseline_done_24"
app:layout_anchor="@id/appBar" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>
20 changes: 10 additions & 10 deletions app/src/main/res/layout/fragment_pinch_pick_coordinates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -262,16 +262,6 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_done_configuring_coordinate"
android:enabled="@{viewModel.isDoneButtonEnabled()}"
android:onClick="@{() -> viewModel.onDoneClick()}"
android:src="@drawable/ic_baseline_done_24"
app:layout_anchor="@id/appBar" />

<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/appBar"
app:menuAlignmentMode="auto"
Expand All @@ -282,6 +272,16 @@
app:fabAnimationMode="slide"
app:navigationIcon="@drawable/ic_baseline_arrow_back_24" />

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_done_configuring_coordinate"
android:enabled="@{viewModel.isDoneButtonEnabled()}"
android:onClick="@{() -> viewModel.onDoneClick()}"
android:src="@drawable/ic_baseline_done_24"
app:layout_anchor="@id/appBar" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>

</layout>
20 changes: 10 additions & 10 deletions app/src/main/res/layout/fragment_swipe_pick_coordinates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -306,16 +306,6 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_done_configuring_coordinate"
android:enabled="@{viewModel.isDoneButtonEnabled()}"
android:onClick="@{() -> viewModel.onDoneClick()}"
android:src="@drawable/ic_baseline_done_24"
app:layout_anchor="@id/appBar" />

<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/appBar"
app:menuAlignmentMode="auto"
Expand All @@ -326,6 +316,16 @@
app:fabAnimationMode="slide"
app:navigationIcon="@drawable/ic_baseline_arrow_back_24" />

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_done_configuring_coordinate"
android:enabled="@{viewModel.isDoneButtonEnabled()}"
android:onClick="@{() -> viewModel.onDoneClick()}"
android:src="@drawable/ic_baseline_done_24"
app:layout_anchor="@id/appBar" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>

</layout>

0 comments on commit 71cb6fa

Please sign in to comment.