mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-25 07:06:01 +00:00
gem fixes
This commit is contained in:
parent
4913502941
commit
0a0e50543a
4 changed files with 13 additions and 11 deletions
|
|
@ -295,13 +295,12 @@
|
|||
android:textColor="@color/white"
|
||||
style="@style/Caption2"
|
||||
android:drawablePadding="@dimen/spacing_medium" />
|
||||
<View
|
||||
android:id="@+id/bottom_spacing"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="30dp"
|
||||
android:background="@color/red_5"/>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
<View
|
||||
android:id="@+id/bottom_spacing"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:background="@color/brand_400"/>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ abstract class BaseActivity : AppCompatActivity() {
|
|||
internal var navigationBarStyle: SystemBarStyle? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
enableEdgeToEdge()
|
||||
enableEdgeToEdge(navigationBarStyle = navigationBarStyle ?: defaultNavigationBarStyle)
|
||||
val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this)
|
||||
val languageHelper = LanguageHelper(sharedPreferences.getString("language", "en"))
|
||||
resources.forceLocale(this, languageHelper.locale)
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import android.view.ViewGroup
|
|||
import android.view.WindowManager
|
||||
import android.widget.CheckBox
|
||||
import android.widget.TextView
|
||||
import androidx.activity.SystemBarStyle
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.activity.viewModels
|
||||
import androidx.appcompat.widget.AppCompatCheckBox
|
||||
|
|
@ -227,6 +228,7 @@ class TaskFormActivity : BaseActivity() {
|
|||
upperTintColor
|
||||
)
|
||||
}
|
||||
window.navigationBarColor = getThemeColor(R.attr.colorTintedBackground)
|
||||
binding.appbar.setBackgroundColor(upperTintColor)
|
||||
supportActionBar?.setBackgroundDrawable(ColorDrawable(upperTintColor))
|
||||
binding.upperTextWrapper.setBackgroundColor(upperTintColor)
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import androidx.compose.ui.unit.dp
|
|||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.core.view.updateLayoutParams
|
||||
import androidx.core.view.updatePadding
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
|
|
@ -35,6 +36,7 @@ import com.habitrpg.android.habitica.ui.fragments.PromoInfoFragment
|
|||
import com.habitrpg.android.habitica.ui.helpers.dismissKeyboard
|
||||
import com.habitrpg.android.habitica.ui.views.dialogs.HabiticaAlertDialog
|
||||
import com.habitrpg.android.habitica.ui.views.promo.BirthdayBanner
|
||||
import com.habitrpg.common.habitica.extensions.dpToPx
|
||||
import com.habitrpg.common.habitica.extensions.isUsingNightModeResources
|
||||
import com.habitrpg.common.habitica.helpers.ExceptionHandler
|
||||
import com.habitrpg.common.habitica.helpers.launchCatching
|
||||
|
|
@ -128,15 +130,14 @@ class GemsPurchaseFragment : BaseFragment<FragmentGemPurchaseBinding>() {
|
|||
loadInventory()
|
||||
|
||||
binding?.bottomSpacing?.let {
|
||||
val paddingBottom = it.paddingBottom
|
||||
ViewCompat.setOnApplyWindowInsetsListener(it) { v, insets ->
|
||||
val bars = insets.getInsets(
|
||||
WindowInsetsCompat.Type.systemBars()
|
||||
or WindowInsetsCompat.Type.displayCutout()
|
||||
)
|
||||
v.updatePadding(
|
||||
bottom = bars.bottom + paddingBottom,
|
||||
)
|
||||
v.updateLayoutParams {
|
||||
height = bars.bottom + 30.dpToPx(requireContext())
|
||||
}
|
||||
consumeWindowInsetsAbove30(insets)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue