mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 01:08:50 -06:00
Apply bottom insets to about and settings screens
This commit is contained in:
@@ -26,6 +26,7 @@ import org.isoron.uhabits.BuildConfig
|
||||
import org.isoron.uhabits.R
|
||||
import org.isoron.uhabits.core.models.PaletteColor
|
||||
import org.isoron.uhabits.databinding.AboutBinding
|
||||
import org.isoron.uhabits.utils.applyBottomInset
|
||||
import org.isoron.uhabits.utils.applyRootViewInsets
|
||||
import org.isoron.uhabits.utils.currentTheme
|
||||
import org.isoron.uhabits.utils.setupToolbar
|
||||
@@ -55,6 +56,7 @@ class AboutView(
|
||||
binding.tvTranslate.setOnClickListener { screen.showTranslationWebsite() }
|
||||
binding.tvVersion.setOnClickListener { screen.onPressDeveloperCountdown() }
|
||||
binding.tvVersion.text = String.format(version, BuildConfig.VERSION_NAME)
|
||||
binding.outerLinearLayout.applyBottomInset()
|
||||
applyRootViewInsets()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.isoron.uhabits.R
|
||||
import org.isoron.uhabits.activities.AndroidThemeSwitcher
|
||||
import org.isoron.uhabits.core.models.PaletteColor
|
||||
import org.isoron.uhabits.databinding.SettingsActivityBinding
|
||||
import org.isoron.uhabits.utils.applyBottomInset
|
||||
import org.isoron.uhabits.utils.applyRootViewInsets
|
||||
import org.isoron.uhabits.utils.setupToolbar
|
||||
|
||||
@@ -44,6 +45,7 @@ class SettingsActivity : AppCompatActivity() {
|
||||
theme = themeSwitcher.currentTheme
|
||||
)
|
||||
binding.root.applyRootViewInsets()
|
||||
binding.root.applyBottomInset()
|
||||
setContentView(binding.root)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (C) 2016-2021 Álinson Santos Xavier <git@axavier.org>
|
||||
~
|
||||
~ This file is part of Loop Habit Tracker.
|
||||
@@ -28,7 +27,7 @@
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
app:popupTheme="?toolbarPopupTheme"
|
||||
style="@style/Toolbar"/>
|
||||
style="@style/Toolbar" />
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scrollView"
|
||||
@@ -37,6 +36,7 @@
|
||||
android:layout_below="@id/toolbar">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/outerLinearLayout"
|
||||
style="@style/CardList">
|
||||
|
||||
<LinearLayout
|
||||
@@ -47,7 +47,7 @@
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_margin="6dp"
|
||||
android:src="@drawable/intro_icon_1"/>
|
||||
android:src="@drawable/intro_icon_1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -57,14 +57,14 @@
|
||||
android:textSize="16sp"
|
||||
android:layout_margin="6dp"
|
||||
android:textColor="?aboutScreenColor"
|
||||
android:text="@string/app_name"/>
|
||||
android:text="@string/app_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvVersion"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text=""/>
|
||||
android:text="" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -75,32 +75,32 @@
|
||||
<TextView
|
||||
style="@style/CardHeader"
|
||||
android:text="@string/links"
|
||||
android:textColor="?aboutScreenColor"/>
|
||||
android:textColor="?aboutScreenColor" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRate"
|
||||
style="@style/About.Item.Clickable"
|
||||
android:text="@string/pref_rate_this_app"/>
|
||||
android:text="@string/pref_rate_this_app" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvFeedback"
|
||||
style="@style/About.Item.Clickable"
|
||||
android:text="@string/pref_send_feedback"/>
|
||||
android:text="@string/pref_send_feedback" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTranslate"
|
||||
style="@style/About.Item.Clickable"
|
||||
android:text="@string/help_translate"/>
|
||||
android:text="@string/help_translate" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSource"
|
||||
style="@style/About.Item.Clickable"
|
||||
android:text="@string/pref_view_source_code"/>
|
||||
android:text="@string/pref_view_source_code" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPrivacy"
|
||||
style="@style/About.Item.Clickable"
|
||||
android:text="@string/pref_view_privacy"/>
|
||||
android:text="@string/pref_view_privacy" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
<TextView
|
||||
style="@style/CardHeader"
|
||||
android:text="@string/developers"
|
||||
android:textColor="?aboutScreenColor"/>
|
||||
android:textColor="?aboutScreenColor" />
|
||||
|
||||
<!--
|
||||
This file lists developers who contributed with at least 100 lines
|
||||
@@ -120,31 +120,76 @@
|
||||
linked at the bottom of the list. If you qualify, please feel free to
|
||||
submit a pull request adding yourself here.
|
||||
-->
|
||||
<TextView style="@style/About.Item" android:text="Álinson S. Xavier (@iSoron)"/>
|
||||
<TextView style="@style/About.Item" android:text="Quentin Hibon (@hiqua)"/>
|
||||
<TextView style="@style/About.Item" android:text="Oleg Ivashchenko (@olegivo)"/>
|
||||
<TextView style="@style/About.Item" android:text="Kristian Tashkov (@KristianTashkov)"/>
|
||||
<TextView style="@style/About.Item" android:text="Jakub Kalinowski (@kalina559)"/>
|
||||
<TextView style="@style/About.Item" android:text="Rechee Jozil (@recheej)"/>
|
||||
<TextView style="@style/About.Item" android:text="Sebastian Gallese (@sgallese)"/>
|
||||
<TextView style="@style/About.Item" android:text="Luboš Luňák (@llunak)"/>
|
||||
<TextView style="@style/About.Item" android:text="Bindu (@vbh)"/>
|
||||
<TextView style="@style/About.Item" android:text="Victor Yu (@vyu1)"/>
|
||||
<TextView style="@style/About.Item" android:text="Christoph Hennemann (@chennemann)"/>
|
||||
<TextView style="@style/About.Item" android:text="Денис (@sciamano)"/>
|
||||
<TextView style="@style/About.Item" android:text="Joseph Tran (@JotraN)"/>
|
||||
<TextView style="@style/About.Item" android:text="Nikhil (@regularcoder)"/>
|
||||
<TextView style="@style/About.Item" android:text="JanetQC"/>
|
||||
<TextView
|
||||
style="@style/About.Item"
|
||||
android:text="Álinson S. Xavier (@iSoron)" />
|
||||
|
||||
<TextView
|
||||
style="@style/About.Item"
|
||||
android:text="Quentin Hibon (@hiqua)" />
|
||||
|
||||
<TextView
|
||||
style="@style/About.Item"
|
||||
android:text="Oleg Ivashchenko (@olegivo)" />
|
||||
|
||||
<TextView
|
||||
style="@style/About.Item"
|
||||
android:text="Kristian Tashkov (@KristianTashkov)" />
|
||||
|
||||
<TextView
|
||||
style="@style/About.Item"
|
||||
android:text="Jakub Kalinowski (@kalina559)" />
|
||||
|
||||
<TextView
|
||||
style="@style/About.Item"
|
||||
android:text="Rechee Jozil (@recheej)" />
|
||||
|
||||
<TextView
|
||||
style="@style/About.Item"
|
||||
android:text="Sebastian Gallese (@sgallese)" />
|
||||
|
||||
<TextView
|
||||
style="@style/About.Item"
|
||||
android:text="Luboš Luňák (@llunak)" />
|
||||
|
||||
<TextView
|
||||
style="@style/About.Item"
|
||||
android:text="Bindu (@vbh)" />
|
||||
|
||||
<TextView
|
||||
style="@style/About.Item"
|
||||
android:text="Victor Yu (@vyu1)" />
|
||||
|
||||
<TextView
|
||||
style="@style/About.Item"
|
||||
android:text="Christoph Hennemann (@chennemann)" />
|
||||
|
||||
<TextView
|
||||
style="@style/About.Item"
|
||||
android:text="Денис (@sciamano)" />
|
||||
|
||||
<TextView
|
||||
style="@style/About.Item"
|
||||
android:text="Joseph Tran (@JotraN)" />
|
||||
|
||||
<TextView
|
||||
style="@style/About.Item"
|
||||
android:text="Nikhil (@regularcoder)" />
|
||||
|
||||
<TextView
|
||||
style="@style/About.Item"
|
||||
android:text="JanetQC" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvContributors"
|
||||
style="@style/About.Item.Clickable"
|
||||
android:text="@string/view_all_contributors"/>
|
||||
android:text="@string/view_all_contributors" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/about_translators"/>
|
||||
<include layout="@layout/about_translators" />
|
||||
|
||||
>
|
||||
>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user