mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 18:01:49 +01:00
Updates to tracking layout
This commit is contained in:
parent
ff948ea4d9
commit
87e86f81cf
@ -4,7 +4,6 @@ import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.WindowManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.google.android.material.snackbar.BaseTransientBottomBar
|
||||
@ -77,7 +76,6 @@ class CategoryController(bundle: Bundle? = null) : BaseController(bundle),
|
||||
adapter?.isHandleDragEnabled = true
|
||||
adapter?.isPermanentDelete = false
|
||||
|
||||
activity?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
|
||||
presenter.getCategories()
|
||||
}
|
||||
|
||||
@ -90,7 +88,6 @@ class CategoryController(bundle: Bundle? = null) : BaseController(bundle),
|
||||
// Manually call callback to delete categories if required
|
||||
snack?.dismiss()
|
||||
view.clearFocus()
|
||||
activity?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN)
|
||||
confirmDelete()
|
||||
snack = null
|
||||
adapter = null
|
||||
@ -100,7 +97,6 @@ class CategoryController(bundle: Bundle? = null) : BaseController(bundle),
|
||||
override fun handleBack(): Boolean {
|
||||
view?.clearFocus()
|
||||
confirmDelete()
|
||||
activity?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN)
|
||||
return super.handleBack()
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,7 @@ import android.view.ViewGroup
|
||||
import androidx.appcompat.view.ActionMode
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.ItemTouchHelper
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
@ -551,7 +552,7 @@ class LibraryListController(bundle: Bundle? = null) : LibraryController(bundle),
|
||||
|
||||
override fun onActionStateChanged(viewHolder: RecyclerView.ViewHolder?, actionState: Int) {
|
||||
val position = viewHolder?.adapterPosition ?: return
|
||||
if (actionState == 2) {
|
||||
if (actionState == ItemTouchHelper.ACTION_STATE_DRAG) {
|
||||
isDragging = true
|
||||
activity?.appbar?.y = 0f
|
||||
if (lastItemPosition != null && position != lastItemPosition && lastItem == adapter.getItem(
|
||||
|
@ -572,8 +572,10 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
|
||||
}
|
||||
val onRoot = router.backstackSize == 1
|
||||
if (onRoot) {
|
||||
window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN)
|
||||
toolbar.navigationIcon = searchDrawable
|
||||
} else {
|
||||
window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
|
||||
toolbar.navigationIcon = drawerArrow
|
||||
}
|
||||
drawerArrow?.progress = 1f
|
||||
|
@ -52,8 +52,13 @@ class SetTrackChaptersDialog<T> : DialogController
|
||||
val np: NumberPicker = view.findViewById(R.id.chapters_picker)
|
||||
// Set initial value
|
||||
np.value = item.track?.last_chapter_read ?: 0
|
||||
// Don't allow to go from 0 to 9999
|
||||
np.wrapSelectorWheel = false
|
||||
if (item.track?.total_chapters ?: 0 > 0) {
|
||||
np.wrapSelectorWheel = true
|
||||
np.maxValue = item.track?.total_chapters ?: 0
|
||||
} else {
|
||||
// Don't allow to go from 0 to 9999
|
||||
np.wrapSelectorWheel = false
|
||||
}
|
||||
|
||||
return dialog
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ArrayAdapter
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.glide.GlideApp
|
||||
import eu.kanade.tachiyomi.data.track.model.TrackSearch
|
||||
@ -47,11 +48,10 @@ class TrackSearchAdapter(context: Context) :
|
||||
view.track_search_summary.text = track.summary
|
||||
GlideApp.with(view.context).clear(view.track_search_cover)
|
||||
if (!track.cover_url.isNullOrEmpty()) {
|
||||
GlideApp.with(view.context)
|
||||
.load(track.cover_url)
|
||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||
.centerCrop()
|
||||
.into(view.track_search_cover)
|
||||
GlideApp.with(view.context).load(track.cover_url)
|
||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE).centerCrop()
|
||||
.transition(DrawableTransitionOptions.withCrossFade())
|
||||
.into(view.track_search_cover)
|
||||
}
|
||||
|
||||
if (track.publishing_status.isNullOrBlank()) {
|
||||
|
@ -183,11 +183,11 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:letterSpacing="0.0"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="@string/add_tracking"
|
||||
android:textAlignment="textStart"
|
||||
android:visibility="gone"
|
||||
app:icon="@drawable/ic_edit_white_24dp"
|
||||
app:iconTint="?colorAccent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/logo_container"
|
||||
|
@ -11,6 +11,7 @@
|
||||
<item name="android:statusBarColor">?colorPrimaryDark</item>
|
||||
<item name="android:navigationBarColor">?colorPrimaryDark</item>
|
||||
<item name="android:colorBackground">@color/readerDarkBackground</item>
|
||||
<item name="android:windowLightStatusBar">false</item>
|
||||
</style>
|
||||
|
||||
<!--==============-->
|
||||
|
@ -601,6 +601,7 @@
|
||||
<string name="add_tracking">Add Tracking</string>
|
||||
<string name="chapter_x_of_y">Chapter %1$d of %2$d</string>
|
||||
<string name="chapter_x">Chapter %1$d</string>
|
||||
<string name="all_chapters_read">All chapters read</string>
|
||||
|
||||
<!-- Category activity -->
|
||||
<string name="error_category_exists">A category with this name already exists!</string>
|
||||
|
@ -86,6 +86,7 @@
|
||||
<item name="actionBarTintColor">@color/md_white_1000</item>
|
||||
<item name="android:statusBarColor">?colorPrimaryDark</item>
|
||||
<item name="android:navigationBarColor">?colorPrimaryDark</item>
|
||||
<item name="android:windowLightStatusBar">false</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Base.Reader.Dark" parent="Theme.MaterialComponents.NoActionBar">
|
||||
|
Loading…
Reference in New Issue
Block a user