mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-14 03:55:06 +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 com.mikepenz.fastadapter.listeners.ClickEventHook
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.databinding.ReaderChaptersSheetBinding
|
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.ReaderActivity
|
||||||
import eu.kanade.tachiyomi.ui.reader.ReaderPresenter
|
import eu.kanade.tachiyomi.ui.reader.ReaderPresenter
|
||||||
import eu.kanade.tachiyomi.ui.reader.settings.TabbedReaderSettingsSheet
|
import eu.kanade.tachiyomi.ui.reader.settings.TabbedReaderSettingsSheet
|
||||||
@ -73,11 +72,6 @@ class ReaderChapterSheet @JvmOverloads constructor(context: Context, attrs: Attr
|
|||||||
TabbedReaderSettingsSheet(activity).show()
|
TabbedReaderSettingsSheet(activity).show()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.fullSettings.setOnClickListener {
|
|
||||||
val intent = SearchActivity.openReaderSettings(activity)
|
|
||||||
activity.startActivity(intent)
|
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
post {
|
||||||
binding.chapterRecycler.alpha = if (sheetBehavior.isExpanded()) 1f else 0f
|
binding.chapterRecycler.alpha = if (sheetBehavior.isExpanded()) 1f else 0f
|
||||||
binding.chapterRecycler.isClickable = sheetBehavior.isExpanded()
|
binding.chapterRecycler.isClickable = sheetBehavior.isExpanded()
|
||||||
|
@ -3,6 +3,7 @@ package eu.kanade.tachiyomi.ui.reader.settings
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import com.google.android.material.tabs.TabLayout
|
import com.google.android.material.tabs.TabLayout
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
|
import eu.kanade.tachiyomi.ui.main.SearchActivity
|
||||||
import eu.kanade.tachiyomi.ui.reader.ReaderActivity
|
import eu.kanade.tachiyomi.ui.reader.ReaderActivity
|
||||||
import eu.kanade.tachiyomi.util.view.gone
|
import eu.kanade.tachiyomi.util.view.gone
|
||||||
import eu.kanade.tachiyomi.util.view.visInvisIf
|
import eu.kanade.tachiyomi.util.view.visInvisIf
|
||||||
@ -53,7 +54,23 @@ class TabbedReaderSettingsSheet(val readerActivity: ReaderActivity) : TabbedBott
|
|||||||
filterView.activity = readerActivity
|
filterView.activity = readerActivity
|
||||||
generalView.sheet = this
|
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 attrs = window?.attributes
|
||||||
val ogDim = attrs?.dimAmount ?: 0.25f
|
val ogDim = attrs?.dimAmount ?: 0.25f
|
||||||
binding.pager.adapter?.notifyDataSetChanged()
|
binding.pager.adapter?.notifyDataSetChanged()
|
||||||
|
@ -74,27 +74,10 @@
|
|||||||
app:layout_constraintHorizontal_chainStyle="spread"
|
app:layout_constraintHorizontal_chainStyle="spread"
|
||||||
android:tooltipText="@string/display_options"
|
android:tooltipText="@string/display_options"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/full_settings"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/webview_button"
|
app:layout_constraintStart_toEndOf="@id/webview_button"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
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"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:tooltipText="@string/reader_settings"
|
app:srcCompat="@drawable/ic_tune_24dp" />
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/display_options"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:srcCompat="@drawable/ic_settings_24dp" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
Loading…
Reference in New Issue
Block a user