dark theme on bml recipt and hide bottom nav bar on recipt page

This commit is contained in:
2026-05-18 05:21:46 +05:00
parent d713047970
commit 423b0bf1e1
3 changed files with 15 additions and 8 deletions
@@ -231,6 +231,13 @@ class HomeActivity : AppCompatActivity() {
} }
} }
fun setBottomNavVisible(visible: Boolean) {
val isBottom = getSharedPreferences("prefs", MODE_PRIVATE).getBoolean("bottom_nav", false)
if (isBottom) {
binding.bottomNavigation.visibility = if (visible) View.VISIBLE else View.GONE
}
}
fun setRefreshing(visible: Boolean) { fun setRefreshing(visible: Boolean) {
binding.refreshIndicator.visibility = if (visible) View.VISIBLE else View.GONE binding.refreshIndicator.visibility = if (visible) View.VISIBLE else View.GONE
} }
@@ -313,6 +313,12 @@ class TransferReceiptFragment : Fragment() {
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
requireActivity().title = "Receipt" requireActivity().title = "Receipt"
(activity as? HomeActivity)?.setBottomNavVisible(false)
}
override fun onPause() {
super.onPause()
(activity as? HomeActivity)?.setBottomNavVisible(true)
} }
override fun onDestroyView() { override fun onDestroyView() {
@@ -4,7 +4,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:background="#FFFFFF"> android:background="?attr/colorSurface">
<!-- ══════════════════════════════════════════════════════════════════════ --> <!-- ══════════════════════════════════════════════════════════════════════ -->
<!-- Renderable receipt card --> <!-- Renderable receipt card -->
@@ -206,12 +206,6 @@
</LinearLayout> </LinearLayout>
<!-- Pushes buttons to bottom of screen -->
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<!-- ══════════════════════════════════════════════════════════════════════ --> <!-- ══════════════════════════════════════════════════════════════════════ -->
<!-- Action buttons — outside renderable area --> <!-- Action buttons — outside renderable area -->
<!-- ══════════════════════════════════════════════════════════════════════ --> <!-- ══════════════════════════════════════════════════════════════════════ -->
@@ -219,7 +213,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:background="#FFFFFF" android:background="?attr/colorSurface"
android:paddingHorizontal="12dp" android:paddingHorizontal="12dp"
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="12dp"> android:paddingBottom="12dp">