Merge branch 'redesign' of https://github.com/ztimms73/Kotatsu into devel
This commit is contained in:
@@ -11,6 +11,13 @@
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.speech.RecognitionService" />
|
||||
</intent>
|
||||
</queries>
|
||||
|
||||
<application
|
||||
android:name="org.koitharu.kotatsu.KotatsuApp"
|
||||
|
||||
@@ -37,7 +37,7 @@ abstract class BaseActivity<B : ViewBinding> : AppCompatActivity(), OnApplyWindo
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
if (get<AppSettings>().isAmoledTheme) {
|
||||
setTheme(R.style.AppTheme_Amoled)
|
||||
setTheme(R.style.AppTheme_AMOLED)
|
||||
}
|
||||
super.onCreate(savedInstanceState)
|
||||
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||
@@ -59,12 +59,12 @@ abstract class BaseActivity<B : ViewBinding> : AppCompatActivity(), OnApplyWindo
|
||||
this.binding = binding
|
||||
super.setContentView(binding.root)
|
||||
(binding.root.findViewById<View>(R.id.toolbar) as? Toolbar)?.let(this::setSupportActionBar)
|
||||
val params = (binding.root.findViewById<View>(R.id.toolbar) as? Toolbar)?.layoutParams as AppBarLayout.LayoutParams
|
||||
val params = (binding.root.findViewById<View>(R.id.toolbar) as? Toolbar)?.layoutParams as? AppBarLayout.LayoutParams
|
||||
ViewCompat.setOnApplyWindowInsetsListener(binding.root, this)
|
||||
if (get<AppSettings>().isToolbarHideWhenScrolling) {
|
||||
params.scrollFlags = SCROLL_FLAG_SCROLL or SCROLL_FLAG_ENTER_ALWAYS
|
||||
params?.scrollFlags = SCROLL_FLAG_SCROLL or SCROLL_FLAG_ENTER_ALWAYS
|
||||
} else {
|
||||
params.scrollFlags = SCROLL_FLAG_NO_SCROLL
|
||||
params?.scrollFlags = SCROLL_FLAG_NO_SCROLL
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class SectionItemDecoration(
|
||||
|
||||
override fun onDrawOver(c: Canvas, parent: RecyclerView, state: RecyclerView.State) {
|
||||
super.onDrawOver(c, parent, state)
|
||||
val textView = headerView ?: parent.inflate<TextView>(R.layout.item_header).also {
|
||||
val textView = headerView ?: parent.inflate<TextView>(R.layout.item_filter_header).also {
|
||||
headerView = it
|
||||
}
|
||||
fixLayoutSize(textView, parent)
|
||||
|
||||
@@ -4,16 +4,17 @@ import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.View.OnClickListener
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.children
|
||||
import com.google.android.material.R
|
||||
import com.google.android.material.chip.Chip
|
||||
import com.google.android.material.chip.ChipDrawable
|
||||
import com.google.android.material.chip.ChipGroup
|
||||
import org.koitharu.kotatsu.utils.ext.getThemeColor
|
||||
import org.koitharu.kotatsu.R
|
||||
|
||||
class ChipsView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = R.attr.chipGroupStyle
|
||||
defStyleAttr: Int = com.google.android.material.R.attr.chipGroupStyle
|
||||
) : ChipGroup(context, attrs, defStyleAttr) {
|
||||
|
||||
private var isLayoutSuppressedCompat = false
|
||||
@@ -64,7 +65,9 @@ class ChipsView @JvmOverloads constructor(
|
||||
|
||||
private fun addChip(): Chip {
|
||||
val chip = Chip(context)
|
||||
chip.setTextColor(context.getThemeColor(android.R.attr.textColorPrimary))
|
||||
val drawable = ChipDrawable.createFromAttributes(context, null, 0, R.style.Widget_Kotatsu_Chip)
|
||||
chip.setChipDrawable(drawable)
|
||||
chip.setTextColor(ContextCompat.getColor(context, R.color.blue_primary))
|
||||
chip.isCloseIconVisible = false
|
||||
chip.setEnsureMinTouchTargetSize(false)
|
||||
chip.setOnClickListener(chipOnClickListener)
|
||||
|
||||
@@ -0,0 +1,231 @@
|
||||
/*https://github.com/lapism/search*/
|
||||
|
||||
package org.koitharu.kotatsu.base.ui.widgets.search
|
||||
|
||||
import android.animation.LayoutTransition
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.LinearLayout
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import org.koitharu.kotatsu.R
|
||||
import org.koitharu.kotatsu.base.ui.widgets.search.internal.SearchLayout
|
||||
|
||||
class MaterialSearchView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0,
|
||||
defStyleRes: Int = 0
|
||||
) : SearchLayout(context, attrs, defStyleAttr, defStyleRes), CoordinatorLayout.AttachedBehavior {
|
||||
|
||||
// *********************************************************************************************
|
||||
private var mBehavior: CoordinatorLayout.Behavior<*> = SearchBehavior<MaterialSearchView>()
|
||||
private var mTransition: LayoutTransition? = null
|
||||
private var mStrokeWidth: Int = 0
|
||||
private var mRadius: Float = 0f
|
||||
private var mElevation: Float = 0f
|
||||
|
||||
// *********************************************************************************************
|
||||
init {
|
||||
inflate(context, R.layout.layout_search_view, this)
|
||||
init()
|
||||
setTransition()
|
||||
|
||||
val a = context.obtainStyledAttributes(
|
||||
attrs, R.styleable.MaterialSearchView, defStyleAttr, defStyleRes
|
||||
)
|
||||
|
||||
if (a.hasValue(R.styleable.MaterialSearchView_search_navigationIconSupport)) {
|
||||
navigationIconSupport = a.getInt(
|
||||
R.styleable.MaterialSearchView_search_navigationIconSupport,
|
||||
NavigationIconSupport.NONE
|
||||
)
|
||||
}
|
||||
|
||||
if (a.hasValue(R.styleable.MaterialSearchView_search_navigationIcon)) {
|
||||
setNavigationIconImageDrawable(a.getDrawable(R.styleable.MaterialSearchView_search_navigationIcon))
|
||||
}
|
||||
|
||||
if (a.hasValue(R.styleable.MaterialSearchView_search_clearIcon)) {
|
||||
setClearIconImageDrawable(a.getDrawable(R.styleable.MaterialSearchView_search_clearIcon))
|
||||
} else {
|
||||
setClearIconImageDrawable(
|
||||
ContextCompat.getDrawable(
|
||||
context,
|
||||
R.drawable.ic_clear
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
if (a.hasValue(R.styleable.MaterialSearchView_search_micIcon)) {
|
||||
setMicIconImageDrawable(a.getDrawable(R.styleable.MaterialSearchView_search_micIcon))
|
||||
} else {
|
||||
setMicIconImageDrawable(
|
||||
ContextCompat.getDrawable(
|
||||
context,
|
||||
R.drawable.ic_mic_none
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
if (a.hasValue(R.styleable.MaterialSearchView_search_menuIcon)) {
|
||||
setMicIconImageDrawable(a.getDrawable(R.styleable.MaterialSearchView_search_menuIcon))
|
||||
} else {
|
||||
setMicIconImageDrawable(
|
||||
ContextCompat.getDrawable(
|
||||
context,
|
||||
R.drawable.ic_more
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
if (a.hasValue(R.styleable.MaterialSearchView_search_dividerColor)) {
|
||||
setDividerColor(a.getInt(R.styleable.MaterialSearchView_search_dividerColor, 0))
|
||||
}
|
||||
|
||||
val defaultShadowColor = ContextCompat.getColor(context, R.color.shadow)
|
||||
setShadowColor(
|
||||
a.getInt(
|
||||
R.styleable.MaterialSearchView_search_shadowColor,
|
||||
defaultShadowColor
|
||||
)
|
||||
)
|
||||
|
||||
if (a.hasValue(R.styleable.MaterialSearchView_search_textHint)) {
|
||||
setTextHint(a.getText(R.styleable.MaterialSearchView_search_textHint))
|
||||
}
|
||||
|
||||
if (a.hasValue(R.styleable.MaterialSearchView_search_strokeColor)) {
|
||||
setBackgroundStrokeColor(a.getInt(R.styleable.MaterialSearchView_search_strokeColor, 0))
|
||||
}
|
||||
|
||||
if (a.hasValue(R.styleable.MaterialSearchView_search_strokeWidth)) {
|
||||
setBackgroundStrokeWidth(a.getInt(R.styleable.MaterialSearchView_search_strokeWidth, 0))
|
||||
}
|
||||
|
||||
val defaultTransitionDuration =
|
||||
context.resources.getInteger(R.integer.search_animation_duration)
|
||||
setTransitionDuration(
|
||||
a.getInt(
|
||||
R.styleable.MaterialSearchView_search_transitionDuration,
|
||||
defaultTransitionDuration
|
||||
).toLong()
|
||||
)
|
||||
|
||||
val defaultRadius = context.resources.getDimensionPixelSize(R.dimen.search_radius)
|
||||
setBackgroundRadius(
|
||||
a.getInt(R.styleable.MaterialSearchView_search_radius, defaultRadius).toFloat()
|
||||
)
|
||||
|
||||
val defaultElevation = context.resources.getDimensionPixelSize(R.dimen.search_elevation)
|
||||
elevation =
|
||||
a.getInt(R.styleable.MaterialSearchView_android_elevation, defaultElevation).toFloat()
|
||||
|
||||
val imeOptions = a.getInt(R.styleable.MaterialSearchView_android_imeOptions, -1)
|
||||
if (imeOptions != -1) {
|
||||
setTextImeOptions(imeOptions)
|
||||
}
|
||||
|
||||
val inputType = a.getInt(R.styleable.MaterialSearchView_android_inputType, -1)
|
||||
if (inputType != -1) {
|
||||
setTextInputType(inputType)
|
||||
}
|
||||
|
||||
a.recycle()
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
override fun addFocus() {
|
||||
mOnFocusChangeListener?.onFocusChange(true)
|
||||
showKeyboard()
|
||||
|
||||
mStrokeWidth = getBackgroundStrokeWidth()
|
||||
mRadius = getBackgroundRadius()
|
||||
mElevation = elevation
|
||||
|
||||
setBackgroundStrokeWidth(context.resources.getDimensionPixelSize(R.dimen.search_stroke_width_focus))
|
||||
setBackgroundRadius(resources.getDimensionPixelSize(R.dimen.search_radius_focus).toFloat())
|
||||
elevation =
|
||||
context.resources.getDimensionPixelSize(R.dimen.search_elevation_focus).toFloat()
|
||||
|
||||
val left = context.resources.getDimensionPixelSize(R.dimen.search_dp_16)
|
||||
val params = mSearchEditText?.layoutParams as LinearLayout.LayoutParams
|
||||
params.setMargins(left, 0, 0, 0)
|
||||
mSearchEditText?.layoutParams = params
|
||||
|
||||
margins = Margins.FOCUS
|
||||
setLayoutHeight(context.resources.getDimensionPixelSize(R.dimen.search_layout_height_focus))
|
||||
|
||||
mViewShadow?.visibility = View.VISIBLE
|
||||
|
||||
mViewDivider?.visibility = View.VISIBLE
|
||||
mViewAnim?.visibility = View.VISIBLE
|
||||
mRecyclerView?.visibility = View.VISIBLE
|
||||
|
||||
// layoutTransition = null
|
||||
}
|
||||
|
||||
override fun removeFocus() {
|
||||
// layoutTransition = mTransition
|
||||
|
||||
mOnFocusChangeListener?.onFocusChange(false)
|
||||
hideKeyboard()
|
||||
|
||||
val params = mSearchEditText?.layoutParams as LinearLayout.LayoutParams
|
||||
params.setMargins(0, 0, 0, 0)
|
||||
mSearchEditText?.layoutParams = params
|
||||
|
||||
setBackgroundStrokeWidth(mStrokeWidth)
|
||||
setBackgroundRadius(mRadius)
|
||||
elevation = mElevation
|
||||
|
||||
setLayoutHeight(context.resources.getDimensionPixelSize(R.dimen.search_layout_height))
|
||||
margins = Margins.NO_FOCUS
|
||||
|
||||
mViewShadow?.visibility = View.GONE
|
||||
|
||||
mRecyclerView?.visibility = View.GONE
|
||||
mViewAnim?.visibility = View.GONE
|
||||
mViewDivider?.visibility = View.GONE
|
||||
}
|
||||
|
||||
override fun getBehavior(): CoordinatorLayout.Behavior<*> {
|
||||
return mBehavior
|
||||
}
|
||||
|
||||
fun setBehavior(behavior: CoordinatorLayout.Behavior<*>) {
|
||||
mBehavior = behavior
|
||||
}
|
||||
|
||||
fun setTransitionDuration(duration: Long) {
|
||||
mTransition?.setDuration(duration)
|
||||
layoutTransition = mTransition
|
||||
}
|
||||
|
||||
private fun setTransition() {
|
||||
mTransition = LayoutTransition()
|
||||
mTransition?.enableTransitionType(LayoutTransition.CHANGING)
|
||||
mTransition?.addTransitionListener(object : LayoutTransition.TransitionListener {
|
||||
override fun startTransition(
|
||||
transition: LayoutTransition?,
|
||||
container: ViewGroup?,
|
||||
view: View?,
|
||||
transitionType: Int
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
override fun endTransition(
|
||||
transition: LayoutTransition?,
|
||||
container: ViewGroup?,
|
||||
view: View?,
|
||||
transitionType: Int
|
||||
) {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/*https://github.com/lapism/search*/
|
||||
|
||||
package org.koitharu.kotatsu.base.ui.widgets.search
|
||||
|
||||
import android.animation.ObjectAnimator
|
||||
import android.content.Context
|
||||
import android.util.Property
|
||||
import android.view.animation.AccelerateDecelerateInterpolator
|
||||
import androidx.appcompat.graphics.drawable.DrawerArrowDrawable
|
||||
import androidx.core.content.ContextCompat
|
||||
|
||||
class SearchArrowDrawable constructor(context: Context) : DrawerArrowDrawable(context) {
|
||||
|
||||
var position: Float
|
||||
get() = progress
|
||||
set(position) {
|
||||
progress = position
|
||||
}
|
||||
|
||||
init {
|
||||
color = ContextCompat.getColor(context, android.R.color.white)
|
||||
}
|
||||
|
||||
fun animate(state: Float, duration: Long) {
|
||||
val anim: ObjectAnimator = if (state == ARROW) {
|
||||
ObjectAnimator.ofFloat(
|
||||
this,
|
||||
PROGRESS,
|
||||
MENU,
|
||||
state
|
||||
)
|
||||
} else {
|
||||
ObjectAnimator.ofFloat(
|
||||
this,
|
||||
PROGRESS,
|
||||
ARROW,
|
||||
state
|
||||
)
|
||||
}
|
||||
anim.interpolator = AccelerateDecelerateInterpolator()
|
||||
anim.duration = duration
|
||||
anim.start()
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
const val MENU = 0.0f
|
||||
const val ARROW = 1.0f
|
||||
|
||||
private val PROGRESS =
|
||||
object : Property<SearchArrowDrawable, Float>(Float::class.java, "progress") {
|
||||
override fun set(obj: SearchArrowDrawable, value: Float?) {
|
||||
obj.progress = value!!
|
||||
}
|
||||
|
||||
override fun get(obj: SearchArrowDrawable): Float {
|
||||
return obj.progress
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*https://github.com/lapism/search*/
|
||||
|
||||
package org.koitharu.kotatsu.base.ui.widgets.search
|
||||
|
||||
import android.view.View
|
||||
import android.widget.LinearLayout
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
import androidx.core.view.ViewCompat
|
||||
import com.google.android.material.appbar.AppBarLayout
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
import org.koitharu.kotatsu.base.ui.widgets.search.internal.SearchLayout
|
||||
|
||||
class SearchBehavior<S : SearchLayout> : CoordinatorLayout.Behavior<S>() {
|
||||
|
||||
override fun layoutDependsOn(
|
||||
parent: CoordinatorLayout,
|
||||
child: S,
|
||||
dependency: View
|
||||
): Boolean {
|
||||
return if (dependency is AppBarLayout) {
|
||||
true
|
||||
} else
|
||||
if (dependency is LinearLayout || dependency is BottomNavigationView) {
|
||||
dependency.z = child.z + 1
|
||||
true
|
||||
} else {
|
||||
super.layoutDependsOn(parent, child, dependency)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDependentViewChanged(
|
||||
parent: CoordinatorLayout,
|
||||
child: S,
|
||||
dependency: View
|
||||
): Boolean {
|
||||
if (dependency is AppBarLayout) {
|
||||
child.translationY = dependency.getY()
|
||||
return true
|
||||
}
|
||||
return super.onDependentViewChanged(parent, child, dependency)
|
||||
}
|
||||
|
||||
override fun onStartNestedScroll(
|
||||
coordinatorLayout: CoordinatorLayout,
|
||||
child: S,
|
||||
directTargetChild: View,
|
||||
target: View,
|
||||
axes: Int,
|
||||
type: Int
|
||||
): Boolean {
|
||||
return axes == ViewCompat.SCROLL_AXIS_VERTICAL
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*https://github.com/lapism/search*/
|
||||
|
||||
package org.koitharu.kotatsu.base.ui.widgets.search.internal
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.KeyEvent
|
||||
import androidx.annotation.AttrRes
|
||||
import androidx.appcompat.widget.AppCompatEditText
|
||||
|
||||
class SearchEditText : AppCompatEditText {
|
||||
|
||||
var clearFocusOnBackPressed: Boolean = false
|
||||
|
||||
constructor(context: Context) : super(context)
|
||||
|
||||
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
|
||||
|
||||
constructor(context: Context, attrs: AttributeSet?, @AttrRes defStyleAttr: Int) : super(
|
||||
context,
|
||||
attrs,
|
||||
defStyleAttr
|
||||
)
|
||||
|
||||
override fun onKeyPreIme(keyCode: Int, event: KeyEvent): Boolean {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK && event.action == KeyEvent.ACTION_UP && clearFocusOnBackPressed) {
|
||||
if (hasFocus()) {
|
||||
clearFocus()
|
||||
return true
|
||||
}
|
||||
}
|
||||
return super.onKeyPreIme(keyCode, event)
|
||||
}
|
||||
|
||||
override fun clearFocus() {
|
||||
super.clearFocus()
|
||||
text?.clear()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,725 @@
|
||||
/*https://github.com/lapism/search*/
|
||||
|
||||
package org.koitharu.kotatsu.base.ui.widgets.search.internal
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.ColorStateList
|
||||
import android.graphics.ColorFilter
|
||||
import android.graphics.PorterDuff
|
||||
import android.graphics.Rect
|
||||
import android.graphics.Typeface
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.os.Parcelable
|
||||
import android.text.Editable
|
||||
import android.text.TextUtils
|
||||
import android.text.TextWatcher
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.FrameLayout
|
||||
import android.widget.ImageButton
|
||||
import android.widget.LinearLayout
|
||||
import androidx.annotation.*
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.recyclerview.widget.DefaultItemAnimator
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.google.android.material.card.MaterialCardView
|
||||
import org.koitharu.kotatsu.R
|
||||
|
||||
abstract class SearchLayout @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0,
|
||||
defStyleRes: Int = 0
|
||||
) : FrameLayout(context, attrs, defStyleAttr, defStyleRes), View.OnClickListener {
|
||||
|
||||
// *********************************************************************************************
|
||||
// Better way than enum class :-)
|
||||
@IntDef(
|
||||
NavigationIconSupport.NONE,
|
||||
NavigationIconSupport.MENU,
|
||||
NavigationIconSupport.ARROW,
|
||||
NavigationIconSupport.SEARCH
|
||||
)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class NavigationIconSupport {
|
||||
companion object {
|
||||
const val NONE = 0
|
||||
const val MENU = 1
|
||||
const val ARROW = 2
|
||||
const val SEARCH = 3
|
||||
}
|
||||
}
|
||||
|
||||
@IntDef(
|
||||
Margins.NO_FOCUS,
|
||||
Margins.FOCUS
|
||||
)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
internal annotation class Margins {
|
||||
companion object {
|
||||
const val NO_FOCUS = 4
|
||||
const val FOCUS = 5
|
||||
}
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
private var mImageViewMic: ImageButton? = null
|
||||
private var mImageViewMenu: ImageButton? = null
|
||||
protected var mRecyclerView: RecyclerView? = null
|
||||
private var mMaterialCardView: MaterialCardView? = null
|
||||
var mSearchEditText: SearchEditText? = null
|
||||
protected var mViewShadow: View? = null
|
||||
protected var mViewDivider: View? = null
|
||||
protected var mViewAnim: View? = null
|
||||
protected var mOnFocusChangeListener: OnFocusChangeListener? = null
|
||||
|
||||
private var mLinearLayout: LinearLayout? = null
|
||||
private var mImageViewNavigation: ImageButton? = null
|
||||
private var mImageViewClear: ImageButton? = null
|
||||
private var mOnQueryTextListener: OnQueryTextListener? = null
|
||||
private var mOnNavigationClickListener: OnNavigationClickListener? = null
|
||||
private var mOnMicClickListener: OnMicClickListener? = null
|
||||
private var mOnMenuClickListener: OnMenuClickListener? = null
|
||||
private var mOnClearClickListener: OnClearClickListener? = null
|
||||
|
||||
// *********************************************************************************************
|
||||
@NavigationIconSupport
|
||||
@get:NavigationIconSupport
|
||||
var navigationIconSupport: Int = 0
|
||||
set(@NavigationIconSupport navigationIconSupport) {
|
||||
field = navigationIconSupport
|
||||
|
||||
when (navigationIconSupport) {
|
||||
NavigationIconSupport.NONE
|
||||
-> {
|
||||
setNavigationIconImageDrawable(null)
|
||||
}
|
||||
NavigationIconSupport.MENU -> {
|
||||
setNavigationIconImageDrawable(
|
||||
ContextCompat.getDrawable(
|
||||
context,
|
||||
R.drawable.ic_menu
|
||||
)
|
||||
)
|
||||
}
|
||||
NavigationIconSupport.ARROW -> {
|
||||
setNavigationIconImageDrawable(
|
||||
ContextCompat.getDrawable(
|
||||
context,
|
||||
R.drawable.ic_arrow_back
|
||||
)
|
||||
)
|
||||
}
|
||||
NavigationIconSupport.SEARCH -> {
|
||||
setNavigationIconImageDrawable(
|
||||
ContextCompat.getDrawable(
|
||||
context,
|
||||
R.drawable.ic_search
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Margins
|
||||
@get:Margins
|
||||
protected var margins: Int = 0
|
||||
set(@Margins margins) {
|
||||
field = margins
|
||||
|
||||
val left: Int
|
||||
val top: Int
|
||||
val right: Int
|
||||
val bottom: Int
|
||||
val params = mMaterialCardView?.layoutParams as LayoutParams?
|
||||
|
||||
when (margins) {
|
||||
Margins.NO_FOCUS -> {
|
||||
left =
|
||||
context.resources.getDimensionPixelSize(R.dimen.search_margins_left_right)
|
||||
top =
|
||||
context.resources.getDimensionPixelSize(R.dimen.search_margins_top_bottom)
|
||||
right =
|
||||
context.resources.getDimensionPixelSize(R.dimen.search_margins_left_right)
|
||||
bottom =
|
||||
context.resources.getDimensionPixelSize(R.dimen.search_margins_top_bottom)
|
||||
|
||||
params?.width = ViewGroup.LayoutParams.MATCH_PARENT
|
||||
params?.height = ViewGroup.LayoutParams.WRAP_CONTENT
|
||||
params?.setMargins(left, top, right, bottom)
|
||||
mMaterialCardView?.layoutParams = params
|
||||
}
|
||||
Margins.FOCUS -> {
|
||||
left =
|
||||
context.resources.getDimensionPixelSize(R.dimen.search_margins_focus)
|
||||
top =
|
||||
context.resources.getDimensionPixelSize(R.dimen.search_margins_focus)
|
||||
right =
|
||||
context.resources.getDimensionPixelSize(R.dimen.search_margins_focus)
|
||||
bottom =
|
||||
context.resources.getDimensionPixelSize(R.dimen.search_margins_focus)
|
||||
|
||||
params?.width = ViewGroup.LayoutParams.MATCH_PARENT
|
||||
params?.height = ViewGroup.LayoutParams.MATCH_PARENT
|
||||
params?.setMargins(left, top, right, bottom)
|
||||
mMaterialCardView?.layoutParams = params
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
protected abstract fun addFocus()
|
||||
|
||||
protected abstract fun removeFocus()
|
||||
|
||||
// *********************************************************************************************
|
||||
protected fun init() {
|
||||
mLinearLayout = findViewById(R.id.search_linear_layout)
|
||||
|
||||
mImageViewNavigation = findViewById(R.id.search_image_view_navigation)
|
||||
mImageViewNavigation?.setOnClickListener(this)
|
||||
|
||||
mImageViewMic = findViewById(R.id.search_image_view_mic)
|
||||
mImageViewMic?.setOnClickListener(this)
|
||||
|
||||
mImageViewMenu = findViewById(R.id.search_image_view_menu)
|
||||
mImageViewMenu?.setOnClickListener(this)
|
||||
|
||||
mImageViewClear = findViewById(R.id.search_image_view_clear)
|
||||
mImageViewClear?.visibility = View.GONE
|
||||
mImageViewClear?.setOnClickListener(this)
|
||||
|
||||
mSearchEditText = findViewById(R.id.search_search_edit_text)
|
||||
mSearchEditText?.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
this@SearchLayout.onTextChanged(s)
|
||||
}
|
||||
|
||||
override fun afterTextChanged(s: Editable?) {
|
||||
|
||||
}
|
||||
})
|
||||
mSearchEditText?.setOnEditorActionListener { _, _, _ ->
|
||||
onSubmitQuery()
|
||||
return@setOnEditorActionListener true // true
|
||||
}
|
||||
mSearchEditText?.setOnFocusChangeListener { _, hasFocus ->
|
||||
if (hasFocus) {
|
||||
addFocus()
|
||||
} else {
|
||||
removeFocus()
|
||||
}
|
||||
}
|
||||
|
||||
mRecyclerView = findViewById(R.id.search_recycler_view)
|
||||
mRecyclerView?.visibility = View.GONE
|
||||
mRecyclerView?.layoutManager = LinearLayoutManager(context)
|
||||
mRecyclerView?.isNestedScrollingEnabled = false
|
||||
mRecyclerView?.itemAnimator = DefaultItemAnimator()
|
||||
mRecyclerView?.overScrollMode = View.OVER_SCROLL_NEVER
|
||||
mRecyclerView?.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
||||
override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
|
||||
super.onScrollStateChanged(recyclerView, newState)
|
||||
if (newState == RecyclerView.SCROLL_STATE_DRAGGING) {
|
||||
hideKeyboard()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
mViewShadow = findViewById(R.id.search_view_shadow)
|
||||
mViewShadow?.visibility = View.GONE
|
||||
|
||||
mViewDivider = findViewById(R.id.search_view_divider)
|
||||
mViewDivider?.visibility = View.GONE
|
||||
|
||||
mViewAnim = findViewById(R.id.search_view_anim)
|
||||
mViewAnim?.visibility = View.GONE
|
||||
|
||||
mMaterialCardView = findViewById(R.id.search_material_card_view)
|
||||
margins = Margins.NO_FOCUS
|
||||
|
||||
isClickable = true
|
||||
isFocusable = true
|
||||
isFocusableInTouchMode = true
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
fun setNavigationIconVisibility(visibility: Int) {
|
||||
mImageViewNavigation?.visibility = visibility
|
||||
}
|
||||
|
||||
fun setNavigationIconImageResource(@DrawableRes resId: Int) {
|
||||
mImageViewNavigation?.setImageResource(resId)
|
||||
}
|
||||
|
||||
fun setNavigationIconImageDrawable(@Nullable drawable: Drawable?) {
|
||||
mImageViewNavigation?.setImageDrawable(drawable)
|
||||
}
|
||||
|
||||
fun setNavigationIconColorFilter(color: Int) {
|
||||
mImageViewNavigation?.setColorFilter(color)
|
||||
}
|
||||
|
||||
fun setNavigationIconColorFilter(color: Int, mode: PorterDuff.Mode) {
|
||||
mImageViewNavigation?.setColorFilter(color, mode)
|
||||
}
|
||||
|
||||
fun setNavigationIconColorFilter(cf: ColorFilter?) {
|
||||
mImageViewNavigation?.colorFilter = cf
|
||||
}
|
||||
|
||||
fun clearNavigationIconColorFilter() {
|
||||
mImageViewNavigation?.clearColorFilter()
|
||||
}
|
||||
|
||||
fun setNavigationIconContentDescription(contentDescription: CharSequence) {
|
||||
mImageViewNavigation?.contentDescription = contentDescription
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
fun setMicIconImageResource(@DrawableRes resId: Int) {
|
||||
mImageViewMic?.setImageResource(resId)
|
||||
}
|
||||
|
||||
fun setMicIconImageDrawable(@Nullable drawable: Drawable?) {
|
||||
mImageViewMic?.setImageDrawable(drawable)
|
||||
}
|
||||
|
||||
fun setMicIconColorFilter(color: Int) {
|
||||
mImageViewMic?.setColorFilter(color)
|
||||
}
|
||||
|
||||
fun setMicIconColorFilter(color: Int, mode: PorterDuff.Mode) {
|
||||
mImageViewMic?.setColorFilter(color, mode)
|
||||
}
|
||||
|
||||
fun setMicIconColorFilter(cf: ColorFilter?) {
|
||||
mImageViewMic?.colorFilter = cf
|
||||
}
|
||||
|
||||
fun clearMicIconColorFilter() {
|
||||
mImageViewMic?.clearColorFilter()
|
||||
}
|
||||
|
||||
fun setMicIconContentDescription(contentDescription: CharSequence) {
|
||||
mImageViewMic?.contentDescription = contentDescription
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
fun setMenuIconImageResource(@DrawableRes resId: Int) {
|
||||
mImageViewMenu?.setImageResource(resId)
|
||||
}
|
||||
|
||||
fun setMenuIconImageDrawable(@Nullable drawable: Drawable?) {
|
||||
mImageViewMenu?.setImageDrawable(drawable)
|
||||
}
|
||||
|
||||
fun setMenuIconColorFilter(color: Int) {
|
||||
mImageViewMenu?.setColorFilter(color)
|
||||
}
|
||||
|
||||
fun setMenuIconColorFilter(color: Int, mode: PorterDuff.Mode) {
|
||||
mImageViewMenu?.setColorFilter(color, mode)
|
||||
}
|
||||
|
||||
fun setMenuIconColorFilter(cf: ColorFilter?) {
|
||||
mImageViewMenu?.colorFilter = cf
|
||||
}
|
||||
|
||||
fun clearMenuIconColorFilter() {
|
||||
mImageViewMenu?.clearColorFilter()
|
||||
}
|
||||
|
||||
fun setMenuIconContentDescription(contentDescription: CharSequence) {
|
||||
mImageViewMenu?.contentDescription = contentDescription
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
fun setClearIconImageResource(@DrawableRes resId: Int) {
|
||||
mImageViewClear?.setImageResource(resId)
|
||||
}
|
||||
|
||||
fun setClearIconImageDrawable(@Nullable drawable: Drawable?) {
|
||||
mImageViewClear?.setImageDrawable(drawable)
|
||||
}
|
||||
|
||||
fun setClearIconColorFilter(color: Int) {
|
||||
mImageViewClear?.setColorFilter(color)
|
||||
}
|
||||
|
||||
fun setClearIconColorFilter(color: Int, mode: PorterDuff.Mode) {
|
||||
mImageViewClear?.setColorFilter(color, mode)
|
||||
}
|
||||
|
||||
fun setClearIconColorFilter(cf: ColorFilter?) {
|
||||
mImageViewClear?.colorFilter = cf
|
||||
}
|
||||
|
||||
fun clearClearIconColorFilter() {
|
||||
mImageViewClear?.clearColorFilter()
|
||||
}
|
||||
|
||||
fun setClearIconContentDescription(contentDescription: CharSequence) {
|
||||
mImageViewClear?.contentDescription = contentDescription
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
fun setAdapterLayoutManager(@Nullable layout: RecyclerView.LayoutManager?) {
|
||||
mRecyclerView?.layoutManager = layout
|
||||
}
|
||||
|
||||
// only when height == match_parent
|
||||
fun setAdapterHasFixedSize(hasFixedSize: Boolean) {
|
||||
mRecyclerView?.setHasFixedSize(hasFixedSize)
|
||||
}
|
||||
|
||||
fun addAdapterItemDecoration(@NonNull decor: RecyclerView.ItemDecoration) {
|
||||
mRecyclerView?.addItemDecoration(decor)
|
||||
}
|
||||
|
||||
fun removeAdapterItemDecoration(@NonNull decor: RecyclerView.ItemDecoration) {
|
||||
mRecyclerView?.removeItemDecoration(decor)
|
||||
}
|
||||
|
||||
fun setAdapter(@Nullable adapter: RecyclerView.Adapter<*>?) {
|
||||
mRecyclerView?.adapter = adapter
|
||||
}
|
||||
|
||||
@Nullable
|
||||
fun getAdapter(): RecyclerView.Adapter<*>? {
|
||||
return mRecyclerView?.adapter
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
/**
|
||||
* Typeface.NORMAL
|
||||
* Typeface.BOLD
|
||||
* Typeface.ITALIC
|
||||
* Typeface.BOLD_ITALIC
|
||||
*
|
||||
* Typeface.DEFAULT
|
||||
* Typeface.DEFAULT_BOLD
|
||||
* Typeface.SANS_SERIF
|
||||
* Typeface.SERIF
|
||||
* Typeface.MONOSPACE
|
||||
*
|
||||
* Typeface.create(Typeface.NORMAL, Typeface.DEFAULT)
|
||||
*/
|
||||
fun setTextTypeface(@Nullable tf: Typeface?) {
|
||||
mSearchEditText?.typeface = tf
|
||||
}
|
||||
|
||||
fun getTextTypeface(): Typeface? {
|
||||
return mSearchEditText?.typeface
|
||||
}
|
||||
|
||||
fun setTextInputType(type: Int) {
|
||||
mSearchEditText?.inputType = type
|
||||
}
|
||||
|
||||
fun getTextInputType(): Int? {
|
||||
return mSearchEditText?.inputType
|
||||
}
|
||||
|
||||
fun setTextImeOptions(imeOptions: Int) {
|
||||
mSearchEditText?.imeOptions = imeOptions
|
||||
}
|
||||
|
||||
fun getTextImeOptions(): Int? {
|
||||
return mSearchEditText?.imeOptions
|
||||
}
|
||||
|
||||
fun setTextQuery(query: CharSequence?, submit: Boolean) {
|
||||
mSearchEditText?.setText(query)
|
||||
if (query != null) {
|
||||
mSearchEditText?.setSelection(mSearchEditText?.length()!!)
|
||||
}
|
||||
if (submit && !TextUtils.isEmpty(query)) {
|
||||
onSubmitQuery()
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
fun getTextQuery(): CharSequence? {
|
||||
return mSearchEditText?.text
|
||||
}
|
||||
|
||||
fun setTextHint(hint: CharSequence?) {
|
||||
mSearchEditText?.hint = hint
|
||||
}
|
||||
|
||||
fun getTextHint(): CharSequence? {
|
||||
return mSearchEditText?.hint
|
||||
}
|
||||
|
||||
fun setTextColor(@ColorInt color: Int) {
|
||||
mSearchEditText?.setTextColor(color)
|
||||
}
|
||||
|
||||
fun setTextSize(size: Float) {
|
||||
mSearchEditText?.textSize = size
|
||||
}
|
||||
|
||||
fun setTextGravity(gravity: Int) {
|
||||
mSearchEditText?.gravity = gravity
|
||||
}
|
||||
|
||||
fun setTextHint(@StringRes resid: Int) {
|
||||
mSearchEditText?.setHint(resid)
|
||||
}
|
||||
|
||||
fun setTextHintColor(@ColorInt color: Int) {
|
||||
mSearchEditText?.setHintTextColor(color)
|
||||
}
|
||||
|
||||
fun setClearFocusOnBackPressed(clearFocusOnBackPressed: Boolean) {
|
||||
mSearchEditText?.clearFocusOnBackPressed = clearFocusOnBackPressed
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
override fun setBackgroundColor(@ColorInt color: Int) {
|
||||
mMaterialCardView?.setCardBackgroundColor(color)
|
||||
}
|
||||
|
||||
fun setBackgroundColor(@Nullable color: ColorStateList?) {
|
||||
mMaterialCardView?.setCardBackgroundColor(color)
|
||||
}
|
||||
|
||||
override fun setElevation(elevation: Float) {
|
||||
mMaterialCardView?.cardElevation = elevation
|
||||
mMaterialCardView?.maxCardElevation = elevation
|
||||
}
|
||||
|
||||
override fun getElevation(): Float {
|
||||
return mMaterialCardView?.elevation!!
|
||||
}
|
||||
|
||||
fun setBackgroundRadius(radius: Float) {
|
||||
mMaterialCardView?.radius = radius
|
||||
}
|
||||
|
||||
fun getBackgroundRadius(): Float {
|
||||
return mMaterialCardView?.radius!!
|
||||
}
|
||||
|
||||
fun setBackgroundRippleColor(@ColorRes rippleColorResourceId: Int) {
|
||||
mMaterialCardView?.setRippleColorResource(rippleColorResourceId)
|
||||
}
|
||||
|
||||
fun setBackgroundRippleColorResource(@Nullable rippleColor: ColorStateList?) {
|
||||
mMaterialCardView?.rippleColor = rippleColor
|
||||
}
|
||||
|
||||
fun setBackgroundStrokeColor(@ColorInt strokeColor: Int) {
|
||||
mMaterialCardView?.strokeColor = strokeColor
|
||||
}
|
||||
|
||||
fun setBackgroundStrokeColor(strokeColor: ColorStateList) {
|
||||
mMaterialCardView?.setStrokeColor(strokeColor)
|
||||
}
|
||||
|
||||
fun setBackgroundStrokeWidth(@Dimension strokeWidth: Int) {
|
||||
mMaterialCardView?.strokeWidth = strokeWidth
|
||||
}
|
||||
|
||||
@Dimension
|
||||
fun getBackgroundStrokeWidth(): Int {
|
||||
return mMaterialCardView?.strokeWidth!!
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
fun setDividerColor(@ColorInt color: Int) {
|
||||
mViewDivider?.setBackgroundColor(color)
|
||||
}
|
||||
|
||||
fun setShadowColor(@ColorInt color: Int) {
|
||||
mViewShadow?.setBackgroundColor(color)
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
fun setOnFocusChangeListener(listener: OnFocusChangeListener) {
|
||||
mOnFocusChangeListener = listener
|
||||
}
|
||||
|
||||
fun setOnQueryTextListener(listener: OnQueryTextListener) {
|
||||
mOnQueryTextListener = listener
|
||||
}
|
||||
|
||||
fun setOnNavigationClickListener(listener: OnNavigationClickListener) {
|
||||
mOnNavigationClickListener = listener
|
||||
}
|
||||
|
||||
fun setOnMicClickListener(listener: OnMicClickListener) {
|
||||
mOnMicClickListener = listener
|
||||
}
|
||||
|
||||
fun setOnMenuClickListener(listener: OnMenuClickListener) {
|
||||
mOnMenuClickListener = listener
|
||||
}
|
||||
|
||||
fun setOnClearClickListener(listener: OnClearClickListener) {
|
||||
mOnClearClickListener = listener
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
fun showKeyboard() {
|
||||
if (!isInEditMode) {
|
||||
val inputMethodManager =
|
||||
context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
inputMethodManager.showSoftInput(
|
||||
mSearchEditText,
|
||||
InputMethodManager.RESULT_UNCHANGED_SHOWN
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fun hideKeyboard() {
|
||||
if (!isInEditMode) {
|
||||
val inputMethodManager =
|
||||
context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
inputMethodManager.hideSoftInputFromWindow(
|
||||
windowToken,
|
||||
InputMethodManager.RESULT_UNCHANGED_SHOWN
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
protected fun setLayoutHeight(height: Int) {
|
||||
val params = mLinearLayout?.layoutParams
|
||||
params?.height = height
|
||||
params?.width = ViewGroup.LayoutParams.MATCH_PARENT
|
||||
mLinearLayout?.layoutParams = params
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
private fun onTextChanged(newText: CharSequence) {
|
||||
if (!TextUtils.isEmpty(newText)) {
|
||||
mImageViewMic?.visibility = View.GONE
|
||||
mImageViewClear?.visibility = View.VISIBLE
|
||||
} else {
|
||||
mImageViewClear?.visibility = View.GONE
|
||||
if (mSearchEditText?.hasFocus()!!) {
|
||||
mImageViewMic?.visibility = View.VISIBLE
|
||||
} else {
|
||||
mImageViewMic?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
if (mOnQueryTextListener != null) {
|
||||
mOnQueryTextListener?.onQueryTextChange(newText)
|
||||
}
|
||||
}
|
||||
|
||||
private fun onSubmitQuery() {
|
||||
val query = mSearchEditText?.text
|
||||
if (query != null && TextUtils.getTrimmedLength(query) > 0) {
|
||||
if (mOnQueryTextListener == null || !mOnQueryTextListener!!.onQueryTextSubmit(query.toString())) {
|
||||
mSearchEditText?.text = query
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
override fun onSaveInstanceState(): Parcelable? {
|
||||
val superState = super.onSaveInstanceState()
|
||||
val ss = SearchViewSavedState(superState!!)
|
||||
if (mSearchEditText?.text!!.isNotEmpty()) {
|
||||
ss.query = mSearchEditText?.text
|
||||
}
|
||||
ss.hasFocus = mSearchEditText?.hasFocus()!!
|
||||
return ss
|
||||
}
|
||||
|
||||
override fun onRestoreInstanceState(state: Parcelable?) {
|
||||
if (state !is SearchViewSavedState) {
|
||||
super.onRestoreInstanceState(state)
|
||||
return
|
||||
}
|
||||
super.onRestoreInstanceState(state.superState)
|
||||
if (state.hasFocus) {
|
||||
mSearchEditText?.requestFocus()
|
||||
}
|
||||
if (state.query != null) {
|
||||
setTextQuery(state.query, false)
|
||||
}
|
||||
requestLayout()
|
||||
}
|
||||
|
||||
override fun requestFocus(direction: Int, previouslyFocusedRect: Rect?): Boolean {
|
||||
return if (!isFocusable) {
|
||||
false
|
||||
} else {
|
||||
mSearchEditText?.requestFocus(direction, previouslyFocusedRect)!!
|
||||
}
|
||||
}
|
||||
|
||||
override fun clearFocus() {
|
||||
super.clearFocus()
|
||||
mSearchEditText?.clearFocus()
|
||||
}
|
||||
|
||||
override fun onClick(view: View?) {
|
||||
if (view === mImageViewNavigation) {
|
||||
if (mOnNavigationClickListener != null) {
|
||||
mOnNavigationClickListener?.onNavigationClick(mSearchEditText?.hasFocus()!!)
|
||||
}
|
||||
} else if (view === mImageViewMic) {
|
||||
if (mOnMicClickListener != null) {
|
||||
mOnMicClickListener?.onMicClick()
|
||||
}
|
||||
} else if (view === mImageViewMenu) {
|
||||
if (mOnMenuClickListener != null) {
|
||||
mOnMenuClickListener?.onMenuClick()
|
||||
}
|
||||
} else if (view === mImageViewClear) {
|
||||
if (mSearchEditText?.text!!.isNotEmpty()) {
|
||||
mSearchEditText?.text!!.clear()
|
||||
}
|
||||
if (mOnClearClickListener != null) {
|
||||
mOnClearClickListener?.onClearClick()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
interface OnFocusChangeListener {
|
||||
|
||||
fun onFocusChange(hasFocus: Boolean)
|
||||
}
|
||||
|
||||
interface OnQueryTextListener {
|
||||
|
||||
fun onQueryTextChange(newText: CharSequence): Boolean
|
||||
|
||||
fun onQueryTextSubmit(query: CharSequence): Boolean
|
||||
}
|
||||
|
||||
interface OnNavigationClickListener {
|
||||
|
||||
fun onNavigationClick(hasFocus: Boolean)
|
||||
}
|
||||
|
||||
interface OnMicClickListener {
|
||||
|
||||
fun onMicClick()
|
||||
}
|
||||
|
||||
interface OnMenuClickListener {
|
||||
|
||||
fun onMenuClick()
|
||||
}
|
||||
|
||||
interface OnClearClickListener {
|
||||
|
||||
fun onClearClick()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/*https://github.com/lapism/search*/
|
||||
|
||||
package org.koitharu.kotatsu.base.ui.widgets.search.internal
|
||||
|
||||
import android.os.Parcel
|
||||
import android.os.Parcelable
|
||||
import android.text.TextUtils
|
||||
import android.view.View
|
||||
|
||||
internal class SearchViewSavedState(superState: Parcelable) : View.BaseSavedState(superState) {
|
||||
|
||||
var query: CharSequence? = null
|
||||
var hasFocus: Boolean = false
|
||||
|
||||
override fun writeToParcel(out: Parcel, flags: Int) {
|
||||
super.writeToParcel(out, flags)
|
||||
TextUtils.writeToParcel(query, out, flags)
|
||||
out.writeInt(if (hasFocus) 1 else 0)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package org.koitharu.kotatsu.base.ui.widgets.search.util
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.speech.RecognizerIntent
|
||||
|
||||
object SearchUtils {
|
||||
|
||||
const val SPEECH_REQUEST_CODE = 300
|
||||
|
||||
@JvmStatic
|
||||
fun setVoiceSearch(activity: Activity, text: String) {
|
||||
val intent = Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH)
|
||||
// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
intent.putExtra(
|
||||
RecognizerIntent.EXTRA_LANGUAGE_MODEL,
|
||||
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM
|
||||
)
|
||||
intent.putExtra(RecognizerIntent.EXTRA_PROMPT, text)
|
||||
intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 1)
|
||||
|
||||
activity.startActivityForResult(
|
||||
intent,
|
||||
SPEECH_REQUEST_CODE
|
||||
)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun isVoiceSearchAvailable(context: Context): Boolean {
|
||||
val pm = context.packageManager
|
||||
val activities =
|
||||
pm.queryIntentActivities(Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0)
|
||||
return activities.size != 0
|
||||
}
|
||||
|
||||
}
|
||||
@@ -61,16 +61,42 @@ class DetailsFragment : BaseFragment<FragmentDetailsBinding>(), View.OnClickList
|
||||
.enqueueWith(coil)
|
||||
textViewTitle.text = manga.title
|
||||
textViewSubtitle.textAndVisible = manga.altTitle
|
||||
textViewAuthor.textAndVisible = manga.author
|
||||
textViewSource.text = manga.source.title
|
||||
textViewDescription.text =
|
||||
manga.description?.parseAsHtml()?.takeUnless(Spanned::isBlank)
|
||||
?: getString(R.string.no_description)
|
||||
if (manga.rating == Manga.NO_RATING) {
|
||||
ratingBar.isVisible = false
|
||||
if (manga.chapters?.isNotEmpty() == true) {
|
||||
chaptersContainer.isVisible = true
|
||||
textViewChapters.text = manga.chapters.let {
|
||||
resources.getQuantityString(
|
||||
R.plurals.chapters,
|
||||
it.size,
|
||||
manga.chapters.size
|
||||
)
|
||||
}
|
||||
} else {
|
||||
ratingBar.progress = (ratingBar.max * manga.rating).roundToInt()
|
||||
ratingBar.isVisible = true
|
||||
chaptersContainer.isVisible = false
|
||||
}
|
||||
imageViewFavourite.setOnClickListener(this@DetailsFragment)
|
||||
if (manga.rating == Manga.NO_RATING) {
|
||||
ratingContainer.isVisible = false
|
||||
} else {
|
||||
textViewRating.text = String.format("%.1f", manga.rating * 5)
|
||||
ratingContainer.isVisible = true
|
||||
}
|
||||
val file = manga.url.toUri().toFileOrNull()
|
||||
if (file != null) {
|
||||
viewLifecycleScope.launch {
|
||||
val size = withContext(Dispatchers.IO) {
|
||||
file.length()
|
||||
}
|
||||
textViewSize.text = FileSizeUtils.formatBytes(requireContext(), size)
|
||||
}
|
||||
sizeContainer.isVisible = true
|
||||
} else {
|
||||
sizeContainer.isVisible = false
|
||||
}
|
||||
buttonFavorite.setOnClickListener(this@DetailsFragment)
|
||||
buttonRead.setOnClickListener(this@DetailsFragment)
|
||||
buttonRead.setOnLongClickListener(this@DetailsFragment)
|
||||
buttonRead.isEnabled = !manga.chapters.isNullOrEmpty()
|
||||
@@ -91,13 +117,13 @@ class DetailsFragment : BaseFragment<FragmentDetailsBinding>(), View.OnClickList
|
||||
}
|
||||
|
||||
private fun onFavouriteChanged(isFavourite: Boolean) {
|
||||
binding.imageViewFavourite.setImageResource(
|
||||
with(binding.buttonFavorite) {
|
||||
if (isFavourite) {
|
||||
R.drawable.ic_heart
|
||||
this.setIconResource(R.drawable.ic_heart)
|
||||
} else {
|
||||
R.drawable.ic_heart_outline
|
||||
this.setIconResource(R.drawable.ic_heart_outline)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun onLoadingStateChanged(isLoading: Boolean) {
|
||||
@@ -107,7 +133,7 @@ class DetailsFragment : BaseFragment<FragmentDetailsBinding>(), View.OnClickList
|
||||
override fun onClick(v: View) {
|
||||
val manga = viewModel.manga.value
|
||||
when (v.id) {
|
||||
R.id.imageView_favourite -> {
|
||||
R.id.button_favorite -> {
|
||||
FavouriteCategoriesDialog.show(childFragmentManager, manga ?: return)
|
||||
}
|
||||
R.id.button_read -> {
|
||||
@@ -163,31 +189,10 @@ class DetailsFragment : BaseFragment<FragmentDetailsBinding>(), View.OnClickList
|
||||
tagsJob?.cancel()
|
||||
tagsJob = viewLifecycleScope.launch {
|
||||
val tags = ArrayList<ChipsView.ChipModel>(manga.tags.size + 2)
|
||||
if (manga.author != null) {
|
||||
tags += ChipsView.ChipModel(
|
||||
title = manga.author,
|
||||
icon = R.drawable.ic_chip_user
|
||||
)
|
||||
}
|
||||
for (tag in manga.tags) {
|
||||
tags += ChipsView.ChipModel(
|
||||
title = tag.title,
|
||||
icon = R.drawable.ic_chip_tag
|
||||
)
|
||||
}
|
||||
val file = manga.url.toUri().toFileOrNull()
|
||||
if (file != null) {
|
||||
val size = withContext(Dispatchers.IO) {
|
||||
file.length()
|
||||
}
|
||||
tags += ChipsView.ChipModel(
|
||||
title = FileSizeUtils.formatBytes(requireContext(), size),
|
||||
icon = R.drawable.ic_chip_storage
|
||||
)
|
||||
} else {
|
||||
tags += ChipsView.ChipModel(
|
||||
title = manga.source.title,
|
||||
icon = R.drawable.ic_chip_web
|
||||
icon = 0
|
||||
)
|
||||
}
|
||||
binding.chipsTags.setChips(tags)
|
||||
|
||||
@@ -4,16 +4,15 @@ import android.os.Bundle
|
||||
import android.view.*
|
||||
import androidx.annotation.CallSuper
|
||||
import androidx.appcompat.widget.PopupMenu
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.graphics.Insets
|
||||
import androidx.core.view.GravityCompat
|
||||
import androidx.core.view.isGone
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.core.view.updatePadding
|
||||
import androidx.drawerlayout.widget.DrawerLayout
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import kotlinx.coroutines.launch
|
||||
@@ -81,6 +80,10 @@ abstract class MangaListFragment : BaseFragment<FragmentListBinding>(),
|
||||
addOnScrollListener(paginationListener!!)
|
||||
}
|
||||
with(binding.swipeRefreshLayout) {
|
||||
setColorSchemeColors(
|
||||
ContextCompat.getColor(context, R.color.color_primary),
|
||||
ContextCompat.getColor(context, R.color.color_primary_variant)
|
||||
)
|
||||
setOnRefreshListener(this@MangaListFragment)
|
||||
isEnabled = isSwipeRefreshEnabled
|
||||
}
|
||||
@@ -246,13 +249,9 @@ abstract class MangaListFragment : BaseFragment<FragmentListBinding>(),
|
||||
when (mode) {
|
||||
ListMode.LIST -> {
|
||||
layoutManager = LinearLayoutManager(context)
|
||||
addItemDecoration(
|
||||
DividerItemDecoration(
|
||||
context,
|
||||
RecyclerView.VERTICAL
|
||||
)
|
||||
)
|
||||
updatePadding(left = 0, right = 0)
|
||||
val spacing = resources.getDimensionPixelOffset(R.dimen.list_spacing)
|
||||
addItemDecoration(SpacingItemDecoration(spacing))
|
||||
updatePadding(left = spacing, right = spacing)
|
||||
}
|
||||
ListMode.DETAILED_LIST -> {
|
||||
layoutManager = LinearLayoutManager(context)
|
||||
|
||||
@@ -6,7 +6,6 @@ import org.koitharu.kotatsu.core.exceptions.CloudFlareProtectedException
|
||||
import org.koitharu.kotatsu.core.exceptions.resolve.ResolvableException
|
||||
import org.koitharu.kotatsu.core.model.Manga
|
||||
import org.koitharu.kotatsu.core.prefs.ListMode
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
fun Manga.toListModel() = MangaListModel(
|
||||
id = id,
|
||||
@@ -20,7 +19,7 @@ fun Manga.toListDetailedModel() = MangaListDetailedModel(
|
||||
id = id,
|
||||
title = title,
|
||||
subtitle = altTitle,
|
||||
rating = if (rating == Manga.NO_RATING) null else "${(rating * 10).roundToInt()}/10",
|
||||
rating = if (rating == Manga.NO_RATING) null else String.format("%.1f", rating * 5),
|
||||
tags = tags.joinToString(", ") { it.title },
|
||||
coverUrl = coverUrl,
|
||||
manga = this
|
||||
|
||||
@@ -6,10 +6,7 @@ import android.content.res.Configuration
|
||||
import android.graphics.Color
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.*
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.core.graphics.Insets
|
||||
@@ -17,6 +14,7 @@ import androidx.core.view.*
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentTransaction
|
||||
import androidx.fragment.app.commit
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.swiperefreshlayout.widget.CircularProgressDrawable
|
||||
import com.google.android.material.navigation.NavigationView
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
@@ -28,6 +26,7 @@ import org.koitharu.kotatsu.core.model.Manga
|
||||
import org.koitharu.kotatsu.core.model.MangaSource
|
||||
import org.koitharu.kotatsu.core.prefs.AppSection
|
||||
import org.koitharu.kotatsu.databinding.ActivityMainBinding
|
||||
import org.koitharu.kotatsu.databinding.NavigationHeaderBinding
|
||||
import org.koitharu.kotatsu.details.ui.DetailsActivity
|
||||
import org.koitharu.kotatsu.favourites.ui.FavouritesContainerFragment
|
||||
import org.koitharu.kotatsu.history.ui.HistoryListFragment
|
||||
@@ -46,6 +45,7 @@ import org.koitharu.kotatsu.settings.onboard.OnboardDialogFragment
|
||||
import org.koitharu.kotatsu.tracker.ui.FeedFragment
|
||||
import org.koitharu.kotatsu.tracker.work.TrackWorker
|
||||
import org.koitharu.kotatsu.utils.ext.getDisplayMessage
|
||||
import org.koitharu.kotatsu.utils.ext.navigationItemBackground
|
||||
import org.koitharu.kotatsu.utils.ext.resolveDp
|
||||
|
||||
class MainActivity : BaseActivity<ActivityMainBinding>(),
|
||||
@@ -57,12 +57,14 @@ class MainActivity : BaseActivity<ActivityMainBinding>(),
|
||||
mode = LazyThreadSafetyMode.NONE
|
||||
)
|
||||
|
||||
private lateinit var navHeaderBinding: NavigationHeaderBinding
|
||||
private lateinit var drawerToggle: ActionBarDrawerToggle
|
||||
private var searchUi: SearchUI? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(ActivityMainBinding.inflate(layoutInflater))
|
||||
navHeaderBinding = NavigationHeaderBinding.inflate(layoutInflater)
|
||||
drawerToggle = ActionBarDrawerToggle(
|
||||
this,
|
||||
binding.drawer,
|
||||
@@ -73,7 +75,18 @@ class MainActivity : BaseActivity<ActivityMainBinding>(),
|
||||
binding.drawer.addDrawerListener(drawerToggle)
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
|
||||
binding.navigationView.setNavigationItemSelectedListener(this)
|
||||
binding.navigationView.apply {
|
||||
val menuView = findViewById<RecyclerView>(com.google.android.material.R.id.design_navigation_view)
|
||||
navHeaderBinding.root.setOnApplyWindowInsetsListener { v, insets ->
|
||||
v.updatePadding(top = insets.systemWindowInsetTop)
|
||||
// NavigationView doesn't dispatch insets to the menu view, so pad the bottom here.
|
||||
menuView.updatePadding(bottom = insets.systemWindowInsetBottom)
|
||||
insets
|
||||
}
|
||||
addHeaderView(navHeaderBinding.root)
|
||||
itemBackground = navigationItemBackground(context)
|
||||
setNavigationItemSelectedListener(this@MainActivity)
|
||||
}
|
||||
|
||||
with(binding.fab) {
|
||||
imageTintList = ColorStateList.valueOf(Color.WHITE)
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.koitharu.kotatsu.reader.ui.pager.BaseReader
|
||||
import org.koitharu.kotatsu.reader.ui.pager.ReaderUiState
|
||||
import org.koitharu.kotatsu.reader.ui.pager.reversed.ReversedReaderFragment
|
||||
import org.koitharu.kotatsu.reader.ui.pager.standard.PagerReaderFragment
|
||||
import org.koitharu.kotatsu.reader.ui.pager.wetoon.WebtoonReaderFragment
|
||||
import org.koitharu.kotatsu.reader.ui.pager.webtoon.WebtoonReaderFragment
|
||||
import org.koitharu.kotatsu.reader.ui.thumbnails.OnPageSelectListener
|
||||
import org.koitharu.kotatsu.reader.ui.thumbnails.PagesThumbnailsSheet
|
||||
import org.koitharu.kotatsu.utils.GridTouchHelper
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.koitharu.kotatsu.reader.ui.pager.wetoon
|
||||
package org.koitharu.kotatsu.reader.ui.pager.webtoon
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.koitharu.kotatsu.reader.ui.pager.wetoon
|
||||
package org.koitharu.kotatsu.reader.ui.pager.webtoon
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.koitharu.kotatsu.reader.ui.pager.wetoon
|
||||
package org.koitharu.kotatsu.reader.ui.pager.webtoon
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.koitharu.kotatsu.reader.ui.pager.wetoon
|
||||
package org.koitharu.kotatsu.reader.ui.pager.webtoon
|
||||
|
||||
import android.net.Uri
|
||||
import android.view.View
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.koitharu.kotatsu.reader.ui.pager.wetoon
|
||||
package org.koitharu.kotatsu.reader.ui.pager.webtoon
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.PointF
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.koitharu.kotatsu.reader.ui.pager.wetoon
|
||||
package org.koitharu.kotatsu.reader.ui.pager.webtoon
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.koitharu.kotatsu.reader.ui.pager.wetoon
|
||||
package org.koitharu.kotatsu.reader.ui.pager.webtoon
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
@@ -47,9 +47,6 @@ class FeedFragment : BaseFragment<FragmentFeedBinding>(), PaginationScrollListen
|
||||
feedAdapter = FeedAdapter(get(), viewLifecycleOwner, this)
|
||||
with(binding.recyclerView) {
|
||||
adapter = feedAdapter
|
||||
addItemDecoration(
|
||||
SpacingItemDecoration(resources.getDimensionPixelOffset(R.dimen.grid_spacing))
|
||||
)
|
||||
setHasFixedSize(true)
|
||||
addOnScrollListener(PaginationScrollListener(4, this@FeedFragment))
|
||||
}
|
||||
@@ -134,7 +131,7 @@ class FeedFragment : BaseFragment<FragmentFeedBinding>(), PaginationScrollListen
|
||||
return
|
||||
}
|
||||
val summaryText = getString(
|
||||
R.string.chapers_checking_progress,
|
||||
R.string.chapters_checking_progress,
|
||||
progress.value + 1,
|
||||
progress.total
|
||||
)
|
||||
|
||||
@@ -37,7 +37,7 @@ fun feedItemAD(
|
||||
.lifecycle(lifecycleOwner)
|
||||
.enqueueWith(coil)
|
||||
binding.textViewTitle.text = item.title
|
||||
binding.textViewSubtitle.text = item.subtitle
|
||||
binding.badge.text = item.subtitle
|
||||
binding.textViewChapters.text = item.chapters
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
package org.koitharu.kotatsu.tracker.ui.model
|
||||
|
||||
import android.content.res.Resources
|
||||
import android.text.format.DateUtils
|
||||
import org.koitharu.kotatsu.R
|
||||
import org.koitharu.kotatsu.core.model.TrackingLogItem
|
||||
import org.koitharu.kotatsu.utils.ext.formatRelative
|
||||
|
||||
fun TrackingLogItem.toFeedItem(resources: Resources): FeedItem {
|
||||
val chaptersString = if (chapters.size > MAX_CHAPTERS) {
|
||||
@@ -23,17 +21,7 @@ fun TrackingLogItem.toFeedItem(resources: Resources): FeedItem {
|
||||
id = id,
|
||||
imageUrl = manga.coverUrl,
|
||||
title = manga.title,
|
||||
subtitle = buildString {
|
||||
append(createdAt.formatRelative(DateUtils.DAY_IN_MILLIS))
|
||||
append(" ")
|
||||
append(
|
||||
resources.getQuantityString(
|
||||
R.plurals.new_chapters,
|
||||
chapters.size,
|
||||
chapters.size
|
||||
)
|
||||
)
|
||||
},
|
||||
subtitle = chapters.size.toString(),
|
||||
chapters = chaptersString,
|
||||
manga = manga
|
||||
)
|
||||
|
||||
@@ -12,6 +12,7 @@ import org.koitharu.kotatsu.core.network.CommonHeaders
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun ImageView.newImageRequest(url: String) = ImageRequest.Builder(context)
|
||||
.data(url)
|
||||
.crossfade(true)
|
||||
.target(this)
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
|
||||
21
app/src/main/java/org/koitharu/kotatsu/utils/ext/UiExt.kt
Normal file
21
app/src/main/java/org/koitharu/kotatsu/utils/ext/UiExt.kt
Normal file
@@ -0,0 +1,21 @@
|
||||
package org.koitharu.kotatsu.utils.ext
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.drawable.Drawable
|
||||
import androidx.appcompat.content.res.AppCompatResources
|
||||
import androidx.core.graphics.drawable.DrawableCompat
|
||||
import org.koitharu.kotatsu.R
|
||||
|
||||
fun navigationItemBackground(context: Context): Drawable? {
|
||||
// Need to inflate the drawable and CSL via AppCompatResources to work on Lollipop
|
||||
// From Google I/O repo (https://github.com/google/iosched)
|
||||
var background = AppCompatResources.getDrawable(context, R.drawable.navigation_item_background)
|
||||
if (background != null) {
|
||||
val tint = AppCompatResources.getColorStateList(
|
||||
context, R.color.navigation_item_background_tint
|
||||
)
|
||||
background = DrawableCompat.wrap(background.mutate())
|
||||
background.setTintList(tint)
|
||||
}
|
||||
return background
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="?attr/colorSecondary" android:alpha="0.12" android:state_checked="true" />
|
||||
<item android:color="@android:color/transparent" />
|
||||
</selector>
|
||||
4
app/src/main/res/color/selector_overlay.xml
Normal file
4
app/src/main/res/color/selector_overlay.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:alpha="0.2" android:color="?attr/colorAccent" />
|
||||
</selector>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="?attr/colorPrimary" android:state_checked="true"/>
|
||||
<item android:alpha="0.12" android:color="?attr/colorOnSurface" android:state_checked="false"/>
|
||||
</selector>
|
||||
BIN
app/src/main/res/drawable-hdpi/ic_totoro.webp
Normal file
BIN
app/src/main/res/drawable-hdpi/ic_totoro.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/drawable-mdpi/ic_totoro.webp
Normal file
BIN
app/src/main/res/drawable-mdpi/ic_totoro.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
11
app/src/main/res/drawable-w600dp/tab_indicator.xml
Normal file
11
app/src/main/res/drawable-w600dp/tab_indicator.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners
|
||||
android:topLeftRadius="3dp"
|
||||
android:topRightRadius="3dp"
|
||||
android:bottomLeftRadius="3dp"
|
||||
android:bottomRightRadius="3dp"/>
|
||||
<size android:height="3dp" />
|
||||
</shape>
|
||||
BIN
app/src/main/res/drawable-xhdpi/ic_totoro.webp
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_totoro.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_totoro.webp
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_totoro.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_totoro.webp
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/ic_totoro.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
6
app/src/main/res/drawable/badge.xml
Normal file
6
app/src/main/res/drawable/badge.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="32dp" />
|
||||
<solid android:color="@color/red_accent" />
|
||||
</shape>
|
||||
11
app/src/main/res/drawable/ic_arrow_back.xml
Normal file
11
app/src/main/res/drawable/ic_arrow_back.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:autoMirrored="true">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
|
||||
</vector>
|
||||
@@ -1,11 +1,10 @@
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M19,2L14,6.5V17.5L19,13V2M6.5,5C4.55,5 2.45,5.4 1,6.5V21.16C1,21.41 1.25,21.66 1.5,21.66C1.6,21.66 1.65,21.59 1.75,21.59C3.1,20.94 5.05,20.5 6.5,20.5C8.45,20.5 10.55,20.9 12,22C13.35,21.15 15.8,20.5 17.5,20.5C19.15,20.5 20.85,20.81 22.25,21.56C22.35,21.61 22.4,21.59 22.5,21.59C22.75,21.59 23,21.34 23,21.09V6.5C22.4,6.05 21.75,5.75 21,5.5V7.5L21,13V19C19.9,18.65 18.7,18.5 17.5,18.5C15.8,18.5 13.35,19.15 12,20V13L12,8.5V6.5C10.55,5.4 8.45,5 6.5,5V5Z" />
|
||||
</vector>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19 1L14 6V17L19 12.5V1M21 5V18.5C19.9 18.15 18.7 18 17.5 18C15.8 18 13.35 18.65 12 19.5V6C10.55 4.9 8.45 4.5 6.5 4.5C4.55 4.5 2.45 4.9 1 6V20.65C1 20.9 1.25 21.15 1.5 21.15C1.6 21.15 1.65 21.1 1.75 21.1C3.1 20.45 5.05 20 6.5 20C8.45 20 10.55 20.4 12 21.5C13.35 20.65 15.8 20 17.5 20C19.15 20 20.85 20.3 22.25 21.05C22.35 21.1 22.4 21.1 22.5 21.1C22.75 21.1 23 20.85 23 20.6V6C22.4 5.55 21.75 5.25 21 5M10 18.41C8.75 18.09 7.5 18 6.5 18C5.44 18 4.18 18.19 3 18.5V7.13C3.91 6.73 5.14 6.5 6.5 6.5C7.86 6.5 9.09 6.73 10 7.13V18.41Z"/>
|
||||
</vector>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="12dp"
|
||||
android:height="12dp"
|
||||
android:tint="?android:textColorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M18,4v16L6,20L6,8.83L10.83,4L18,4m0,-2h-8L4,8v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,4c0,-1.1 -0.9,-2 -2,-2zM9,7h2v4L9,11zM12,7h2v4h-2zM15,7h2v4h-2z" />
|
||||
</vector>
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="12dp"
|
||||
android:height="12dp"
|
||||
android:tint="?android:textColorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M21.41 11.58L12.41 2.58A2 2 0 0 0 11 2H4A2 2 0 0 0 2 4V11A2 2 0 0 0 2.59 12.42L11.59 21.42A2 2 0 0 0 13 22A2 2 0 0 0 14.41 21.41L21.41 14.41A2 2 0 0 0 22 13A2 2 0 0 0 21.41 11.58M13 20L4 11V4H11L20 13M6.5 5A1.5 1.5 0 1 1 5 6.5A1.5 1.5 0 0 1 6.5 5Z" />
|
||||
</vector>
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="12dp"
|
||||
android:height="12dp"
|
||||
android:tint="?android:textColorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,6A2,2 0 0,0 10,8A2,2 0 0,0 12,10A2,2 0 0,0 14,8A2,2 0 0,0 12,6M12,13C14.67,13 20,14.33 20,17V20H4V17C4,14.33 9.33,13 12,13M12,14.9C9.03,14.9 5.9,16.36 5.9,17V18.1H18.1V17C18.1,16.36 14.97,14.9 12,14.9Z" />
|
||||
</vector>
|
||||
@@ -1,11 +0,0 @@
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="12dp"
|
||||
android:height="12dp"
|
||||
android:tint="?android:textColorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM18.92,8h-2.95c-0.32,-1.25 -0.78,-2.45 -1.38,-3.56 1.84,0.63 3.37,1.91 4.33,3.56zM12,4.04c0.83,1.2 1.48,2.53 1.91,3.96h-3.82c0.43,-1.43 1.08,-2.76 1.91,-3.96zM4.26,14C4.1,13.36 4,12.69 4,12s0.1,-1.36 0.26,-2h3.38c-0.08,0.66 -0.14,1.32 -0.14,2s0.06,1.34 0.14,2L4.26,14zM5.08,16h2.95c0.32,1.25 0.78,2.45 1.38,3.56 -1.84,-0.63 -3.37,-1.9 -4.33,-3.56zM8.03,8L5.08,8c0.96,-1.66 2.49,-2.93 4.33,-3.56C8.81,5.55 8.35,6.75 8.03,8zM12,19.96c-0.83,-1.2 -1.48,-2.53 -1.91,-3.96h3.82c-0.43,1.43 -1.08,2.76 -1.91,3.96zM14.34,14L9.66,14c-0.09,-0.66 -0.16,-1.32 -0.16,-2s0.07,-1.35 0.16,-2h4.68c0.09,0.65 0.16,1.32 0.16,2s-0.07,1.34 -0.16,2zM14.59,19.56c0.6,-1.11 1.06,-2.31 1.38,-3.56h2.95c-0.96,1.65 -2.49,2.93 -4.33,3.56zM16.36,14c0.08,-0.66 0.14,-1.32 0.14,-2s-0.06,-1.34 -0.14,-2h3.38c0.16,0.64 0.26,1.31 0.26,2s-0.1,1.36 -0.26,2h-3.38z" />
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_clear.xml
Normal file
10
app/src/main/res/drawable/ic_clear.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12 19,6.41z"/>
|
||||
</vector>
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z" />
|
||||
</vector>
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:enterFadeDuration="@android:integer/config_mediumAnimTime"
|
||||
android:exitFadeDuration="@android:integer/config_mediumAnimTime">
|
||||
<item android:drawable="@drawable/ic_eye" android:state_checked="true" />
|
||||
<item android:drawable="@drawable/ic_eye_off" android:state_checked="false" />
|
||||
</selector>
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:fillAlpha="0.3"
|
||||
android:pathData="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
||||
</vector>
|
||||
@@ -2,7 +2,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
|
||||
10
app/src/main/res/drawable/ic_menu.xml
Normal file
10
app/src/main/res/drawable/ic_menu.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M3,18h18v-2L3,16v2zM3,13h18v-2L3,11v2zM3,6v2h18L21,6L3,6z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_mic_none.xml
Normal file
10
app/src/main/res/drawable/ic_mic_none.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,14c1.66,0 3,-1.34 3,-3L15,5c0,-1.66 -1.34,-3 -3,-3S9,3.34 9,5v6c0,1.66 1.34,3 3,3zM11,5c0,-0.55 0.45,-1 1,-1s1,0.45 1,1v6c0,0.55 -0.45,1 -1,1s-1,-0.45 -1,-1L11,5zM17,11c0,2.76 -2.24,5 -5,5s-5,-2.24 -5,-5L5,11c0,3.53 2.61,6.43 6,6.92L11,21h2v-3.08c3.39,-0.49 6,-3.39 6,-6.92h-2z"/>
|
||||
</vector>
|
||||
@@ -1,11 +1,10 @@
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z" />
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19.43,12.98c0.04,-0.32 0.07,-0.64 0.07,-0.98 0,-0.34 -0.03,-0.66 -0.07,-0.98l2.11,-1.65c0.19,-0.15 0.24,-0.42 0.12,-0.64l-2,-3.46c-0.09,-0.16 -0.26,-0.25 -0.44,-0.25 -0.06,0 -0.12,0.01 -0.17,0.03l-2.49,1c-0.52,-0.4 -1.08,-0.73 -1.69,-0.98l-0.38,-2.65C14.46,2.18 14.25,2 14,2h-4c-0.25,0 -0.46,0.18 -0.49,0.42l-0.38,2.65c-0.61,0.25 -1.17,0.59 -1.69,0.98l-2.49,-1c-0.06,-0.02 -0.12,-0.03 -0.18,-0.03 -0.17,0 -0.34,0.09 -0.43,0.25l-2,3.46c-0.13,0.22 -0.07,0.49 0.12,0.64l2.11,1.65c-0.04,0.32 -0.07,0.65 -0.07,0.98 0,0.33 0.03,0.66 0.07,0.98l-2.11,1.65c-0.19,0.15 -0.24,0.42 -0.12,0.64l2,3.46c0.09,0.16 0.26,0.25 0.44,0.25 0.06,0 0.12,-0.01 0.17,-0.03l2.49,-1c0.52,0.4 1.08,0.73 1.69,0.98l0.38,2.65c0.03,0.24 0.24,0.42 0.49,0.42h4c0.25,0 0.46,-0.18 0.49,-0.42l0.38,-2.65c0.61,-0.25 1.17,-0.59 1.69,-0.98l2.49,1c0.06,0.02 0.12,0.03 0.18,0.03 0.17,0 0.34,-0.09 0.43,-0.25l2,-3.46c0.12,-0.22 0.07,-0.49 -0.12,-0.64l-2.11,-1.65zM17.45,11.27c0.04,0.31 0.05,0.52 0.05,0.73 0,0.21 -0.02,0.43 -0.05,0.73l-0.14,1.13 0.89,0.7 1.08,0.84 -0.7,1.21 -1.27,-0.51 -1.04,-0.42 -0.9,0.68c-0.43,0.32 -0.84,0.56 -1.25,0.73l-1.06,0.43 -0.16,1.13 -0.2,1.35h-1.4l-0.19,-1.35 -0.16,-1.13 -1.06,-0.43c-0.43,-0.18 -0.83,-0.41 -1.23,-0.71l-0.91,-0.7 -1.06,0.43 -1.27,0.51 -0.7,-1.21 1.08,-0.84 0.89,-0.7 -0.14,-1.13c-0.03,-0.31 -0.05,-0.54 -0.05,-0.74s0.02,-0.43 0.05,-0.73l0.14,-1.13 -0.89,-0.7 -1.08,-0.84 0.7,-1.21 1.27,0.51 1.04,0.42 0.9,-0.68c0.43,-0.32 0.84,-0.56 1.25,-0.73l1.06,-0.43 0.16,-1.13 0.2,-1.35h1.39l0.19,1.35 0.16,1.13 1.06,0.43c0.43,0.18 0.83,0.41 1.23,0.71l0.91,0.7 1.06,-0.43 1.27,-0.51 0.7,1.21 -1.07,0.85 -0.89,0.7 0.14,1.13zM12,8c-2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4 -1.79,-4 -4,-4zM12,14c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2z"/>
|
||||
</vector>
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z"/>
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z" />
|
||||
</vector>
|
||||
|
||||
10
app/src/main/res/drawable/ic_star.xml
Normal file
10
app/src/main/res/drawable/ic_star.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="14dp"
|
||||
android:height="14dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21z"/>
|
||||
</vector>
|
||||
11
app/src/main/res/drawable/ic_star_manga_info.xml
Normal file
11
app/src/main/res/drawable/ic_star_manga_info.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21z" />
|
||||
</vector>
|
||||
@@ -1,13 +0,0 @@
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="16dp"
|
||||
android:height="16dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="?attr/colorAccent"
|
||||
android:pathData="M12,15.4l-3.76,2.27l1,-4.28l-3.32,-2.88l4.38,-0.38l1.7,-4.03l1.71,4.04l4.38,0.38l-3.32,2.88l1,4.28z" />
|
||||
<path
|
||||
android:fillColor="?android:textColorPrimary"
|
||||
android:pathData="M22,9.24l-7.19,-0.62L12,2L9.19,8.63L2,9.24l5.46,4.73L5.82,21L12,17.27L18.18,21l-1.63,-7.03L22,9.24zM12,15.4l-3.76,2.27l1,-4.28l-3.32,-2.88l4.38,-0.38L12,6.1l1.71,4.04l4.38,0.38l-3.32,2.88l1,4.28L12,15.4z" />
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_web.xml
Normal file
10
app/src/main/res/drawable/ic_web.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM18.92,8h-2.95c-0.32,-1.25 -0.78,-2.45 -1.38,-3.56 1.84,0.63 3.37,1.91 4.33,3.56zM12,4.04c0.83,1.2 1.48,2.53 1.91,3.96h-3.82c0.43,-1.43 1.08,-2.76 1.91,-3.96zM4.26,14C4.1,13.36 4,12.69 4,12s0.1,-1.36 0.26,-2h3.38c-0.08,0.66 -0.14,1.32 -0.14,2 0,0.68 0.06,1.34 0.14,2L4.26,14zM5.08,16h2.95c0.32,1.25 0.78,2.45 1.38,3.56 -1.84,-0.63 -3.37,-1.9 -4.33,-3.56zM8.03,8L5.08,8c0.96,-1.66 2.49,-2.93 4.33,-3.56C8.81,5.55 8.35,6.75 8.03,8zM12,19.96c-0.83,-1.2 -1.48,-2.53 -1.91,-3.96h3.82c-0.43,1.43 -1.08,2.76 -1.91,3.96zM14.34,14L9.66,14c-0.09,-0.66 -0.16,-1.32 -0.16,-2 0,-0.68 0.07,-1.35 0.16,-2h4.68c0.09,0.65 0.16,1.32 0.16,2 0,0.68 -0.07,1.34 -0.16,2zM14.59,19.56c0.6,-1.11 1.06,-2.31 1.38,-3.56h2.95c-0.96,1.65 -2.49,2.93 -4.33,3.56zM16.36,14c0.08,-0.66 0.14,-1.32 0.14,-2 0,-0.68 -0.06,-1.34 -0.14,-2h3.38c0.16,0.64 0.26,1.31 0.26,2s-0.1,1.36 -0.26,2h-3.38z"/>
|
||||
</vector>
|
||||
42
app/src/main/res/drawable/list_selector.xml
Normal file
42
app/src/main/res/drawable/list_selector.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/selector_overlay">
|
||||
<item>
|
||||
<selector>
|
||||
<item
|
||||
android:state_selected="true"
|
||||
android:top="2dp"
|
||||
android:right="2dp"
|
||||
android:bottom="2dp"
|
||||
android:left="2dp">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="4dp" />
|
||||
<solid android:color="@color/selector_overlay" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item
|
||||
android:state_activated="true"
|
||||
android:top="2dp"
|
||||
android:right="2dp"
|
||||
android:bottom="2dp"
|
||||
android:left="2dp">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="4dp" />
|
||||
<solid android:color="@color/selector_overlay" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item
|
||||
android:top="2dp"
|
||||
android:right="2dp"
|
||||
android:bottom="2dp"
|
||||
android:left="2dp">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="4dp" />
|
||||
<solid android:color="?android:attr/windowBackground" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
</item>
|
||||
</ripple>
|
||||
19
app/src/main/res/drawable/navigation_item_background.xml
Normal file
19
app/src/main/res/drawable/navigation_item_background.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true">
|
||||
<inset
|
||||
android:insetLeft="@dimen/nav_item_background_inset_left"
|
||||
android:insetRight="@dimen/nav_item_background_inset_right">
|
||||
<shape>
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/nav_item_background_corner_radius_left"
|
||||
android:bottomRightRadius="@dimen/nav_item_background_corner_radius_right"
|
||||
android:topLeftRadius="@dimen/nav_item_background_corner_radius_left"
|
||||
android:topRightRadius="@dimen/nav_item_background_corner_radius_right" />
|
||||
</shape>
|
||||
</inset>
|
||||
</item>
|
||||
<item>
|
||||
<color android:color="@android:color/transparent" />
|
||||
</item>
|
||||
</selector>
|
||||
@@ -4,6 +4,6 @@
|
||||
android:shape="rectangle">
|
||||
<corners
|
||||
android:topLeftRadius="3dp"
|
||||
android:topRightRadius="3dp" />
|
||||
android:topRightRadius="3dp"/>
|
||||
<size android:height="3dp" />
|
||||
</shape>
|
||||
@@ -14,7 +14,7 @@
|
||||
<solid android:color="@android:color/transparent" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/tabs_line" />
|
||||
android:color="@color/list_divider" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -9,6 +9,6 @@
|
||||
android:paddingLeft="22dp"
|
||||
android:paddingRight="22dp" />
|
||||
|
||||
<solid android:color="?colorPrimaryDark" />
|
||||
<solid android:color="?colorPrimary" />
|
||||
|
||||
</shape>
|
||||
281
app/src/main/res/layout-w600dp-land/fragment_details.xml
Normal file
281
app/src/main/res/layout-w600dp-land/fragment_details.xml
Normal file
@@ -0,0 +1,281 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/main_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="8dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="4"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cover_card"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<org.koitharu.kotatsu.base.ui.widgets.CoverImageView
|
||||
android:id="@+id/imageView_cover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
tools:background="@tools:sample/backgrounds/scenic"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/text_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="3">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@tools:sample/lorem[15]" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_subtitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:ellipsize="end"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintEnd_toEndOf="@id/textView_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/textView_title"
|
||||
tools:text="@tools:sample/lorem[15]" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_author"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:requiresFadingEdge="horizontal"
|
||||
android:textColor="?colorAccent"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="@id/textView_title"
|
||||
app:layout_constraintStart_toStartOf="@id/textView_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/textView_subtitle"
|
||||
tools:text="@tools:sample/full_names" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/info_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:baselineAligned="false"
|
||||
android:divider="?android:dividerHorizontal"
|
||||
android:dividerPadding="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:showDividers="middle"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView_author">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rating_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_rating"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="4dp"
|
||||
android:padding="4dp"
|
||||
android:textSize="20sp"
|
||||
app:drawableEndCompat="@drawable/ic_star_manga_info"
|
||||
tools:text="4.8" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/chapters_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_chapters"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="4dp"
|
||||
android:textSize="12sp"
|
||||
app:drawableTopCompat="@drawable/ic_book_page"
|
||||
tools:text="52 chapters" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/source_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_source"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="4dp"
|
||||
android:textSize="12sp"
|
||||
app:drawableTopCompat="@drawable/ic_web"
|
||||
tools:text="Source" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/size_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_size"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="4dp"
|
||||
android:textSize="12sp"
|
||||
app:drawableTopCompat="@drawable/ic_storage"
|
||||
tools:text="1.8 GiB" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/buttons_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/info_layout">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_favorite"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
app:icon="@drawable/ic_heart_outline"
|
||||
app:iconGravity="textTop"
|
||||
app:iconPadding="0dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_read"
|
||||
style="@style/Widget.MaterialComponents.Button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_weight="1"
|
||||
android:enabled="false"
|
||||
android:text="@string/read"
|
||||
android:textAllCaps="false"
|
||||
app:elevation="0dp"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="8dp"
|
||||
tools:text="@string/_continue" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<org.koitharu.kotatsu.base.ui.widgets.ChipsView
|
||||
android:id="@+id/chips_tags"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:chipSpacingHorizontal="6dp"
|
||||
app:chipSpacingVertical="6dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/buttons_layout" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/desc_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="@string/description"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintTop_toBottomOf="@id/chips_tags" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_description"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/desc_header"
|
||||
tools:ignore="UnusedAttribute"
|
||||
tools:text="@tools:sample/lorem/random[25]" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
288
app/src/main/res/layout-w600dp-port/fragment_details.xml
Normal file
288
app/src/main/res/layout-w600dp-port/fragment_details.xml
Normal file
@@ -0,0 +1,288 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/main_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="8dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cover_card"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<org.koitharu.kotatsu.base.ui.widgets.CoverImageView
|
||||
android:id="@+id/imageView_cover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
tools:background="@tools:sample/backgrounds/scenic"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/text_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="2">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@tools:sample/lorem[30]" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_subtitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:ellipsize="end"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintEnd_toEndOf="@id/textView_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/textView_title"
|
||||
tools:text="@tools:sample/lorem[2]" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_author"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:requiresFadingEdge="horizontal"
|
||||
android:textColor="?colorAccent"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="@id/textView_title"
|
||||
app:layout_constraintStart_toStartOf="@id/textView_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/textView_subtitle"
|
||||
tools:text="@tools:sample/full_names" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/info_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:baselineAligned="false"
|
||||
android:divider="?android:dividerHorizontal"
|
||||
android:dividerPadding="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:showDividers="middle"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView_author">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rating_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_rating"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="4dp"
|
||||
android:padding="4dp"
|
||||
android:textSize="20sp"
|
||||
app:drawableEndCompat="@drawable/ic_star_manga_info"
|
||||
tools:text="4.8" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/chapters_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_chapters"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="4dp"
|
||||
android:textSize="12sp"
|
||||
app:drawableTopCompat="@drawable/ic_book_page"
|
||||
tools:text="52 chapters" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/source_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_source"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="4dp"
|
||||
android:textSize="12sp"
|
||||
app:drawableTopCompat="@drawable/ic_web"
|
||||
tools:text="Source" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/size_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_size"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="4dp"
|
||||
android:textSize="12sp"
|
||||
app:drawableTopCompat="@drawable/ic_storage"
|
||||
tools:text="1.8 GiB" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/buttons_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/info_layout">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_favorite"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
app:icon="@drawable/ic_heart_outline"
|
||||
app:iconGravity="textTop"
|
||||
app:iconPadding="0dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_read"
|
||||
style="@style/Widget.MaterialComponents.Button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_weight="1"
|
||||
android:enabled="false"
|
||||
android:text="@string/read"
|
||||
android:textAllCaps="false"
|
||||
app:elevation="0dp"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="8dp"
|
||||
tools:text="@string/_continue" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<org.koitharu.kotatsu.base.ui.widgets.ChipsView
|
||||
android:id="@+id/chips_tags"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
app:chipSpacingHorizontal="6dp"
|
||||
app:chipSpacingVertical="6dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/main_container" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/desc_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="@string/description"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintTop_toBottomOf="@id/chips_tags" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_description"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/desc_header"
|
||||
tools:ignore="UnusedAttribute"
|
||||
tools:text="@tools:sample/lorem/random[25]" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
@@ -9,29 +9,27 @@
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
style="@style/Widget.Kotatsu.AppBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorPrimary"
|
||||
android:theme="@style/AppToolbarTheme">
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@id/toolbar"
|
||||
style="@style/Widget.Kotatsu.Toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/AppPopupTheme">
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabs"
|
||||
style="@style/Widget.MaterialComponents.TabLayout.PrimarySurface"
|
||||
style="@style/Widget.Kotatsu.Tabs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:background="@android:color/transparent"
|
||||
app:tabGravity="start"
|
||||
app:tabMode="scrollable"
|
||||
app:tabIndicatorColor="?colorOnPrimarySurface"
|
||||
app:tabSelectedTextColor="?colorOnPrimarySurface" />
|
||||
app:tabGravity="center"
|
||||
app:tabMode="fixed" />
|
||||
|
||||
</com.google.android.material.appbar.MaterialToolbar>
|
||||
|
||||
|
||||
@@ -8,33 +8,33 @@
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
style="@style/Widget.Kotatsu.AppBar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorPrimary"
|
||||
android:theme="@style/AppToolbarTheme">
|
||||
app:elevation="0dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@id/toolbar"
|
||||
style="@style/Widget.Kotatsu.Toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/AppPopupTheme" />
|
||||
app:layout_scrollFlags="scroll|enterAlways" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/appbar"
|
||||
app:layout_constraintWidth_percent="0.6"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp">
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/appbar"
|
||||
app:layout_constraintWidth_percent="0.6">
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@id/container"
|
||||
|
||||
@@ -1,145 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:clipToPadding="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView_cover"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintDimensionRatio="13:18"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.3" />
|
||||
|
||||
<org.koitharu.kotatsu.base.ui.widgets.ChipsView
|
||||
android:id="@+id/chips_tags"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:padding="6dp"
|
||||
app:chipSpacingHorizontal="4dp"
|
||||
app:chipSpacingVertical="6dp"
|
||||
app:layout_constraintEnd_toEndOf="@id/imageView_cover"
|
||||
app:layout_constraintStart_toStartOf="@id/imageView_cover"
|
||||
app:layout_constraintTop_toBottomOf="@id/imageView_cover" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:maxLines="3"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/imageView_cover"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@tools:sample/lorem[20]" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_subtitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
app:layout_constraintEnd_toEndOf="@id/textView_title"
|
||||
app:layout_constraintStart_toStartOf="@id/textView_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/textView_title"
|
||||
tools:text="@tools:sample/lorem[20]" />
|
||||
|
||||
<RatingBar
|
||||
android:id="@+id/ratingBar"
|
||||
style="@style/Widget.AppCompat.RatingBar.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:isIndicator="true"
|
||||
android:max="100"
|
||||
app:layout_constraintStart_toStartOf="@id/textView_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/textView_subtitle"
|
||||
tools:progress="70" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_read"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:enabled="false"
|
||||
android:text="@string/read"
|
||||
app:icon="@drawable/ic_read"
|
||||
app:iconPadding="12dp"
|
||||
app:layout_constraintEnd_toEndOf="@id/textView_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/ratingBar" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView_favourite"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/add_to_favourites"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_heart_outline"
|
||||
app:layout_constraintBottom_toBottomOf="@id/button_read"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toStartOf="@id/button_read"
|
||||
app:layout_constraintTop_toTopOf="@id/button_read"
|
||||
app:tint="?colorAccent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_top"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?android:listDivider"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/imageView_cover"
|
||||
app:layout_constraintTop_toBottomOf="@id/button_read" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_description"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:justificationMode="inter_word"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:padding="12dp"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/imageView_cover"
|
||||
app:layout_constraintTop_toBottomOf="@id/divider_top"
|
||||
tools:ignore="UnusedAttribute"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/divider_top"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/imageView_cover"
|
||||
app:layout_constraintTop_toBottomOf="@id/divider_top"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
@@ -8,20 +8,20 @@
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
style="@style/Widget.Kotatsu.AppBar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorPrimary"
|
||||
android:theme="@style/AppToolbarTheme"
|
||||
app:elevation="0dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@id/toolbar"
|
||||
style="@style/Widget.Kotatsu.Toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/AppPopupTheme" />
|
||||
app:layout_scrollFlags="scroll|enterAlways" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
@@ -2,22 +2,22 @@
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
style="@style/Widget.Kotatsu.AppBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorPrimary"
|
||||
android:theme="@style/AppToolbarTheme">
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Widget.Kotatsu.Toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:popupTheme="@style/AppPopupTheme" />
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="vertical"
|
||||
android:scrollbars="vertical"
|
||||
android:clipToPadding="false"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
||||
|
||||
@@ -36,13 +36,13 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:layout_margin="20dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/text_categories_holder"
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:text="@string/text_categories_holder"/>
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab_add"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
@@ -8,24 +9,26 @@
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
style="@style/Widget.Kotatsu.AppBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorPrimary"
|
||||
android:theme="@style/AppToolbarTheme">
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@id/toolbar"
|
||||
style="@style/Widget.Kotatsu.Toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/AppPopupTheme" />
|
||||
app:layout_scrollFlags="scroll|enterAlways" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabs"
|
||||
style="@style/Widget.Kotatsu.Tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:tabGravity="center"
|
||||
app:tabMode="scrollable" />
|
||||
app:tabGravity="fill"
|
||||
app:tabMaxWidth="0dp"
|
||||
app:tabMode="fixed" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
android:id="@+id/drawer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".main.ui.MainActivity"
|
||||
tools:openDrawer="start">
|
||||
tools:context=".main.ui.MainActivity">
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -15,13 +14,14 @@
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
style="@style/Widget.Kotatsu.AppBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorPrimary"
|
||||
android:theme="@style/AppToolbarTheme">
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@id/toolbar"
|
||||
style="@style/Widget.Kotatsu.Toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_scrollFlags="scroll|enterAlways" />
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
<com.google.android.material.navigation.NavigationView
|
||||
android:id="@+id/navigationView"
|
||||
android:layout_width="260dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
app:insetForeground="@android:color/transparent"
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/layout_password"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:background="@drawable/bg_reader_indicator"
|
||||
android:singleLine="true"
|
||||
android:drawablePadding="6dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:textAppearanceSmall"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:theme="@style/ThemeOverlay.MaterialComponents.Dark"
|
||||
@@ -32,14 +32,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/dim"
|
||||
android:elevation="0dp"
|
||||
android:theme="@style/AppToolbarTheme"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:popupTheme="@style/AppPopupTheme" />
|
||||
app:popupTheme="@style/ThemeOverlay.Kotatsu" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@color/dim"
|
||||
android:elevation="0dp"
|
||||
android:theme="@style/AppToolbarTheme"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:elevation="0dp"
|
||||
tools:visibility="gone">
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top"
|
||||
app:popupTheme="@style/AppPopupTheme" />
|
||||
app:popupTheme="@style/ThemeOverlay.Kotatsu" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
style="@style/Widget.Kotatsu.AppBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorPrimary"
|
||||
android:theme="@style/AppToolbarTheme">
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@id/toolbar"
|
||||
style="@style/Widget.Kotatsu.Toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/AppPopupTheme">
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
||||
<androidx.appcompat.widget.SearchView
|
||||
android:id="@+id/searchView"
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
style="@style/Widget.Kotatsu.AppBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorPrimary"
|
||||
android:theme="@style/AppToolbarTheme">
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@id/toolbar"
|
||||
style="@style/Widget.Kotatsu.Toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/AppPopupTheme" />
|
||||
app:layout_scrollFlags="scroll|enterAlways" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
@@ -6,19 +6,19 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
style="@style/Widget.Kotatsu.AppBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorPrimary"
|
||||
android:theme="@style/AppToolbarTheme">
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@id/toolbar"
|
||||
style="@style/Widget.Kotatsu.Toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/AppPopupTheme" />
|
||||
app:layout_scrollFlags="scroll|enterAlways" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
style="@style/Widget.Kotatsu.AppBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorPrimary"
|
||||
android:theme="@style/AppToolbarTheme">
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@id/toolbar"
|
||||
style="@style/Widget.Kotatsu.Toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/AppPopupTheme" />
|
||||
app:layout_scrollFlags="scroll|enterAlways" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/layout_password"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
<TextView
|
||||
style="@style/MaterialAlertDialog.MaterialComponents.Title.Text"
|
||||
android:padding="16dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="@string/add_to_favourites" />
|
||||
|
||||
<View
|
||||
@@ -24,8 +24,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:scrollbars="vertical"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="vertical"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_category_checkable" />
|
||||
|
||||
|
||||
@@ -11,21 +11,16 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/inputLayout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:boxBackgroundColor="@android:color/transparent"
|
||||
app:boxBackgroundMode="filled">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/inputEdit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:imeOptions="actionDone"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingTop="28dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:singleLine="true"
|
||||
tools:hint="@tools:sample/cities"
|
||||
tools:text="@tools:sample/lorem[2]" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_list"
|
||||
style="@style/AppToggleButton"
|
||||
style="@style/Widget.Kotatsu.ToggleButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/list"
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_list_detailed"
|
||||
style="@style/AppToggleButton"
|
||||
style="@style/Widget.Kotatsu.ToggleButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/detailed_list"
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_grid"
|
||||
style="@style/AppToggleButton"
|
||||
style="@style/Widget.Kotatsu.ToggleButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/grid"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_standard"
|
||||
style="@style/AppToggleButton"
|
||||
style="@style/Widget.Kotatsu.ToggleButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/standard"
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_reversed"
|
||||
style="@style/AppToggleButton"
|
||||
style="@style/Widget.Kotatsu.ToggleButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/right_to_left"
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_webtoon"
|
||||
style="@style/AppToggleButton"
|
||||
style="@style/Widget.Kotatsu.ToggleButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/webtoon"
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:visibility="gone"
|
||||
tools:listitem="@layout/item_branch" />
|
||||
tools:listitem="@layout/item_branch"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView_chapters"
|
||||
@@ -26,9 +27,8 @@
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="vertical"
|
||||
android:scrollbars="vertical"
|
||||
app:fastScrollEnabled="true"
|
||||
android:scrollbarStyle="outsideOverlay"
|
||||
app:fastScrollEnabled="true"
|
||||
app:fastScrollHorizontalThumbDrawable="@drawable/list_thumb"
|
||||
app:fastScrollHorizontalTrackDrawable="@drawable/list_track"
|
||||
app:fastScrollVerticalThumbDrawable="@drawable/list_thumb"
|
||||
|
||||
@@ -3,140 +3,273 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:clipToPadding="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView_cover"
|
||||
android:layout_width="0dp"
|
||||
<LinearLayout
|
||||
android:id="@+id/main_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintDimensionRatio="13:18"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:maxLines="3"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/imageView_cover"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@tools:sample/lorem[20]" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_subtitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
app:layout_constraintEnd_toEndOf="@id/textView_title"
|
||||
app:layout_constraintStart_toStartOf="@id/textView_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/textView_title"
|
||||
tools:text="@tools:sample/lorem[25]" />
|
||||
|
||||
<RatingBar
|
||||
android:id="@+id/ratingBar"
|
||||
style="@style/Widget.AppCompat.RatingBar.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:isIndicator="true"
|
||||
android:max="100"
|
||||
app:layout_constraintStart_toStartOf="@id/textView_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/textView_subtitle"
|
||||
tools:progress="70" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_read"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:enabled="false"
|
||||
android:text="@string/read"
|
||||
app:icon="@drawable/ic_read"
|
||||
app:iconPadding="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/barrier_title"
|
||||
app:layout_constraintEnd_toEndOf="@id/textView_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/ratingBar"
|
||||
app:layout_constraintVertical_bias="1"
|
||||
tools:text="@string/_continue" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView_favourite"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/add_to_favourites"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_heart_outline"
|
||||
app:layout_constraintBottom_toBottomOf="@id/button_read"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toStartOf="@id/button_read"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
app:layout_constraintStart_toStartOf="@id/textView_title"
|
||||
app:layout_constraintTop_toTopOf="@id/button_read"
|
||||
app:tint="?colorAccent" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/barrier_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="imageView_cover, button_read" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divider_top"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?android:listDivider"
|
||||
android:layout_margin="8dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/barrier_title" />
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cover_card"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<org.koitharu.kotatsu.base.ui.widgets.CoverImageView
|
||||
android:id="@+id/imageView_cover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
tools:background="@tools:sample/backgrounds/scenic"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/text_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="2">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@tools:sample/lorem[15]" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_subtitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:ellipsize="end"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintEnd_toEndOf="@id/textView_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/textView_title"
|
||||
tools:text="@tools:sample/lorem[12]" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_author"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:requiresFadingEdge="horizontal"
|
||||
android:textColor="?colorAccent"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="@id/textView_title"
|
||||
app:layout_constraintStart_toStartOf="@id/textView_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/textView_subtitle"
|
||||
tools:text="@tools:sample/full_names" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/info_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="false"
|
||||
android:divider="?android:dividerHorizontal"
|
||||
android:dividerPadding="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:showDividers="middle"
|
||||
app:layout_constraintTop_toBottomOf="@+id/main_container">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rating_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_rating"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="4dp"
|
||||
android:padding="4dp"
|
||||
android:textSize="20sp"
|
||||
app:drawableEndCompat="@drawable/ic_star_manga_info"
|
||||
tools:text="4.8" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/chapters_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_chapters"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="4dp"
|
||||
android:textSize="12sp"
|
||||
app:drawableTopCompat="@drawable/ic_book_page"
|
||||
tools:text="52 chapters" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/source_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_source"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="4dp"
|
||||
android:textSize="12sp"
|
||||
app:drawableTopCompat="@drawable/ic_web"
|
||||
tools:text="Source" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/size_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_size"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="4dp"
|
||||
android:textSize="12sp"
|
||||
app:drawableTopCompat="@drawable/ic_storage"
|
||||
tools:text="1.8 GiB" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/buttons_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/info_layout">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_favorite"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
app:icon="@drawable/ic_heart_outline"
|
||||
app:iconGravity="textTop"
|
||||
app:iconPadding="0dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_read"
|
||||
style="@style/Widget.MaterialComponents.Button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_weight="1"
|
||||
android:enabled="false"
|
||||
android:text="@string/read"
|
||||
android:textAllCaps="false"
|
||||
app:elevation="0dp"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="8dp"
|
||||
tools:text="@string/_continue" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<org.koitharu.kotatsu.base.ui.widgets.ChipsView
|
||||
android:id="@+id/chips_tags"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:padding="6dp"
|
||||
app:chipSpacingHorizontal="4dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
app:chipSpacingHorizontal="6dp"
|
||||
app:chipSpacingVertical="6dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/divider_top" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/buttons_layout" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/desc_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="@string/description"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintTop_toBottomOf="@id/chips_tags" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_description"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:padding="12dp"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/chips_tags"
|
||||
app:layout_constraintTop_toBottomOf="@id/desc_header"
|
||||
tools:ignore="UnusedAttribute"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
tools:text="@tools:sample/lorem/random[25]" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
@@ -145,10 +278,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/divider_top"
|
||||
app:layout_constraintBottom_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/divider_top"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<org.koitharu.kotatsu.reader.ui.pager.wetoon.WebtoonRecyclerView
|
||||
<org.koitharu.kotatsu.reader.ui.pager.webtoon.WebtoonRecyclerView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/recyclerView"
|
||||
|
||||
16
app/src/main/res/layout/item_filter_header.xml
Normal file
16
app/src/main/res/layout/item_filter_header.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical|start"
|
||||
android:minHeight="@dimen/header_height"
|
||||
android:paddingStart="?android:listPreferredItemPaddingStart"
|
||||
android:paddingEnd="?android:listPreferredItemPaddingEnd"
|
||||
android:singleLine="true"
|
||||
android:textAllCaps="true"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textStyle="bold"
|
||||
tools:text="@tools:sample/lorem[2]" />
|
||||
@@ -5,10 +5,10 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical|start"
|
||||
android:paddingStart="?android:listPreferredItemPaddingStart"
|
||||
android:paddingEnd="?android:listPreferredItemPaddingEnd"
|
||||
android:minHeight="@dimen/header_height"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:singleLine="true"
|
||||
android:textAllCaps="true"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textStyle="bold"
|
||||
|
||||
@@ -1,38 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:strokeWidth="1dp"
|
||||
app:strokeColor="@color/stroke_color"
|
||||
app:cardElevation="0dp">
|
||||
android:background="@drawable/list_selector">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<org.koitharu.kotatsu.base.ui.widgets.CoverImageView
|
||||
android:id="@+id/imageView_cover"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="centerCrop" />
|
||||
android:layout_margin="4dp"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="4dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<org.koitharu.kotatsu.base.ui.widgets.CoverImageView
|
||||
android:id="@+id/imageView_cover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_title"
|
||||
style="@style/TextAppearance.AppCompat.Body1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical|start"
|
||||
android:lines="2"
|
||||
android:elegantTextHeight="true"
|
||||
android:padding="6dp"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
tools:text="@tools:sample/lorem" />
|
||||
android:lineSpacingExtra="-2dp"
|
||||
android:maxLines="2"
|
||||
android:padding="4dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/card"
|
||||
tools:text="Sample name" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</FrameLayout>
|
||||
@@ -1,24 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/manga_list_item_height"
|
||||
android:background="?selectableItemBackground"
|
||||
android:background="@drawable/list_selector"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<org.koitharu.kotatsu.base.ui.widgets.CoverImageView
|
||||
android:id="@+id/imageView_cover"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:scaleType="centerCrop" />
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="4dp"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<org.koitharu.kotatsu.base.ui.widgets.CoverImageView
|
||||
android:id="@+id/imageView_cover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:scaleType="centerCrop"
|
||||
tools:src="@tools:sample/backgrounds/scenic" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="16dp">
|
||||
|
||||
<TextView
|
||||
@@ -27,7 +40,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1" />
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_subtitle"
|
||||
@@ -36,7 +50,8 @@
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
||||
android:textColor="?android:textColorSecondary" />
|
||||
android:textColor="?android:textColorSecondary"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -1,96 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/manga_list_details_item_height"
|
||||
app:strokeWidth="1dp"
|
||||
app:strokeColor="@color/stroke_color"
|
||||
app:cardElevation="0dp">
|
||||
android:background="@drawable/list_selector"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<org.koitharu.kotatsu.base.ui.widgets.CoverImageView
|
||||
android:id="@+id/imageView_cover"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:scaleType="centerCrop" />
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="4dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<org.koitharu.kotatsu.base.ui.widgets.CoverImageView
|
||||
android:id="@+id/imageView_cover"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
tools:text="@tools:sample/lorem[6]" />
|
||||
android:textAppearance="@style/TextAppearance.Kotatsu.ToolbarTitle"
|
||||
android:textSize="18sp"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_subtitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
tools:text="@tools:sample/lorem[6]" />
|
||||
|
||||
<Space
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?android:listDivider" />
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:ellipsize="none"
|
||||
android:gravity="center_vertical"
|
||||
android:requiresFadingEdge="horizontal"
|
||||
android:singleLine="true"
|
||||
android:textSize="16sp"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_tags"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="none"
|
||||
android:gravity="center_vertical"
|
||||
android:requiresFadingEdge="horizontal"
|
||||
android:singleLine="true" />
|
||||
android:singleLine="true"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_rating"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:drawablePadding="4dp"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
||||
app:drawableStartCompat="@drawable/ic_star_rating"
|
||||
tools:text="10/10" />
|
||||
android:paddingStart="6dp"
|
||||
app:drawableEndCompat="@drawable/ic_star"
|
||||
tools:text="9.6" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -98,4 +93,4 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</LinearLayout>
|
||||
@@ -3,9 +3,9 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="?android:windowBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:background="?android:windowBackground">
|
||||
|
||||
<com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
||||
android:id="@+id/ssiv"
|
||||
@@ -37,8 +37,8 @@
|
||||
android:drawablePadding="12dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
tools:text="@tools:sample/lorem[6]"
|
||||
app:drawableTopCompat="@drawable/ic_error_large" />
|
||||
app:drawableTopCompat="@drawable/ic_error_large"
|
||||
tools:text="@tools:sample/lorem[6]" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_retry"
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<org.koitharu.kotatsu.reader.ui.pager.wetoon.WebtoonFrameLayout
|
||||
<org.koitharu.kotatsu.reader.ui.pager.webtoon.WebtoonFrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<org.koitharu.kotatsu.reader.ui.pager.wetoon.WebtoonImageView
|
||||
<org.koitharu.kotatsu.reader.ui.pager.webtoon.WebtoonImageView
|
||||
android:id="@+id/ssiv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:zoomEnabled="false"
|
||||
app:panEnabled="false"
|
||||
app:quickScaleEnabled="false"
|
||||
app:panEnabled="false" />
|
||||
app:zoomEnabled="false" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
@@ -39,8 +39,8 @@
|
||||
android:drawablePadding="12dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
tools:text="@tools:sample/lorem[6]"
|
||||
app:drawableTopCompat="@drawable/ic_error_large" />
|
||||
app:drawableTopCompat="@drawable/ic_error_large"
|
||||
tools:text="@tools:sample/lorem[6]" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_retry"
|
||||
@@ -52,4 +52,4 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</org.koitharu.kotatsu.reader.ui.pager.wetoon.WebtoonFrameLayout>
|
||||
</org.koitharu.kotatsu.reader.ui.pager.webtoon.WebtoonFrameLayout>
|
||||
@@ -12,6 +12,6 @@
|
||||
android:paddingEnd="?listPreferredItemPaddingEnd"
|
||||
android:textAppearance="?textAppearanceListItemSmall"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:theme="@style/AppPopupTheme"
|
||||
tools:text="@tools:sample/full_names"
|
||||
app:drawableStartCompat="@drawable/ic_history" />
|
||||
android:theme="@style/ThemeOverlay.Kotatsu"
|
||||
app:drawableStartCompat="@drawable/ic_history"
|
||||
tools:text="@tools:sample/full_names" />
|
||||
@@ -4,7 +4,6 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:listPreferredItemHeightSmall"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="?android:windowBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
@@ -32,7 +31,7 @@
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:id="@+id/switch_toggle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView_config"
|
||||
|
||||
@@ -1,75 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingEnd="16dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card_cover"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="4dp"
|
||||
app:layout_constraintDimensionRatio="h,1:1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<org.koitharu.kotatsu.base.ui.widgets.CoverImageView
|
||||
<ImageView
|
||||
android:id="@+id/imageView_cover"
|
||||
android:layout_width="87dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true" />
|
||||
android:scaleType="centerCrop"
|
||||
tools:src="@tools:sample/backgrounds/scenic" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/title_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toTopOf="@id/textView_chapters"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/card_cover"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_toEndOf="@id/imageView_cover"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
tools:text="@tools:sample/lorem[6]" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_subtitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/textView_title"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:layout_toEndOf="@id/imageView_cover"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
tools:text="@tools:sample/lorem[6]" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/textView_subtitle"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_toEndOf="@id/imageView_cover"
|
||||
android:background="?android:listDivider" />
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
tools:text="@tools:sample/lorem" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView_chapters"
|
||||
android:layout_width="0dp"
|
||||
android:id="@+id/badge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/divider"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_toEndOf="@id/imageView_cover"
|
||||
android:ellipsize="none"
|
||||
android:paddingBottom="12dp" />
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/badge"
|
||||
android:paddingHorizontal="6dp"
|
||||
android:paddingVertical="2dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="54" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
<TextView
|
||||
android:id="@+id/textView_chapters"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:ellipsize="none"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/card_cover"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_container"
|
||||
tools:text="@tools:sample/lorem[25]" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
113
app/src/main/res/layout/layout_search_view.xml
Normal file
113
app/src/main/res/layout/layout_search_view.xml
Normal file
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<View
|
||||
android:id="@+id/search_view_shadow"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/search_material_card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<View
|
||||
android:id="@+id/search_view_anim"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/search_linear_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/search_layout_height"
|
||||
android:layoutDirection="locale"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/search_image_view_navigation"
|
||||
android:layout_width="@dimen/search_icon_56"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerInside" />
|
||||
|
||||
<org.koitharu.kotatsu.base.ui.widgets.search.internal.SearchEditText
|
||||
android:id="@+id/search_search_edit_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical|start"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:gravity="start|center_vertical"
|
||||
android:imeOptions="actionSearch|flagNoExtractUi"
|
||||
android:inputType="text|textNoSuggestions"
|
||||
android:layoutDirection="locale"
|
||||
android:maxLines="1"
|
||||
android:privateImeOptions="nm"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textColorHint="?android:attr/textColorSecondary"
|
||||
android:textDirection="locale"
|
||||
android:textSize="@dimen/search_sp_16"
|
||||
android:windowSoftInputMode="stateAlwaysHidden|adjustPan|adjustNothing" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/search_image_view_mic"
|
||||
android:layout_width="@dimen/search_icon_48"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerInside" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/search_image_view_clear"
|
||||
android:layout_width="@dimen/search_icon_48"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerInside" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/search_image_view_menu"
|
||||
android:layout_width="@dimen/search_icon_48"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerInside" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/search_view_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/search_divider"
|
||||
android:background="?android:attr/listDivider" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/search_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:overScrollMode="never" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</merge>
|
||||
25
app/src/main/res/layout/navigation_header.xml
Normal file
25
app/src/main/res/layout/navigation_header.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/navigation_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/nav_header_logo_size"
|
||||
android:layout_height="@dimen/nav_header_logo_size"
|
||||
android:layout_marginStart="@dimen/nav_item_horizontal_padding"
|
||||
android:layout_marginTop="@dimen/margin_normal"
|
||||
android:layout_marginBottom="@dimen/margin_normal"
|
||||
app:srcCompat="@drawable/ic_totoro" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?android:attr/listDivider" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -43,6 +43,7 @@
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
android:padding="@dimen/grid_spacing"
|
||||
android:scrollbars="vertical"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
|
||||
@@ -75,7 +75,6 @@
|
||||
<string name="webtoon">Манхва</string>
|
||||
<string name="read_mode">Рэжым чытання</string>
|
||||
<string name="grid_size">Памер табліцы</string>
|
||||
<string name="search_results_on_s">Вынікі пошуку па %s</string>
|
||||
<string name="search_on_s">Пошук па %s</string>
|
||||
<string name="delete_manga">Выдаліць мангу</string>
|
||||
<string name="reader_settings">Настаўленні чытання</string>
|
||||
@@ -96,7 +95,6 @@
|
||||
<string name="internal_storage">Унутраны назапашвальнік</string>
|
||||
<string name="external_storage">Знешняе сховішча</string>
|
||||
<string name="domain">Дамен</string>
|
||||
<string name="_default">Безумоўна</string>
|
||||
<string name="application_update">Правяраць абнаўленне прыкладання</string>
|
||||
<string name="app_update_available">Даступна абнаўленне прыкладання</string>
|
||||
<string name="show_notification_app_update">Паказваць апавяшчэнне пры наяўнасці новай версіі</string>
|
||||
@@ -194,7 +192,7 @@
|
||||
<string name="captcha_solve">Прайсці</string>
|
||||
<string name="clear_cookies">Ачысціць кукi</string>
|
||||
<string name="cookies_cleared">Усе кукi выдалены</string>
|
||||
<string name="chapers_checking_progress">Праверка новых частак: %1$d з %2$d</string>
|
||||
<string name="chapters_checking_progress">Праверка новых частак: %1$d з %2$d</string>
|
||||
<string name="clear_feed">Ачысціць стужку</string>
|
||||
<string name="text_clear_updates_feed_prompt">Уся гісторыя абнаўленняў будзе ачышчана і яе нельга будзе вярнуць. Вы ўпэўненыя?</string>
|
||||
<string name="new_chapters_checking">Праверка новых частак</string>
|
||||
@@ -208,4 +206,7 @@
|
||||
<string name="confirm">Пацвярджаць</string>
|
||||
<string name="password_length_hint">Пароль павінен змяшчаць не менш за 4 сімвалаў</string>
|
||||
<string name="hide_toolbar">Схаваць загаловак пры прагортцы</string>
|
||||
<string name="search_only_on_s">Пошук толькі па %s</string>
|
||||
<string name="text_clear_search_history_prompt">Вы сапраўды хочаце выдаліць усе апошнія пошукавыя запыты? Гэта дзеянне не можа быць адменена.</string>
|
||||
<string name="description">Апісанне</string>
|
||||
</resources>
|
||||
@@ -74,7 +74,6 @@
|
||||
<string name="webtoon">Webtoon</string>
|
||||
<string name="read_mode">Modo de lectura</string>
|
||||
<string name="grid_size">Tamaño de la cuadrícula</string>
|
||||
<string name="search_results_on_s">Resultados de búsqueda en %s</string>
|
||||
<string name="search_on_s">Buscar en %s</string>
|
||||
<string name="delete_manga">Borrar manga</string>
|
||||
<string name="text_delete_local_manga">¿Realmente quieres borrar \"%s\" del almacenamiento local de tu teléfono? \nEsta operación no se puede deshacer.</string>
|
||||
@@ -95,7 +94,6 @@
|
||||
<string name="internal_storage">Almacenamiento interno</string>
|
||||
<string name="external_storage">Almacenamiento externo</string>
|
||||
<string name="domain">Dominio</string>
|
||||
<string name="_default">Por defecto</string>
|
||||
<string name="application_update">Comprobar actualizaciones automáticamente</string>
|
||||
<string name="app_update_available">Una nueva versión de la aplicación está disponible</string>
|
||||
<string name="show_notification_app_update">Mostrar notificación si la actualización está disponible</string>
|
||||
@@ -193,7 +191,7 @@
|
||||
<string name="captcha_solve">Resolver</string>
|
||||
<string name="clear_cookies">Borrar cookies</string>
|
||||
<string name="cookies_cleared">Se han eliminado todas las cookies</string>
|
||||
<string name="chapers_checking_progress">Buscando nuevos capítulos: %1$d de %2$d</string>
|
||||
<string name="chapters_checking_progress">Buscando nuevos capítulos: %1$d de %2$d</string>
|
||||
<string name="clear_feed">Limpiar feed</string>
|
||||
<string name="text_clear_updates_feed_prompt">Todo el historial de actualizaciones se borrará y esta acción no se puede deshacer. ¿Está seguro?</string>
|
||||
<string name="new_chapters_checking">Comprobación de nuevos capítulos</string>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user