View Binding
This commit is contained in:
parent
5772fcd812
commit
903fb97eef
11 changed files with 90 additions and 117 deletions
|
@ -19,12 +19,9 @@ import android.os.Bundle
|
|||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.annotation.LayoutRes
|
||||
import androidx.appcompat.widget.AppCompatImageView
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.DefaultItemAnimator
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
|
@ -37,6 +34,7 @@ import code.name.monkey.retromusic.BuildConfig
|
|||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.activities.base.AbsBaseActivity
|
||||
import code.name.monkey.retromusic.databinding.ActivityDonationBinding
|
||||
import code.name.monkey.retromusic.databinding.ItemDonationOptionBinding
|
||||
import code.name.monkey.retromusic.extensions.*
|
||||
import com.anjlab.android.iab.v3.BillingProcessor
|
||||
import com.anjlab.android.iab.v3.PurchaseInfo
|
||||
|
@ -169,8 +167,8 @@ class SkuDetailsAdapter(
|
|||
|
||||
override fun onCreateViewHolder(viewGroup: ViewGroup, i: Int): ViewHolder {
|
||||
return ViewHolder(
|
||||
LayoutInflater.from(donationsDialog).inflate(
|
||||
LAYOUT_RES_ID,
|
||||
ItemDonationOptionBinding.inflate(
|
||||
LayoutInflater.from(donationsDialog),
|
||||
viewGroup,
|
||||
false
|
||||
)
|
||||
|
@ -179,12 +177,14 @@ class SkuDetailsAdapter(
|
|||
|
||||
override fun onBindViewHolder(viewHolder: ViewHolder, i: Int) {
|
||||
val skuDetails = skuDetailsList[i]
|
||||
viewHolder.title.text = skuDetails.title.replace("Music Player - MP3 Player - Retro", "")
|
||||
.trim { it <= ' ' }
|
||||
viewHolder.text.text = skuDetails.description
|
||||
viewHolder.text.isVisible = false
|
||||
viewHolder.price.text = skuDetails.priceText
|
||||
viewHolder.image.setImageResource(getIcon(i))
|
||||
with(viewHolder.binding) {
|
||||
itemTitle.text = skuDetails.title.replace("Music Player - MP3 Player - Retro", "")
|
||||
.trim { it <= ' ' }
|
||||
itemText.text = skuDetails.description
|
||||
itemText.isVisible = false
|
||||
itemPrice.text = skuDetails.priceText
|
||||
itemImage.setImageResource(getIcon(i))
|
||||
}
|
||||
|
||||
val purchased = donationsDialog.billingProcessor!!.isPurchased(skuDetails.productId)
|
||||
val titleTextColor = if (purchased) ATHUtil.resolveColor(
|
||||
|
@ -194,13 +194,14 @@ class SkuDetailsAdapter(
|
|||
val contentTextColor =
|
||||
if (purchased) titleTextColor else donationsDialog.textColorSecondary()
|
||||
|
||||
viewHolder.title.setTextColor(titleTextColor)
|
||||
viewHolder.text.setTextColor(contentTextColor)
|
||||
viewHolder.price.setTextColor(titleTextColor)
|
||||
|
||||
strikeThrough(viewHolder.title, purchased)
|
||||
strikeThrough(viewHolder.text, purchased)
|
||||
strikeThrough(viewHolder.price, purchased)
|
||||
with(viewHolder.binding) {
|
||||
itemTitle.setTextColor(titleTextColor)
|
||||
itemText.setTextColor(contentTextColor)
|
||||
itemPrice.setTextColor(titleTextColor)
|
||||
strikeThrough(itemTitle, purchased)
|
||||
strikeThrough(itemText, purchased)
|
||||
strikeThrough(itemPrice, purchased)
|
||||
}
|
||||
|
||||
viewHolder.itemView.setOnTouchListener { _, _ -> purchased }
|
||||
viewHolder.itemView.setOnClickListener { donationsDialog.donate(i) }
|
||||
|
@ -210,17 +211,9 @@ class SkuDetailsAdapter(
|
|||
return skuDetailsList.size
|
||||
}
|
||||
|
||||
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
var title: TextView = view.findViewById(R.id.itemTitle)
|
||||
var text: TextView = view.findViewById(R.id.itemText)
|
||||
var price: TextView = view.findViewById(R.id.itemPrice)
|
||||
var image: AppCompatImageView = view.findViewById(R.id.itemImage)
|
||||
}
|
||||
class ViewHolder(val binding: ItemDonationOptionBinding) : RecyclerView.ViewHolder(binding.root)
|
||||
|
||||
companion object {
|
||||
@LayoutRes
|
||||
private val LAYOUT_RES_ID = R.layout.item_donation_option
|
||||
|
||||
private fun strikeThrough(textView: TextView, strikeThrough: Boolean) {
|
||||
textView.paintFlags =
|
||||
if (strikeThrough) textView.paintFlags or Paint.STRIKE_THRU_TEXT_FLAG
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
*/
|
||||
package code.name.monkey.retromusic.dialogs
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.AlarmManager
|
||||
import android.app.Dialog
|
||||
import android.app.PendingIntent
|
||||
|
@ -23,7 +22,6 @@ import android.content.Intent
|
|||
import android.os.Bundle
|
||||
import android.os.CountDownTimer
|
||||
import android.os.SystemClock
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.CheckBox
|
||||
import android.widget.SeekBar
|
||||
import android.widget.TextView
|
||||
|
@ -31,6 +29,7 @@ import android.widget.Toast
|
|||
import androidx.fragment.app.DialogFragment
|
||||
import code.name.monkey.appthemehelper.util.VersionUtils
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.databinding.DialogSleepTimerBinding
|
||||
import code.name.monkey.retromusic.extensions.addAccentColor
|
||||
import code.name.monkey.retromusic.extensions.colorButtons
|
||||
import code.name.monkey.retromusic.extensions.materialDialog
|
||||
|
@ -49,31 +48,27 @@ class SleepTimerDialog : DialogFragment() {
|
|||
private lateinit var timerUpdater: TimerUpdater
|
||||
private lateinit var dialog: MaterialDialog
|
||||
private lateinit var shouldFinishLastSong: CheckBox
|
||||
private lateinit var seekBar: SeekBar
|
||||
private lateinit var timerDisplay: TextView
|
||||
|
||||
@SuppressLint("InflateParams")
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
timerUpdater = TimerUpdater()
|
||||
val layout =
|
||||
LayoutInflater.from(requireContext()).inflate(R.layout.dialog_sleep_timer, null)
|
||||
shouldFinishLastSong = layout.findViewById(R.id.shouldFinishLastSong)
|
||||
seekBar = layout.findViewById(R.id.seekBar)
|
||||
timerDisplay = layout.findViewById(R.id.timerDisplay)
|
||||
val binding = DialogSleepTimerBinding.inflate(layoutInflater)
|
||||
shouldFinishLastSong = binding.shouldFinishLastSong
|
||||
timerDisplay = binding.timerDisplay
|
||||
|
||||
val finishMusic = PreferenceUtil.isSleepTimerFinishMusic
|
||||
shouldFinishLastSong.apply {
|
||||
addAccentColor()
|
||||
isChecked = finishMusic
|
||||
}
|
||||
seekBar.apply {
|
||||
binding.seekBar.apply {
|
||||
addAccentColor()
|
||||
seekArcProgress = PreferenceUtil.lastSleepTimerValue
|
||||
updateTimeDisplayTime()
|
||||
seekBar.progress = seekArcProgress
|
||||
progress = seekArcProgress
|
||||
}
|
||||
|
||||
seekBar.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
|
||||
binding.seekBar.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
|
||||
override fun onProgressChanged(seekBar: SeekBar, i: Int, b: Boolean) {
|
||||
if (i < 1) {
|
||||
seekBar.progress = 1
|
||||
|
@ -91,7 +86,7 @@ class SleepTimerDialog : DialogFragment() {
|
|||
}
|
||||
})
|
||||
return materialDialog(R.string.action_sleep_timer)
|
||||
.setView(layout)
|
||||
.setView(binding.root)
|
||||
.setPositiveButton(R.string.action_set) { _, _ ->
|
||||
PreferenceUtil.isSleepTimerFinishMusic = shouldFinishLastSong.isChecked
|
||||
val minutes = seekArcProgress
|
||||
|
@ -170,7 +165,6 @@ class SleepTimerDialog : DialogFragment() {
|
|||
) {
|
||||
|
||||
override fun onTick(millisUntilFinished: Long) {
|
||||
seekBar.progress = millisUntilFinished.toInt()
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
|
|
|
@ -113,6 +113,14 @@ fun SeekBar.addAccentColor() {
|
|||
thumbTintList = colorState
|
||||
}
|
||||
|
||||
fun Slider.addAccentColor() {
|
||||
if (materialYou) return
|
||||
val accentColor = ThemeStore.accentColor(context)
|
||||
trackActiveTintList = accentColor.colorStateList
|
||||
trackInactiveTintList = ColorUtil.withAlpha(accentColor, 0.5F).colorStateList
|
||||
thumbTintList = accentColor.colorStateList
|
||||
}
|
||||
|
||||
fun Slider.accent() {
|
||||
if (materialYou) return
|
||||
val accentColor = context.accentColor()
|
||||
|
|
|
@ -17,6 +17,7 @@ package code.name.monkey.retromusic.extensions
|
|||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import code.name.monkey.retromusic.R
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
|
||||
fun DialogFragment.materialDialog(title: Int): MaterialAlertDialogBuilder {
|
||||
|
|
|
@ -168,7 +168,7 @@ abstract class AbsPlayerFragment(@LayoutRes layout: Int) : AbsMainActivityFragme
|
|||
return true
|
||||
}
|
||||
R.id.action_sleep_timer -> {
|
||||
SleepTimerDialog().show(parentFragmentManager, TAG)
|
||||
SleepTimerDialog().show(parentFragmentManager, "SLEEP_TIMER")
|
||||
return true
|
||||
}
|
||||
R.id.action_set_as_ringtone -> {
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
package code.name.monkey.retromusic.preferences
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Dialog
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
|
@ -22,8 +21,6 @@ import android.util.AttributeSet
|
|||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.core.graphics.BlendModeColorFilterCompat
|
||||
import androidx.core.graphics.BlendModeCompat.SRC_IN
|
||||
|
@ -33,6 +30,8 @@ import androidx.viewpager.widget.ViewPager
|
|||
import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEDialogPreference
|
||||
import code.name.monkey.retromusic.App
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.databinding.PreferenceDialogNowPlayingScreenBinding
|
||||
import code.name.monkey.retromusic.databinding.PreferenceNowPlayingScreenItemBinding
|
||||
import code.name.monkey.retromusic.extensions.*
|
||||
import code.name.monkey.retromusic.fragments.AlbumCoverStyle
|
||||
import code.name.monkey.retromusic.fragments.AlbumCoverStyle.*
|
||||
|
@ -69,14 +68,13 @@ class AlbumCoverStylePreferenceDialog : DialogFragment(),
|
|||
private var viewPagerPosition: Int = 0
|
||||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
@SuppressLint("InflateParams") val view =
|
||||
layoutInflater
|
||||
.inflate(R.layout.preference_dialog_now_playing_screen, null)
|
||||
val viewPager = view.findViewById<ViewPager>(R.id.now_playing_screen_view_pager)
|
||||
viewPager.adapter = AlbumCoverStyleAdapter(requireContext())
|
||||
viewPager.addOnPageChangeListener(this)
|
||||
viewPager.pageMargin = ViewUtil.convertDpToPixel(32f, resources).toInt()
|
||||
viewPager.currentItem = PreferenceUtil.albumCoverStyle.ordinal
|
||||
val binding = PreferenceDialogNowPlayingScreenBinding.inflate(layoutInflater)
|
||||
binding.nowPlayingScreenViewPager.apply {
|
||||
adapter = AlbumCoverStyleAdapter(requireContext())
|
||||
addOnPageChangeListener(this@AlbumCoverStylePreferenceDialog)
|
||||
pageMargin = ViewUtil.convertDpToPixel(32f, resources).toInt()
|
||||
currentItem = PreferenceUtil.albumCoverStyle.ordinal
|
||||
}
|
||||
|
||||
return materialDialog(R.string.pref_title_album_cover_style)
|
||||
.setPositiveButton(R.string.set) { _, _ ->
|
||||
|
@ -89,7 +87,7 @@ class AlbumCoverStylePreferenceDialog : DialogFragment(),
|
|||
PreferenceUtil.albumCoverStyle = coverStyle
|
||||
}
|
||||
}
|
||||
.setView(view)
|
||||
.setView(binding.root)
|
||||
.create()
|
||||
.colorButtons()
|
||||
}
|
||||
|
@ -111,25 +109,18 @@ class AlbumCoverStylePreferenceDialog : DialogFragment(),
|
|||
val albumCoverStyle = values()[position]
|
||||
|
||||
val inflater = LayoutInflater.from(context)
|
||||
val layout = inflater.inflate(
|
||||
R.layout.preference_now_playing_screen_item,
|
||||
collection,
|
||||
false
|
||||
) as ViewGroup
|
||||
collection.addView(layout)
|
||||
val binding = PreferenceNowPlayingScreenItemBinding.inflate(inflater, collection, false)
|
||||
collection.addView(binding.root)
|
||||
|
||||
val image = layout.findViewById<ImageView>(R.id.image)
|
||||
val title = layout.findViewById<TextView>(R.id.title)
|
||||
val proText = layout.findViewById<TextView>(R.id.proText)
|
||||
Glide.with(context).load(albumCoverStyle.drawableResId).into(image)
|
||||
title.setText(albumCoverStyle.titleRes)
|
||||
Glide.with(context).load(albumCoverStyle.drawableResId).into(binding.image)
|
||||
binding.title.setText(albumCoverStyle.titleRes)
|
||||
if (isAlbumCoverStyle(albumCoverStyle)) {
|
||||
proText.show()
|
||||
proText.setText(R.string.pro)
|
||||
binding.proText.show()
|
||||
binding.proText.setText(R.string.pro)
|
||||
} else {
|
||||
proText.hide()
|
||||
binding.proText.hide()
|
||||
}
|
||||
return layout
|
||||
return binding.root
|
||||
}
|
||||
|
||||
override fun destroyItem(
|
||||
|
|
|
@ -2,16 +2,16 @@ package code.name.monkey.retromusic.preferences
|
|||
|
||||
import android.app.Dialog
|
||||
import android.content.Context
|
||||
import android.content.res.ColorStateList
|
||||
import android.os.Bundle
|
||||
import android.util.AttributeSet
|
||||
import android.widget.TextView
|
||||
import androidx.core.graphics.BlendModeColorFilterCompat
|
||||
import androidx.core.graphics.BlendModeCompat.SRC_IN
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEDialogPreference
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.databinding.PreferenceDialogAudioFadeBinding
|
||||
import code.name.monkey.retromusic.extensions.addAccentColor
|
||||
import code.name.monkey.retromusic.extensions.colorButtons
|
||||
import code.name.monkey.retromusic.extensions.colorControlNormal
|
||||
import code.name.monkey.retromusic.extensions.materialDialog
|
||||
|
@ -36,28 +36,23 @@ class DurationPreference @JvmOverloads constructor(
|
|||
class DurationPreferenceDialog : DialogFragment() {
|
||||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
val view = layoutInflater
|
||||
.inflate(R.layout.preference_dialog_audio_fade, null)
|
||||
val binding = PreferenceDialogAudioFadeBinding.inflate(layoutInflater)
|
||||
|
||||
|
||||
val slider = view.findViewById<Slider>(R.id.slider)
|
||||
val duration = view.findViewById<TextView>(R.id.duration)
|
||||
ColorStateList.valueOf(ThemeStore.accentColor(requireContext())).let {
|
||||
slider.trackTintList = it
|
||||
slider.thumbTintList = it
|
||||
binding.slider.apply {
|
||||
addAccentColor()
|
||||
value = PreferenceUtil.audioFadeDuration.toFloat()
|
||||
updateText(value.toInt(), binding.duration)
|
||||
addOnChangeListener(Slider.OnChangeListener { _, value, fromUser ->
|
||||
if (fromUser) {
|
||||
updateText(value.toInt(), binding.duration)
|
||||
}
|
||||
})
|
||||
}
|
||||
slider.value = PreferenceUtil.audioFadeDuration.toFloat()
|
||||
updateText(slider.value.toInt(), duration)
|
||||
slider.addOnChangeListener(Slider.OnChangeListener { _, value, fromUser ->
|
||||
if (fromUser) {
|
||||
updateText(value.toInt(), duration)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
return materialDialog(R.string.audio_fade_duration)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setPositiveButton(R.string.save) { _, _ -> updateDuration(slider.value.toInt()) }
|
||||
.setPositiveButton(R.string.save) { _, _ -> updateDuration(binding.slider.value.toInt()) }
|
||||
.setView(view)
|
||||
.create()
|
||||
.colorButtons()
|
||||
|
|
|
@ -23,10 +23,10 @@ import androidx.core.graphics.BlendModeColorFilterCompat
|
|||
import androidx.core.graphics.BlendModeCompat.SRC_IN
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEDialogPreference
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.adapter.CategoryInfoAdapter
|
||||
import code.name.monkey.retromusic.databinding.PreferenceDialogLibraryCategoriesBinding
|
||||
import code.name.monkey.retromusic.extensions.colorButtons
|
||||
import code.name.monkey.retromusic.extensions.colorControlNormal
|
||||
import code.name.monkey.retromusic.extensions.materialDialog
|
||||
|
@ -51,15 +51,14 @@ class LibraryPreference @JvmOverloads constructor(
|
|||
class LibraryPreferenceDialog : DialogFragment() {
|
||||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
val view = layoutInflater
|
||||
.inflate(R.layout.preference_dialog_library_categories, null)
|
||||
val binding = PreferenceDialogLibraryCategoriesBinding.inflate(layoutInflater)
|
||||
|
||||
val categoryAdapter = CategoryInfoAdapter()
|
||||
val recyclerView = view.findViewById<RecyclerView>(R.id.recycler_view)
|
||||
recyclerView.layoutManager = LinearLayoutManager(activity)
|
||||
recyclerView.adapter = categoryAdapter
|
||||
categoryAdapter.attachToRecyclerView(recyclerView)
|
||||
|
||||
binding.recyclerView.apply {
|
||||
layoutManager = LinearLayoutManager(activity)
|
||||
adapter = categoryAdapter
|
||||
categoryAdapter.attachToRecyclerView(this)
|
||||
}
|
||||
|
||||
return materialDialog(R.string.library_categories)
|
||||
.setNeutralButton(
|
||||
|
@ -68,8 +67,8 @@ class LibraryPreferenceDialog : DialogFragment() {
|
|||
updateCategories(PreferenceUtil.defaultCategories)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setPositiveButton( R.string.done) { _, _ -> updateCategories(categoryAdapter.categoryInfos) }
|
||||
.setView(view)
|
||||
.setPositiveButton(R.string.done) { _, _ -> updateCategories(categoryAdapter.categoryInfos) }
|
||||
.setView(binding.root)
|
||||
.create()
|
||||
.colorButtons()
|
||||
}
|
||||
|
|
|
@ -21,8 +21,6 @@ import android.util.AttributeSet
|
|||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.core.graphics.BlendModeColorFilterCompat
|
||||
import androidx.core.graphics.BlendModeCompat.SRC_IN
|
||||
|
@ -32,6 +30,7 @@ import androidx.viewpager.widget.ViewPager
|
|||
import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEDialogPreference
|
||||
import code.name.monkey.retromusic.App
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.databinding.PreferenceNowPlayingScreenItemBinding
|
||||
import code.name.monkey.retromusic.extensions.*
|
||||
import code.name.monkey.retromusic.fragments.NowPlayingScreen
|
||||
import code.name.monkey.retromusic.fragments.NowPlayingScreen.*
|
||||
|
@ -116,25 +115,17 @@ private class NowPlayingScreenAdapter(private val context: Context) : PagerAdapt
|
|||
val nowPlayingScreen = values()[position]
|
||||
|
||||
val inflater = LayoutInflater.from(context)
|
||||
val layout = inflater.inflate(
|
||||
R.layout.preference_now_playing_screen_item,
|
||||
collection,
|
||||
false
|
||||
) as ViewGroup
|
||||
collection.addView(layout)
|
||||
|
||||
val image = layout.findViewById<ImageView>(R.id.image)
|
||||
val title = layout.findViewById<TextView>(R.id.title)
|
||||
val proText = layout.findViewById<TextView>(R.id.proText)
|
||||
Glide.with(context).load(nowPlayingScreen.drawableResId).into(image)
|
||||
title.setText(nowPlayingScreen.titleRes)
|
||||
val binding = PreferenceNowPlayingScreenItemBinding.inflate(inflater, collection, false )
|
||||
collection.addView(binding.root)
|
||||
Glide.with(context).load(nowPlayingScreen.drawableResId).into(binding.image)
|
||||
binding.title.setText(nowPlayingScreen.titleRes)
|
||||
if (isNowPlayingThemes(nowPlayingScreen)) {
|
||||
proText.show()
|
||||
proText.setText(R.string.pro)
|
||||
binding.proText.show()
|
||||
binding.proText.setText(R.string.pro)
|
||||
}else{
|
||||
proText.hide()
|
||||
binding.proText.hide()
|
||||
}
|
||||
return layout
|
||||
return binding.root
|
||||
}
|
||||
|
||||
override fun destroyItem(
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
android:id="@+id/timerDisplay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="8dp"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp"
|
||||
|
|
|
@ -24,14 +24,14 @@
|
|||
android:id="@+id/image"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/proText"
|
||||
app:layout_constraintBottom_toTopOf="@id/pro_text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title"
|
||||
tools:src="@tools:sample/backgrounds/scenic" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/proText"
|
||||
android:id="@+id/pro_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue