mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-09 05:25:08 +01:00
Move Reader settings button to bottom settings sheet
This commit is contained in:
parent
21343225e3
commit
b7b91f4230
@ -16,7 +16,6 @@ import com.mikepenz.fastadapter.adapters.ItemAdapter
|
||||
import com.mikepenz.fastadapter.listeners.ClickEventHook
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.databinding.ReaderChaptersSheetBinding
|
||||
import eu.kanade.tachiyomi.ui.main.SearchActivity
|
||||
import eu.kanade.tachiyomi.ui.reader.ReaderActivity
|
||||
import eu.kanade.tachiyomi.ui.reader.ReaderPresenter
|
||||
import eu.kanade.tachiyomi.ui.reader.settings.TabbedReaderSettingsSheet
|
||||
@ -73,11 +72,6 @@ class ReaderChapterSheet @JvmOverloads constructor(context: Context, attrs: Attr
|
||||
TabbedReaderSettingsSheet(activity).show()
|
||||
}
|
||||
|
||||
binding.fullSettings.setOnClickListener {
|
||||
val intent = SearchActivity.openReaderSettings(activity)
|
||||
activity.startActivity(intent)
|
||||
}
|
||||
|
||||
post {
|
||||
binding.chapterRecycler.alpha = if (sheetBehavior.isExpanded()) 1f else 0f
|
||||
binding.chapterRecycler.isClickable = sheetBehavior.isExpanded()
|
||||
|
@ -3,6 +3,7 @@ package eu.kanade.tachiyomi.ui.reader.settings
|
||||
import android.view.View
|
||||
import com.google.android.material.tabs.TabLayout
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.ui.main.SearchActivity
|
||||
import eu.kanade.tachiyomi.ui.reader.ReaderActivity
|
||||
import eu.kanade.tachiyomi.util.view.gone
|
||||
import eu.kanade.tachiyomi.util.view.visInvisIf
|
||||
@ -53,7 +54,23 @@ class TabbedReaderSettingsSheet(val readerActivity: ReaderActivity) : TabbedBott
|
||||
filterView.activity = readerActivity
|
||||
generalView.sheet = this
|
||||
|
||||
binding.menu.gone()
|
||||
sheetBehavior = BottomSheetBehavior.from(binding.root.parent as ViewGroup)
|
||||
binding.menu.visible()
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||
binding.menu.tooltipText = context.getString(R.string.reader_settings)
|
||||
}
|
||||
binding.menu.setImageDrawable(
|
||||
ContextCompat.getDrawable(
|
||||
context,
|
||||
R.drawable.ic_settings_24dp
|
||||
)
|
||||
)
|
||||
binding.menu.setOnClickListener {
|
||||
val intent = SearchActivity.openReaderSettings(readerActivity)
|
||||
readerActivity.startActivity(intent)
|
||||
dismiss()
|
||||
}
|
||||
|
||||
val attrs = window?.attributes
|
||||
val ogDim = attrs?.dimAmount ?: 0.25f
|
||||
binding.pager.adapter?.notifyDataSetChanged()
|
||||
|
@ -74,27 +74,10 @@
|
||||
app:layout_constraintHorizontal_chainStyle="spread"
|
||||
android:tooltipText="@string/display_options"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/full_settings"
|
||||
app:layout_constraintStart_toEndOf="@id/webview_button"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_tune_24dp" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/full_settings"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/next_title"
|
||||
android:padding="@dimen/material_layout_keylines_screen_edge_margin"
|
||||
app:tint="?actionBarTintColor"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintHorizontal_chainStyle="spread"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:tooltipText="@string/reader_settings"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/display_options"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_settings_24dp" />
|
||||
app:srcCompat="@drawable/ic_tune_24dp" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
Loading…
Reference in New Issue
Block a user