mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-22 05:38:55 +00:00
Implement new level up related dialogs
This commit is contained in:
parent
fdfee1f5dc
commit
6401a085d8
11 changed files with 189 additions and 105 deletions
|
|
@ -46,8 +46,8 @@ repositories {
|
|||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
//Networking
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.14.1'
|
||||
implementation 'com.squareup.okhttp3:logging-interceptor:3.14.1'
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.14.2'
|
||||
implementation 'com.squareup.okhttp3:logging-interceptor:3.14.2'
|
||||
//REST API handling
|
||||
implementation('com.squareup.retrofit2:retrofit:2.5.0') {
|
||||
exclude module: 'okhttp'
|
||||
|
|
@ -55,7 +55,7 @@ dependencies {
|
|||
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
|
||||
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0'
|
||||
//Crash Logging
|
||||
releaseImplementation('com.crashlytics.sdk.android:crashlytics:2.9.9@aar') {
|
||||
releaseImplementation('com.crashlytics.sdk.android:crashlytics:2.10.0@aar') {
|
||||
transitive = true
|
||||
}
|
||||
//Dependency Injection
|
||||
|
|
@ -150,8 +150,8 @@ android {
|
|||
buildConfigField "String", "TESTING_LEVEL", "\"production\""
|
||||
multiDexEnabled true
|
||||
|
||||
versionCode 2130
|
||||
versionName "1.9.1"
|
||||
versionCode 2140
|
||||
versionName "1.10"
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@
|
|||
tools:background="@color/black"
|
||||
android:minWidth="300dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_gravity="center_horizontal">
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:paddingTop="@dimen/spacing_medium"
|
||||
android:paddingBottom="@dimen/spacing_medium">
|
||||
<LinearLayout
|
||||
android:minWidth="300dp"
|
||||
android:layout_width="320dp"
|
||||
|
|
@ -15,9 +17,7 @@
|
|||
android:orientation="vertical"
|
||||
android:background="@drawable/alert_dialog_background"
|
||||
android:paddingBottom="24dp"
|
||||
android:paddingTop="44dp"
|
||||
android:paddingEnd="26dp"
|
||||
android:paddingStart="26dp"
|
||||
android:paddingTop="40dp"
|
||||
android:gravity="center_horizontal">
|
||||
<TextView
|
||||
android:id="@+id/titleTextView"
|
||||
|
|
@ -29,6 +29,8 @@
|
|||
tools:text="This is the title"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:layout_marginStart="@dimen/alert_side_padding"
|
||||
android:layout_marginEnd="@dimen/alert_side_padding"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
|
@ -41,20 +43,45 @@
|
|||
android:textColor="?textColorSecondary"
|
||||
style="@style/Body2"
|
||||
tools:text="This is the message"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
android:layout_marginStart="@dimen/alert_side_padding"
|
||||
android:layout_marginEnd="@dimen/alert_side_padding"
|
||||
/>
|
||||
<FrameLayout
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/content_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:paddingStart="@dimen/alert_side_padding"
|
||||
android:paddingEnd="@dimen/alert_side_padding"/>
|
||||
<LinearLayout
|
||||
android:id="@+id/buttons_wrapper"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="26dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:divider="@drawable/alert_dialog_button_divider"
|
||||
android:showDividers="middle"/>
|
||||
android:showDividers="middle"
|
||||
android:layout_marginStart="@dimen/alert_side_padding"
|
||||
android:layout_marginEnd="@dimen/alert_side_padding"/>
|
||||
<TextView
|
||||
android:id="@+id/notice_text_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/alert_side_padding"
|
||||
android:layout_marginEnd="@dimen/alert_side_padding"
|
||||
android:paddingTop="@dimen/spacing_medium"
|
||||
android:paddingBottom="@dimen/spacing_medium"
|
||||
android:paddingStart="@dimen/spacing_large"
|
||||
android:paddingEnd="@dimen/spacing_large"
|
||||
android:background="@drawable/layout_rounded_bg_gray_700"
|
||||
android:visibility="gone"
|
||||
android:gravity="center"
|
||||
style="@style/Caption3"
|
||||
android:textColor="@color/gray_100"
|
||||
tools:text="This is a small label"
|
||||
tools:visibility="visible"/>
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/close_button"
|
||||
|
|
|
|||
49
Habitica/res/layout/dialog_levelup_10.xml
Normal file
49
Habitica/res/layout/dialog_levelup_10.xml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<?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:orientation="vertical" android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal">
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="@dimen/spacing_medium"
|
||||
android:paddingBottom="@dimen/spacing_medium">
|
||||
<ImageView
|
||||
android:id="@+id/healer_icon_view"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="12dp"/>
|
||||
<ImageView
|
||||
android:id="@+id/mage_icon_view"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="12dp" />
|
||||
<ImageView
|
||||
android:id="@+id/rogue_icon_view"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="12dp" />
|
||||
<ImageView
|
||||
android:id="@+id/warrior_icon_view"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/levelup_title_10"
|
||||
style="@style/Subheader1"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@color/gray_50"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/levelup_detail_10"
|
||||
style="@style/Body2"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@color/gray_200"/>
|
||||
</LinearLayout>
|
||||
|
|
@ -1,45 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/alert_dialog_background"
|
||||
android:paddingTop="26dp"
|
||||
android:paddingBottom="26dp">
|
||||
<TextView
|
||||
android:id="@+id/titleTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/welcome_back"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
style="@style/Title1"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/yesterdaililes_prompt"
|
||||
android:layout_gravity="center"/>
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="14dp"
|
||||
android:padding="8dp"
|
||||
android:background="@color/gray_700"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:id="@+id/yesterdailies_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"/>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
style="@style/HabiticaButton.Primary"
|
||||
android:text="@string/start_day"/>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/yesterdailies_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp"
|
||||
android:background="@color/gray_700"/>
|
||||
|
|
|
|||
|
|
@ -140,4 +140,5 @@
|
|||
<dimen name="bb_fake_shadow_height">4dp</dimen>
|
||||
<dimen name="button_height">38dp</dimen>
|
||||
<dimen name="button_text_size">16sp</dimen>
|
||||
<dimen name="alert_side_padding">26dp</dimen>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -913,4 +913,7 @@
|
|||
<string name="invite_to_party">Invite to Party</string>
|
||||
<string name="are_you_sure">Are you sure?</string>
|
||||
<string name="delete_task">Delete Task</string>
|
||||
<string name="not_now">Not right now</string>
|
||||
<string name="levelup_detail_10">Choose a class that fits your playstyle and unlock special skills and armor to help you on your journey</string>
|
||||
<string name="levelup_title_10">Class System unlocked!</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.habitrpg.android.habitica.interactors
|
||||
|
||||
import android.graphics.Bitmap
|
||||
import android.widget.ImageView
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.events.ShareEvent
|
||||
|
|
@ -12,6 +13,7 @@ import com.habitrpg.android.habitica.models.user.Stats
|
|||
import com.habitrpg.android.habitica.models.user.User
|
||||
import com.habitrpg.android.habitica.ui.AvatarView
|
||||
import com.habitrpg.android.habitica.ui.views.HabiticaAlertDialog
|
||||
import com.habitrpg.android.habitica.ui.views.HabiticaIconsHelper
|
||||
import io.reactivex.Flowable
|
||||
import io.reactivex.functions.Consumer
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
|
|
@ -31,34 +33,56 @@ constructor(private val soundManager: SoundManager, threadExecutor: ThreadExecut
|
|||
return@defer Flowable.just<Stats>(requestValues.user.stats)
|
||||
}
|
||||
|
||||
val customView = requestValues.activity.layoutInflater.inflate(R.layout.dialog_levelup, null)
|
||||
if (customView != null) {
|
||||
val dialogAvatarView = customView.findViewById<AvatarView>(R.id.avatarView)
|
||||
dialogAvatarView.setAvatar(requestValues.user)
|
||||
}
|
||||
|
||||
val event = ShareEvent()
|
||||
event.sharedMessage = requestValues.activity.getString(R.string.share_levelup, requestValues.newLevel) + " https://habitica.com/social/level-UP"
|
||||
val avatarView = AvatarView(requestValues.activity, true, true, true)
|
||||
avatarView.setAvatar(requestValues.user)
|
||||
avatarView.onAvatarImageReady(object : AvatarView.Consumer<Bitmap?> {
|
||||
override fun accept(t: Bitmap?) {
|
||||
event.shareImage = t
|
||||
if (requestValues.newLevel == 10) {
|
||||
val customView = requestValues.activity.layoutInflater.inflate(R.layout.dialog_levelup_10, null)
|
||||
if (customView != null) {
|
||||
customView.findViewById<ImageView>(R.id.healer_icon_view).setImageBitmap(HabiticaIconsHelper.imageOfHealerLightBg())
|
||||
customView.findViewById<ImageView>(R.id.mage_icon_view).setImageBitmap(HabiticaIconsHelper.imageOfMageLightBg())
|
||||
customView.findViewById<ImageView>(R.id.rogue_icon_view).setImageBitmap(HabiticaIconsHelper.imageOfRogueLightBg())
|
||||
customView.findViewById<ImageView>(R.id.warrior_icon_view).setImageBitmap(HabiticaIconsHelper.imageOfWarriorLightBg())
|
||||
}
|
||||
})
|
||||
|
||||
val alert = HabiticaAlertDialog(requestValues.activity)
|
||||
alert.setTitle(requestValues.activity.getString(R.string.levelup_header, requestValues.newLevel))
|
||||
alert.setAdditionalContentView(customView)
|
||||
alert.addButton(R.string.onwards, true) { _, _ ->
|
||||
showClassSelection(requestValues)
|
||||
}
|
||||
alert.addButton(R.string.share, false) { _, _ ->
|
||||
EventBus.getDefault().post(event)
|
||||
}
|
||||
val alert = HabiticaAlertDialog(requestValues.activity)
|
||||
alert.setTitle(requestValues.activity.getString(R.string.levelup_header, requestValues.newLevel))
|
||||
alert.setAdditionalContentView(customView)
|
||||
alert.addButton(R.string.select_class, true) { _, _ ->
|
||||
showClassSelection(requestValues)
|
||||
}
|
||||
alert.addButton(R.string.not_now, false)
|
||||
|
||||
if (!requestValues.activity.isFinishing) {
|
||||
alert.show()
|
||||
if (!requestValues.activity.isFinishing) {
|
||||
alert.show()
|
||||
}
|
||||
} else {
|
||||
val customView = requestValues.activity.layoutInflater.inflate(R.layout.dialog_levelup, null)
|
||||
if (customView != null) {
|
||||
val dialogAvatarView = customView.findViewById<AvatarView>(R.id.avatarView)
|
||||
dialogAvatarView.setAvatar(requestValues.user)
|
||||
}
|
||||
|
||||
val event = ShareEvent()
|
||||
event.sharedMessage = requestValues.activity.getString(R.string.share_levelup, requestValues.newLevel) + " https://habitica.com/social/level-UP"
|
||||
val avatarView = AvatarView(requestValues.activity, true, true, true)
|
||||
avatarView.setAvatar(requestValues.user)
|
||||
avatarView.onAvatarImageReady(object : AvatarView.Consumer<Bitmap?> {
|
||||
override fun accept(t: Bitmap?) {
|
||||
event.shareImage = t
|
||||
}
|
||||
})
|
||||
|
||||
val alert = HabiticaAlertDialog(requestValues.activity)
|
||||
alert.setTitle(requestValues.activity.getString(R.string.levelup_header, requestValues.newLevel))
|
||||
alert.setAdditionalContentView(customView)
|
||||
alert.addButton(R.string.onwards, true) { _, _ ->
|
||||
showClassSelection(requestValues)
|
||||
}
|
||||
alert.addButton(R.string.share, false) { _, _ ->
|
||||
EventBus.getDefault().post(event)
|
||||
}
|
||||
|
||||
if (!requestValues.activity.isFinishing) {
|
||||
alert.show()
|
||||
}
|
||||
}
|
||||
|
||||
Flowable.just(requestValues.user.stats!!)
|
||||
|
|
|
|||
|
|
@ -307,19 +307,10 @@ open class MainActivity : BaseActivity(), TutorialView.OnTutorialReaction {
|
|||
launchTrace?.stop()
|
||||
launchTrace = null
|
||||
|
||||
val customView = layoutInflater.inflate(R.layout.dialog_levelup, null)
|
||||
if (customView != null) {
|
||||
val dialogAvatarView = customView.findViewById<AvatarView>(R.id.avatarView)
|
||||
user?.let { dialogAvatarView.setAvatar(it) }
|
||||
}
|
||||
|
||||
val alert = HabiticaAlertDialog(this)
|
||||
alert.setTitle(getString(R.string.levelup_header, 5))
|
||||
alert.setAdditionalContentView(customView)
|
||||
alert.addButton(R.string.onwards, true)
|
||||
alert.addButton(R.string.share, false)
|
||||
|
||||
alert.show()
|
||||
notifyUserUseCase.observable(NotifyUserUseCase.RequestValues(this, floatingMenuWrapper,
|
||||
user, 0.0, 0.0, 0.0, 0.0, 0.0, true))
|
||||
.subscribe(Consumer { }, RxErrorHandler.handleEmptyError())
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class AutocompleteAdapter(val context: Context, val socialRepository: SocialRepo
|
|||
val view = parent?.inflate(R.layout.autocomplete_emoji)
|
||||
val result = getItem(position) as? String
|
||||
val emojiTextView = view?.findViewById<HabiticaEmojiTextView>(R.id.emoji_textview)
|
||||
emojiTextView?.setEmojiconSize(24.dpToPx(context))
|
||||
//emojiTextView?.setEmojiconSize(24.dpToPx(context))
|
||||
emojiTextView?.text = EmojiParser.parseEmojis(result)
|
||||
view?.findViewById<TextView>(R.id.label)?.text = result
|
||||
view
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ open class HabiticaAlertDialog(context: Context) : AlertDialog(context, R.style.
|
|||
private var messageTextView: TextView
|
||||
private var contentView: ViewGroup
|
||||
private var buttonsWrapper: LinearLayout
|
||||
private var noticeTextView: TextView
|
||||
|
||||
private var additionalContentView: View? = null
|
||||
|
||||
|
|
@ -31,6 +32,7 @@ open class HabiticaAlertDialog(context: Context) : AlertDialog(context, R.style.
|
|||
messageTextView = view.findViewById(R.id.messageTextView)
|
||||
contentView = view.findViewById(R.id.content_view)
|
||||
buttonsWrapper = view.findViewById(R.id.buttons_wrapper)
|
||||
noticeTextView = view.findViewById(R.id.notice_text_view)
|
||||
}
|
||||
|
||||
override fun setTitle(title: CharSequence?) {
|
||||
|
|
@ -59,6 +61,19 @@ open class HabiticaAlertDialog(context: Context) : AlertDialog(context, R.style.
|
|||
setMessage(context.getString(messageId))
|
||||
}
|
||||
|
||||
fun setNotice(notice: CharSequence?) {
|
||||
if (notice != null) {
|
||||
noticeTextView.visibility = View.VISIBLE
|
||||
} else {
|
||||
noticeTextView.visibility = View.GONE
|
||||
}
|
||||
noticeTextView.text = notice
|
||||
}
|
||||
|
||||
fun setNotice(noticeID: Int) {
|
||||
setNotice(context.getString(noticeID))
|
||||
}
|
||||
|
||||
fun setAdditionalContentView(layoutResID: Int) {
|
||||
val inflater = context.layoutInflater
|
||||
setAdditionalContentView(inflater.inflate(layoutResID, view, false))
|
||||
|
|
@ -75,6 +90,11 @@ open class HabiticaAlertDialog(context: Context) : AlertDialog(context, R.style.
|
|||
contentView.forceLayout()
|
||||
}
|
||||
|
||||
fun setAdditionalContentSidePadding(padding: Int) {
|
||||
contentView.setPadding(padding, 0, padding, 0)
|
||||
contentView.requestLayout()
|
||||
}
|
||||
|
||||
fun getContentView(): View? = additionalContentView
|
||||
|
||||
fun addButton(stringRes: Int, isPrimary: Boolean, function: ((HabiticaAlertDialog, Int) -> Unit)? = null) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.habitrpg.android.habitica.ui.views.yesterdailies
|
||||
|
||||
import android.app.Activity
|
||||
import android.app.AlertDialog
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.view.LayoutInflater
|
||||
|
|
@ -13,19 +12,21 @@ import android.widget.TextView
|
|||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.data.TaskRepository
|
||||
import com.habitrpg.android.habitica.data.UserRepository
|
||||
import com.habitrpg.android.habitica.extensions.dpToPx
|
||||
import com.habitrpg.android.habitica.helpers.AmplitudeManager
|
||||
import com.habitrpg.android.habitica.helpers.RxErrorHandler
|
||||
import com.habitrpg.android.habitica.models.tasks.ChecklistItem
|
||||
import com.habitrpg.android.habitica.models.tasks.Task
|
||||
import com.habitrpg.android.habitica.ui.helpers.bindColor
|
||||
import com.habitrpg.android.habitica.ui.views.HabiticaAlertDialog
|
||||
import com.habitrpg.android.habitica.ui.views.HabiticaEmojiTextView
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.functions.Consumer
|
||||
import net.pherth.android.emoji_library.EmojiTextView
|
||||
import java.util.*
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class YesterdailyDialog private constructor(context: Context, private val userRepository: UserRepository, private val taskRepository: TaskRepository, private val tasks: List<Task>) : AlertDialog(context) {
|
||||
class YesterdailyDialog private constructor(context: Context, private val userRepository: UserRepository, private val taskRepository: TaskRepository, private val tasks: List<Task>) : HabiticaAlertDialog(context) {
|
||||
|
||||
private lateinit var yesterdailiesList: LinearLayout
|
||||
|
||||
|
|
@ -34,14 +35,18 @@ class YesterdailyDialog private constructor(context: Context, private val userRe
|
|||
init {
|
||||
val inflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as? LayoutInflater
|
||||
val view = inflater?.inflate(R.layout.dialog_yesterdaily, null)
|
||||
this.setView(view)
|
||||
this.setButton(BUTTON_POSITIVE,
|
||||
context.getString(R.string.start_day)
|
||||
) { _, _ -> }
|
||||
setTitle(R.string.welcome_back)
|
||||
setMessage(R.string.yesterdaililes_prompt)
|
||||
this.setAdditionalContentView(view)
|
||||
setAdditionalContentSidePadding(9.dpToPx(context))
|
||||
|
||||
|
||||
addButton(R.string.start_day, true)
|
||||
|
||||
this.setOnDismissListener {
|
||||
lastCronRun = Date()
|
||||
runCron() }
|
||||
runCron()
|
||||
}
|
||||
|
||||
//Can't use by bindView() because the view doesn't seem to be available through that yet
|
||||
val listView = view?.findViewById(R.id.yesterdailies_list) as? LinearLayout
|
||||
|
|
@ -125,7 +130,7 @@ class YesterdailyDialog private constructor(context: Context, private val userRe
|
|||
checkboxHolder.setBackgroundResource(task.lightTaskColor)
|
||||
}
|
||||
|
||||
val emojiView = taskView.findViewById<View>(R.id.text_view) as? EmojiTextView
|
||||
val emojiView = taskView.findViewById<View>(R.id.text_view) as? HabiticaEmojiTextView
|
||||
emojiView?.text = task.markdownText { emojiView?.text = it }
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue