fix stats widget

This commit is contained in:
Phillip Thelen 2020-11-30 12:40:45 +01:00
parent 1c39ac9e52
commit 89fc613715
8 changed files with 22 additions and 9 deletions

View file

@ -150,7 +150,7 @@ android {
buildConfigField "String", "TESTING_LEVEL", "\"production\""
resConfigs "en", "bg", "de", "en-rGB", "es", "fr", "hr-rHR", "in", "it", "iw", "ja", "ko", "lt", "nl", "pl", "pt-rBR", "pt-rPT", "ru", "tr", "zh", "zh-rTW"
versionCode 2659
versionCode 2663
versionName "3.1"
}

View file

@ -2,6 +2,6 @@
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/brand_400" />
<solid android:color="@color/brand_300" />
<corners android:radius="5dp" />
</shape>

View file

@ -193,7 +193,7 @@
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="14sp"
android:textColor="?textColorSecondaryDark" />
android:textColor="@color/textColorSecondaryDark" />
<TextView
android:layout_width="0dp"
android:layout_height="0dp"
@ -212,7 +212,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:textColor="?textColorSecondaryDark"
android:textColor="@color/textColorSecondaryDark"
style="@style/CurrencyTextView"
/>
@ -226,7 +226,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:textColor="?textColorSecondaryDark"
android:textColor="@color/textColorSecondaryDark"
style="@style/CurrencyTextView"
/>
@ -239,7 +239,7 @@
android:id="@+id/gold_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?textColorSecondaryDark"
android:textColor="@color/textColorSecondaryDark"
style="@style/CurrencyTextView"
/>
</LinearLayout>

View file

@ -27,6 +27,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/selection_highlight_brand"
android:textSize="24sp"
/>
</FrameLayout>
<FrameLayout
@ -45,6 +46,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/selection_highlight_brand"
android:textSize="24sp"
/>
</FrameLayout>
</LinearLayout>

View file

@ -72,6 +72,8 @@
<color name="xpColor">@color/yellow_100</color>
<color name="mpColor">@color/blue_100</color>
<color name="textColorSecondaryDark">@color/brand_500</color>
<!-- Cards -->
<color name="text_light">#66000000</color>
<color name="card_text">@color/text_ternary</color>

View file

@ -149,7 +149,6 @@ class PurchaseHandler(activity: Activity, val crashlyticsProxy: CrashlyticsProxy
private fun checkIfPendingPurchases() {
billingRequests?.getAllPurchases(ProductTypes.IN_APP, object : RequestListener<Purchases> {
override fun onSuccess(purchases: Purchases) {
crashlyticsProxy.logException(Exception(purchases.toJson()))
for (purchase in purchases.list) {
if (PurchaseTypes.allGemTypes.contains(purchase.sku)) {
billingRequests?.consume(purchase.token, object : RequestListener<Any> {

View file

@ -84,6 +84,16 @@ class YesterdailyDialog private constructor(context: Context, private val userRe
taskContainer.setOnClickListener {
task.completed = !task.completed
configureTaskView(taskView, task)
if (task.checklist?.size ?: 0 > 0) {
val checklistContainer = taskView.findViewById<ViewGroup>(R.id.checklistView)
checklistContainer.removeAllViews()
for (item in task.checklist ?: emptyList<ChecklistItem>()) {
val checklistView = inflater.inflate(R.layout.checklist_item_row, checklistContainer, false) as ViewGroup
configureChecklistView(checklistView, task, item)
checklistContainer.addView(checklistView)
}
}
}
if (task.checklist?.size ?: 0 > 0) {

View file

@ -113,10 +113,10 @@ class AvatarStatsWidgetProvider : BaseWidgetProvider() {
avatarView.setAvatar(user)
val finalRemoteViews = remoteViews
avatarView.onAvatarImageReady({ bitmap ->
avatarView.onAvatarImageReady { bitmap ->
finalRemoteViews.setImageViewBitmap(R.id.avatar_view, bitmap)
appWidgetManager.partiallyUpdateAppWidget(allWidgetIds, finalRemoteViews)
})
}
//If user click on life and xp: open the app
val openAppIntent = Intent(context.applicationContext, MainActivity::class.java)