Clean up reader action sheet layout
(cherry picked from commit 333c035fede73d0baca6550d8ce020ffb28f877c) # Conflicts: # app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPageSheet.kt # app/src/main/res/layout/reader_page_sheet.xml
This commit is contained in:
parent
091049cda9
commit
b530216f21
@ -26,26 +26,26 @@ class ReaderPageSheet(
|
|||||||
override fun createView(inflater: LayoutInflater): View {
|
override fun createView(inflater: LayoutInflater): View {
|
||||||
binding = ReaderPageSheetBinding.inflate(activity.layoutInflater, null, false)
|
binding = ReaderPageSheetBinding.inflate(activity.layoutInflater, null, false)
|
||||||
|
|
||||||
binding.setAsCoverLayout.setOnClickListener { setAsCover(page) }
|
binding.setAsCover.setOnClickListener { setAsCover(page) }
|
||||||
binding.shareLayout.setOnClickListener { share(page) }
|
binding.share.setOnClickListener { share(page) }
|
||||||
binding.saveLayout.setOnClickListener { save(page) }
|
binding.save.setOnClickListener { save(page) }
|
||||||
|
|
||||||
if (extraPage != null) {
|
if (extraPage != null) {
|
||||||
binding.setAsCoverItem.setText(R.string.action_set_first_page_cover)
|
binding.setAsCover.setText(R.string.action_set_first_page_cover)
|
||||||
binding.shareItem.setText(R.string.action_share_first_page)
|
binding.share.setText(R.string.action_share_first_page)
|
||||||
binding.saveItem.setText(R.string.action_save_first_page)
|
binding.save.setText(R.string.action_save_first_page)
|
||||||
|
|
||||||
binding.setAsCoverLayoutExtra.isVisible = true
|
binding.setAsCoverExtra.isVisible = true
|
||||||
binding.setAsCoverLayoutExtra.setOnClickListener { setAsCover(extraPage) }
|
binding.setAsCoverExtra.setOnClickListener { setAsCover(extraPage) }
|
||||||
binding.shareLayoutExtra.isVisible = true
|
binding.shareExtra.isVisible = true
|
||||||
binding.shareLayoutExtra.setOnClickListener { share(extraPage) }
|
binding.shareExtra.setOnClickListener { share(extraPage) }
|
||||||
binding.saveLayoutExtra.isVisible = true
|
binding.saveExtra.isVisible = true
|
||||||
binding.saveLayoutExtra.setOnClickListener { save(extraPage) }
|
binding.saveExtra.setOnClickListener { save(extraPage) }
|
||||||
|
|
||||||
binding.shareLayoutCombined.isVisible = true
|
binding.shareCombined.isVisible = true
|
||||||
binding.shareLayoutCombined.setOnClickListener { shareCombined() }
|
binding.shareCombined.setOnClickListener { shareCombined() }
|
||||||
binding.saveLayoutCombined.isVisible = true
|
binding.saveCombined.isVisible = true
|
||||||
binding.saveLayoutCombined.setOnClickListener { saveCombined() }
|
binding.saveCombined.setOnClickListener { saveCombined() }
|
||||||
}
|
}
|
||||||
|
|
||||||
return binding.root
|
return binding.root
|
||||||
|
@ -5,223 +5,130 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<TextView
|
||||||
android:id="@+id/set_as_cover_layout"
|
android:id="@+id/set_as_cover"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
|
android:drawablePadding="32dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
android:foreground="?attr/selectableItemBackground"
|
android:foreground="?attr/selectableItemBackground"
|
||||||
android:gravity="center"
|
android:text="@string/set_as_cover"
|
||||||
android:paddingStart="16dp"
|
android:textColor="?attr/colorOnBackground"
|
||||||
android:paddingEnd="16dp">
|
app:drawableStartCompat="@drawable/ic_photo_24dp"
|
||||||
|
app:drawableTint="?attr/colorOnBackground" />
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:layout_width="24dp"
|
android:id="@+id/set_as_cover_extra"
|
||||||
android:layout_height="24dp"
|
|
||||||
app:srcCompat="@drawable/ic_photo_24dp"
|
|
||||||
app:tint="?attr/colorOnBackground" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/set_as_cover_item"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="32dp"
|
|
||||||
android:text="@string/set_as_cover"
|
|
||||||
android:textColor="?attr/colorOnBackground" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/set_as_cover_layout_extra"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
|
android:drawablePadding="32dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
android:foreground="?attr/selectableItemBackground"
|
android:foreground="?attr/selectableItemBackground"
|
||||||
android:gravity="center"
|
android:text="@string/action_set_second_page_cover"
|
||||||
android:paddingStart="16dp"
|
android:textColor="?attr/colorOnBackground"
|
||||||
android:paddingEnd="16dp"
|
android:visibility="gone"
|
||||||
android:visibility="gone">
|
app:drawableStartCompat="@drawable/ic_photo_24dp"
|
||||||
|
app:drawableTint="?attr/colorOnBackground" />
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:layout_width="24dp"
|
android:id="@+id/share"
|
||||||
android:layout_height="24dp"
|
|
||||||
app:srcCompat="@drawable/ic_photo_24dp"
|
|
||||||
app:tint="?attr/colorOnBackground" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/set_as_cover_item_extra"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="32dp"
|
|
||||||
android:text="@string/action_set_second_page_cover"
|
|
||||||
android:textColor="?attr/colorOnBackground" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/share_layout"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
|
android:drawablePadding="32dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
android:foreground="?attr/selectableItemBackground"
|
android:foreground="?attr/selectableItemBackground"
|
||||||
android:gravity="center"
|
android:text="@string/action_share"
|
||||||
android:paddingStart="16dp"
|
android:textColor="?attr/colorOnBackground"
|
||||||
android:paddingEnd="16dp">
|
app:drawableStartCompat="@drawable/ic_share_24dp"
|
||||||
|
app:drawableTint="?attr/colorOnBackground" />
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:layout_width="24dp"
|
android:id="@+id/share_extra"
|
||||||
android:layout_height="24dp"
|
|
||||||
app:srcCompat="@drawable/ic_share_24dp"
|
|
||||||
app:tint="?attr/colorOnBackground" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/share_item"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="32dp"
|
|
||||||
android:text="@string/action_share"
|
|
||||||
android:textColor="?attr/colorOnBackground" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/share_layout_extra"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
|
android:drawablePadding="32dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
android:foreground="?attr/selectableItemBackground"
|
android:foreground="?attr/selectableItemBackground"
|
||||||
android:gravity="center"
|
android:text="@string/action_share_second_page"
|
||||||
android:paddingStart="16dp"
|
android:textColor="?attr/colorOnBackground"
|
||||||
android:paddingEnd="16dp"
|
android:visibility="gone"
|
||||||
android:visibility="gone">
|
app:drawableStartCompat="@drawable/ic_share_24dp"
|
||||||
|
app:drawableTint="?attr/colorOnBackground" />
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:layout_width="24dp"
|
android:id="@+id/share_combined"
|
||||||
android:layout_height="24dp"
|
|
||||||
app:srcCompat="@drawable/ic_share_24dp"
|
|
||||||
app:tint="?attr/colorOnBackground" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/share_item_extra"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="32dp"
|
|
||||||
android:text="@string/action_share_second_page"
|
|
||||||
android:textColor="?attr/colorOnBackground" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/share_layout_combined"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
|
android:drawablePadding="32dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
android:foreground="?attr/selectableItemBackground"
|
android:foreground="?attr/selectableItemBackground"
|
||||||
android:gravity="center"
|
android:text="@string/action_share_combined_page"
|
||||||
android:paddingStart="16dp"
|
android:textColor="?attr/colorOnBackground"
|
||||||
android:paddingEnd="16dp"
|
android:visibility="gone"
|
||||||
android:visibility="gone">
|
app:drawableStartCompat="@drawable/ic_share_24dp"
|
||||||
|
app:drawableTint="?attr/colorOnBackground" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="24dp"
|
|
||||||
android:layout_height="24dp"
|
|
||||||
app:srcCompat="@drawable/ic_share_24dp"
|
|
||||||
app:tint="?attr/colorOnBackground" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/share_item_combined"
|
android:id="@+id/save"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="32dp"
|
|
||||||
android:text="@string/action_share_combined_page"
|
|
||||||
android:textColor="?attr/colorOnBackground" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/save_layout"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
|
android:drawablePadding="32dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
android:foreground="?attr/selectableItemBackground"
|
android:foreground="?attr/selectableItemBackground"
|
||||||
android:gravity="center"
|
android:text="@string/action_save"
|
||||||
android:paddingStart="16dp"
|
android:textColor="?attr/colorOnBackground"
|
||||||
android:paddingEnd="16dp">
|
app:drawableStartCompat="@drawable/ic_save_24dp"
|
||||||
|
app:drawableTint="?attr/colorOnBackground" />
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:layout_width="24dp"
|
android:id="@+id/save_extra"
|
||||||
android:layout_height="24dp"
|
|
||||||
app:srcCompat="@drawable/ic_save_24dp"
|
|
||||||
app:tint="?attr/colorOnBackground" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/save_item"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="32dp"
|
|
||||||
android:text="@string/action_save"
|
|
||||||
android:textColor="?attr/colorOnBackground" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/save_layout_extra"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
|
android:drawablePadding="32dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
android:foreground="?attr/selectableItemBackground"
|
android:foreground="?attr/selectableItemBackground"
|
||||||
android:gravity="center"
|
android:text="@string/action_save_second_page"
|
||||||
android:paddingStart="16dp"
|
android:textColor="?attr/colorOnBackground"
|
||||||
android:paddingEnd="16dp"
|
android:visibility="gone"
|
||||||
android:visibility="gone">
|
app:drawableStartCompat="@drawable/ic_save_24dp"
|
||||||
|
app:drawableTint="?attr/colorOnBackground" />
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:layout_width="24dp"
|
android:id="@+id/save_combined"
|
||||||
android:layout_height="24dp"
|
|
||||||
app:srcCompat="@drawable/ic_get_app_24dp"
|
|
||||||
app:tint="?attr/colorOnBackground" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/save_item_extra"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="32dp"
|
|
||||||
android:text="@string/action_save_second_page"
|
|
||||||
android:textColor="?attr/colorOnBackground" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/save_layout_combined"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
|
android:drawablePadding="32dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
android:foreground="?attr/selectableItemBackground"
|
android:foreground="?attr/selectableItemBackground"
|
||||||
android:gravity="center"
|
android:text="@string/action_save_combined_page"
|
||||||
android:paddingStart="16dp"
|
android:textColor="?attr/colorOnBackground"
|
||||||
android:paddingEnd="16dp"
|
android:visibility="gone"
|
||||||
android:visibility="gone">
|
app:drawableStartCompat="@drawable/ic_save_24dp"
|
||||||
|
app:drawableTint="?attr/colorOnBackground" />
|
||||||
<ImageView
|
|
||||||
android:layout_width="24dp"
|
|
||||||
android:layout_height="24dp"
|
|
||||||
app:srcCompat="@drawable/ic_get_app_24dp"
|
|
||||||
app:tint="?attr/colorOnBackground" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/save_item_combined"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="32dp"
|
|
||||||
android:text="@string/action_save_combined_page"
|
|
||||||
android:textColor="?attr/colorOnBackground" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user