Handle public instances #126
@ -195,6 +195,9 @@ class ArticleFragment : Fragment(), DIAware {
|
||||
|
||||
private fun handleFloatingToolbar(): FloatingToolbar {
|
||||
val floatingToolbar: FloatingToolbar = binding.floatingToolbar
|
||||
if (appSettingsService.getPublicAccess()) {
|
||||
floatingToolbar.setMenu(R.menu.reader_toolbar_no_read)
|
||||
}
|
||||
floatingToolbar.attachFab(fab)
|
||||
|
||||
floatingToolbar.background = ColorDrawable(resources.getColor(R.color.colorAccent))
|
||||
|
@ -83,7 +83,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_gravity="end|bottom|right">
|
||||
android:layout_gravity="end|bottom|end">
|
||||
|
||||
<com.github.rubensousa.floatingtoolbar.FloatingToolbar
|
||||
android:id="@+id/floatingToolbar"
|
||||
@ -96,10 +96,9 @@
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom|right"
|
||||
android:layout_gravity="end|bottom|end"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:src="@drawable/ic_add_white_24dp"
|
||||
|
16
androidApp/src/main/res/menu/reader_toolbar_no_read.xml
Normal file
16
androidApp/src/main/res/menu/reader_toolbar_no_read.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/open_action"
|
||||
android:icon="@drawable/ic_open_in_browser_white_24dp"
|
||||
android:title="@string/reader_action_open"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/share_action"
|
||||
android:icon="@drawable/ic_share_white_24dp"
|
||||
android:title="@string/reader_action_share"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
Loading…
Reference in New Issue
Block a user