mirror of
https://github.com/He4eT/yamf_launcher.git
synced 2026-05-05 01:47:24 +00:00
Fixes to the custom preference and fixes to about page scaling
This commit is contained in:
parent
55ed5ea42d
commit
063135c9b1
5 changed files with 176 additions and 184 deletions
|
|
@ -5,6 +5,7 @@ import androidx.preference.Preference
|
||||||
import androidx.preference.PreferenceFragmentCompat
|
import androidx.preference.PreferenceFragmentCompat
|
||||||
import androidx.preference.SwitchPreference
|
import androidx.preference.SwitchPreference
|
||||||
import eu.ottop.yamlauncher.R
|
import eu.ottop.yamlauncher.R
|
||||||
|
import eu.ottop.yamlauncher.utils.UIUtils
|
||||||
|
|
||||||
class HomeSettingsFragment : PreferenceFragmentCompat(), TitleProvider {
|
class HomeSettingsFragment : PreferenceFragmentCompat(), TitleProvider {
|
||||||
|
|
||||||
|
|
@ -18,6 +19,7 @@ class HomeSettingsFragment : PreferenceFragmentCompat(), TitleProvider {
|
||||||
|
|
||||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||||
setPreferencesFromResource(R.xml.home_preferences, rootKey)
|
setPreferencesFromResource(R.xml.home_preferences, rootKey)
|
||||||
|
val uiUtils = UIUtils(requireContext())
|
||||||
|
|
||||||
sharedPreferenceManager = SharedPreferenceManager(requireContext())
|
sharedPreferenceManager = SharedPreferenceManager(requireContext())
|
||||||
|
|
||||||
|
|
@ -42,49 +44,29 @@ class HomeSettingsFragment : PreferenceFragmentCompat(), TitleProvider {
|
||||||
|
|
||||||
manualLocationPref?.onPreferenceClickListener =
|
manualLocationPref?.onPreferenceClickListener =
|
||||||
Preference.OnPreferenceClickListener {
|
Preference.OnPreferenceClickListener {
|
||||||
requireActivity().supportFragmentManager
|
uiUtils.switchFragment(requireActivity(), LocationFragment())
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.settingsLayout, LocationFragment())
|
|
||||||
.addToBackStack(null)
|
|
||||||
.commit()
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
leftSwipePref?.onPreferenceClickListener =
|
leftSwipePref?.onPreferenceClickListener =
|
||||||
Preference.OnPreferenceClickListener {
|
Preference.OnPreferenceClickListener {
|
||||||
requireActivity().supportFragmentManager
|
uiUtils.switchFragment(requireActivity(), GestureAppsFragment("left"))
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.settingsLayout, GestureAppsFragment("left"))
|
|
||||||
.addToBackStack(null)
|
|
||||||
.commit()
|
|
||||||
true }
|
true }
|
||||||
|
|
||||||
rightSwipePref?.onPreferenceClickListener =
|
rightSwipePref?.onPreferenceClickListener =
|
||||||
Preference.OnPreferenceClickListener {
|
Preference.OnPreferenceClickListener {
|
||||||
requireActivity().supportFragmentManager
|
uiUtils.switchFragment(requireActivity(), GestureAppsFragment("right"))
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.settingsLayout, GestureAppsFragment("right"))
|
|
||||||
.addToBackStack(null)
|
|
||||||
.commit()
|
|
||||||
true }
|
true }
|
||||||
|
|
||||||
clockApp?.onPreferenceClickListener =
|
clockApp?.onPreferenceClickListener =
|
||||||
Preference.OnPreferenceClickListener {
|
Preference.OnPreferenceClickListener {
|
||||||
requireActivity().supportFragmentManager
|
uiUtils.switchFragment(requireActivity(), GestureAppsFragment("clock"))
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.settingsLayout, GestureAppsFragment("clock"))
|
|
||||||
.addToBackStack(null)
|
|
||||||
.commit()
|
|
||||||
true }
|
true }
|
||||||
|
|
||||||
dateApp?.onPreferenceClickListener =
|
dateApp?.onPreferenceClickListener =
|
||||||
Preference.OnPreferenceClickListener {
|
Preference.OnPreferenceClickListener {
|
||||||
requireActivity().supportFragmentManager
|
uiUtils.switchFragment(requireActivity(), GestureAppsFragment("date"))
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.settingsLayout, GestureAppsFragment("date"))
|
|
||||||
.addToBackStack(null)
|
|
||||||
.commit()
|
|
||||||
true }
|
true }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,16 @@ package eu.ottop.yamlauncher.settings
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.os.Handler
|
||||||
|
import android.os.Looper
|
||||||
import android.provider.Settings
|
import android.provider.Settings
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import androidx.fragment.app.FragmentActivity
|
||||||
import androidx.preference.Preference
|
import androidx.preference.Preference
|
||||||
import androidx.preference.PreferenceFragmentCompat
|
import androidx.preference.PreferenceFragmentCompat
|
||||||
import eu.ottop.yamlauncher.R
|
import eu.ottop.yamlauncher.R
|
||||||
|
import eu.ottop.yamlauncher.utils.UIUtils
|
||||||
|
|
||||||
class SettingsFragment : PreferenceFragmentCompat(), TitleProvider {
|
class SettingsFragment : PreferenceFragmentCompat(), TitleProvider {
|
||||||
|
|
||||||
|
|
@ -15,6 +20,8 @@ class SettingsFragment : PreferenceFragmentCompat(), TitleProvider {
|
||||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||||
setPreferencesFromResource(R.xml.root_preferences, rootKey)
|
setPreferencesFromResource(R.xml.root_preferences, rootKey)
|
||||||
|
|
||||||
|
val uiUtils = UIUtils(requireContext())
|
||||||
|
|
||||||
sharedPreferenceManager = SharedPreferenceManager(requireContext())
|
sharedPreferenceManager = SharedPreferenceManager(requireContext())
|
||||||
|
|
||||||
val homePref = findPreference<Preference>("defaultHome")
|
val homePref = findPreference<Preference>("defaultHome")
|
||||||
|
|
@ -39,47 +46,27 @@ class SettingsFragment : PreferenceFragmentCompat(), TitleProvider {
|
||||||
|
|
||||||
uiSettings?.onPreferenceClickListener =
|
uiSettings?.onPreferenceClickListener =
|
||||||
Preference.OnPreferenceClickListener {
|
Preference.OnPreferenceClickListener {
|
||||||
requireActivity().supportFragmentManager
|
uiUtils.switchFragment(requireActivity(), UISettingsFragment())
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.settingsLayout, UISettingsFragment())
|
|
||||||
.addToBackStack(null)
|
|
||||||
.commit()
|
|
||||||
true }
|
true }
|
||||||
|
|
||||||
homeSettings?.onPreferenceClickListener =
|
homeSettings?.onPreferenceClickListener =
|
||||||
Preference.OnPreferenceClickListener {
|
Preference.OnPreferenceClickListener {
|
||||||
requireActivity().supportFragmentManager
|
uiUtils.switchFragment(requireActivity(), HomeSettingsFragment())
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.settingsLayout, HomeSettingsFragment())
|
|
||||||
.addToBackStack(null)
|
|
||||||
.commit()
|
|
||||||
true }
|
true }
|
||||||
|
|
||||||
appMenuSettings?.onPreferenceClickListener =
|
appMenuSettings?.onPreferenceClickListener =
|
||||||
Preference.OnPreferenceClickListener {
|
Preference.OnPreferenceClickListener {
|
||||||
requireActivity().supportFragmentManager
|
uiUtils.switchFragment(requireActivity(), AppMenuSettingsFragment())
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.settingsLayout, AppMenuSettingsFragment())
|
|
||||||
.addToBackStack(null)
|
|
||||||
.commit()
|
|
||||||
true }
|
true }
|
||||||
|
|
||||||
hiddenPref?.onPreferenceClickListener =
|
hiddenPref?.onPreferenceClickListener =
|
||||||
Preference.OnPreferenceClickListener {
|
Preference.OnPreferenceClickListener {
|
||||||
requireActivity().supportFragmentManager
|
uiUtils.switchFragment(requireActivity(), HiddenAppsFragment())
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.settingsLayout, HiddenAppsFragment())
|
|
||||||
.addToBackStack(null)
|
|
||||||
.commit()
|
|
||||||
true }
|
true }
|
||||||
|
|
||||||
aboutPref?.onPreferenceClickListener =
|
aboutPref?.onPreferenceClickListener =
|
||||||
Preference.OnPreferenceClickListener {
|
Preference.OnPreferenceClickListener {
|
||||||
requireActivity().supportFragmentManager
|
uiUtils.switchFragment(requireActivity(), AboutFragment())
|
||||||
.beginTransaction()
|
|
||||||
.replace(R.id.settingsLayout, AboutFragment())
|
|
||||||
.addToBackStack(null)
|
|
||||||
.commit()
|
|
||||||
true }
|
true }
|
||||||
|
|
||||||
resetPref?.onPreferenceClickListener =
|
resetPref?.onPreferenceClickListener =
|
||||||
|
|
@ -92,4 +79,6 @@ class SettingsFragment : PreferenceFragmentCompat(), TitleProvider {
|
||||||
return "Launcher Settings"
|
return "Launcher Settings"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package eu.ottop.yamlauncher.settings
|
package eu.ottop.yamlauncher.settings
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.content.res.TypedArray
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.os.Looper
|
import android.os.Looper
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
|
|
@ -46,7 +47,7 @@ class SpinnerPreference (context: Context, attrs: AttributeSet? = null): Prefere
|
||||||
spinner?.adapter = adapter
|
spinner?.adapter = adapter
|
||||||
}
|
}
|
||||||
|
|
||||||
val selectedIndex = entryValues?.indexOf(currentValue as? CharSequence) ?: 0
|
val selectedIndex = entryValues?.indexOf(currentValue as? CharSequence) ?: entryValues?.indexOf(defaultNo as CharSequence) ?: 0
|
||||||
spinner?.setSelection(selectedIndex)
|
spinner?.setSelection(selectedIndex)
|
||||||
|
|
||||||
// Somehow prevents an error :D
|
// Somehow prevents an error :D
|
||||||
|
|
@ -76,13 +77,9 @@ class SpinnerPreference (context: Context, attrs: AttributeSet? = null): Prefere
|
||||||
spinner?.performClick()
|
spinner?.performClick()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSetInitialValue(defaultValue: Any?) {
|
|
||||||
currentValue = getPersistedString(defaultValue as? String)
|
|
||||||
}
|
|
||||||
|
|
||||||
// This is required to ensure that default values are stored (needed for full settings reset)
|
|
||||||
override fun onAttached() {
|
override fun onAttached() {
|
||||||
super.onAttached()
|
super.onAttached()
|
||||||
|
currentValue = getPersistedString(defaultNo)
|
||||||
persistString(getPersistedString(defaultNo))
|
persistString(getPersistedString(defaultNo))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4,6 +4,8 @@ import android.content.Context
|
||||||
import android.graphics.BlendMode
|
import android.graphics.BlendMode
|
||||||
import android.graphics.BlendModeColorFilter
|
import android.graphics.BlendModeColorFilter
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
|
import android.os.Handler
|
||||||
|
import android.os.Looper
|
||||||
import android.util.TypedValue
|
import android.util.TypedValue
|
||||||
import android.view.Gravity
|
import android.view.Gravity
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
|
@ -18,8 +20,12 @@ import android.widget.TextClock
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import androidx.core.view.children
|
import androidx.core.view.children
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import androidx.fragment.app.FragmentActivity
|
||||||
import com.google.android.material.textfield.TextInputEditText
|
import com.google.android.material.textfield.TextInputEditText
|
||||||
|
import eu.ottop.yamlauncher.R
|
||||||
import eu.ottop.yamlauncher.settings.SharedPreferenceManager
|
import eu.ottop.yamlauncher.settings.SharedPreferenceManager
|
||||||
|
import eu.ottop.yamlauncher.settings.UISettingsFragment
|
||||||
|
|
||||||
class UIUtils(private val context: Context) {
|
class UIUtils(private val context: Context) {
|
||||||
|
|
||||||
|
|
@ -411,4 +417,12 @@ class UIUtils(private val context: Context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun switchFragment(activity: FragmentActivity, fragment: Fragment) {
|
||||||
|
activity.supportFragmentManager
|
||||||
|
.beginTransaction()
|
||||||
|
.replace(R.id.settingsLayout, fragment)
|
||||||
|
.addToBackStack(null)
|
||||||
|
.commit()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,151 +1,161 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/aboutLayout"
|
android:id="@+id/aboutLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
tools:context=".settings.AboutFragment">
|
tools:context=".settings.AboutFragment">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iconView"
|
android:id="@+id/iconView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="200dp"
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="5.5"
|
||||||
android:contentDescription="@string/app_icon"
|
android:contentDescription="@string/app_icon"
|
||||||
android:src="@drawable/ic_launcher_foreground"
|
android:src="@drawable/ic_launcher_foreground" />
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/appNameView"
|
android:id="@+id/appNameView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:autoSizeMinTextSize="5sp"
|
||||||
|
android:autoSizeTextType="uniform"
|
||||||
android:text="@string/app_name"
|
android:text="@string/app_name"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textSize="34sp"
|
android:textSize="34sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold" />
|
||||||
app:layout_constraintEnd_toEndOf="@+id/iconView"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/iconView" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/creditText"
|
android:id="@+id/creditText"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:autoSizeMinTextSize="5sp"
|
||||||
|
android:autoSizeTextType="uniform"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
android:text="@string/creditName"
|
android:text="@string/creditName"
|
||||||
android:textSize="17sp"
|
android:textSize="17sp" />
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/appNameView"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/appNameView" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/sourceTitle"
|
android:id="@+id/sourceTitle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:layout_marginTop="30dp"
|
android:layout_marginTop="30dp"
|
||||||
|
android:layout_weight="1.3"
|
||||||
|
android:autoSizeMinTextSize="5sp"
|
||||||
|
android:autoSizeTextType="uniform"
|
||||||
android:text="@string/source_code"
|
android:text="@string/source_code"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textSize="24sp"
|
android:textSize="24sp" />
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/creditText" />
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/divider"
|
android:id="@+id/divider"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:background="?android:attr/listDivider"
|
android:background="?android:attr/listDivider" />
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
<LinearLayout
|
||||||
app:layout_constraintTop_toBottomOf="@+id/sourceTitle" />
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/codebergLink"
|
android:id="@+id/codebergLink"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:autoSizeMinTextSize="5sp"
|
||||||
|
android:autoSizeTextType="uniform"
|
||||||
android:linksClickable="true"
|
android:linksClickable="true"
|
||||||
android:text="@string/codeberg"
|
android:text="@string/codeberg"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp" />
|
||||||
app:layout_constraintEnd_toStartOf="@+id/githubLink"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/divider" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/githubLink"
|
android:id="@+id/githubLink"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:autoSizeMinTextSize="5sp"
|
||||||
|
android:autoSizeTextType="uniform"
|
||||||
android:linksClickable="true"
|
android:linksClickable="true"
|
||||||
android:text="@string/github"
|
android:text="@string/github"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp" />
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
</LinearLayout>
|
||||||
app:layout_constraintStart_toEndOf="@+id/codebergLink"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/divider" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/donationTitle"
|
android:id="@+id/donationTitle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:layout_marginTop="40dp"
|
android:layout_marginTop="40dp"
|
||||||
|
android:layout_weight="1.3"
|
||||||
|
android:autoSizeMinTextSize="5sp"
|
||||||
|
android:autoSizeTextType="uniform"
|
||||||
android:text="@string/donate"
|
android:text="@string/donate"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textSize="24sp"
|
android:textSize="24sp" />
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/codebergLink" />
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/divider2"
|
android:id="@+id/divider2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:background="?android:attr/listDivider"
|
android:background="?android:attr/listDivider" />
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
<LinearLayout
|
||||||
app:layout_constraintTop_toBottomOf="@+id/donationTitle" />
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/stripeLink"
|
android:id="@+id/stripeLink"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_weight="1"
|
||||||
|
android:autoSizeMinTextSize="5sp"
|
||||||
|
android:autoSizeTextType="uniform"
|
||||||
android:linksClickable="true"
|
android:linksClickable="true"
|
||||||
android:text="@string/stripe"
|
android:text="@string/stripe"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp" />
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/liberaLink"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/divider2" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/liberaLink"
|
android:id="@+id/liberaLink"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_weight="1"
|
||||||
|
android:autoSizeMinTextSize="5sp"
|
||||||
|
android:autoSizeTextType="uniform"
|
||||||
android:linksClickable="true"
|
android:linksClickable="true"
|
||||||
android:text="@string/liberapay"
|
android:text="@string/liberapay"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp" />
|
||||||
app:layout_constraintEnd_toStartOf="@+id/stripeLink"
|
</LinearLayout>
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/divider2" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/weatherLink"
|
android:id="@+id/weatherLink"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginTop="150dp"
|
||||||
android:layout_marginBottom="20dp"
|
android:layout_marginBottom="20dp"
|
||||||
|
android:layout_weight="1.5"
|
||||||
|
android:autoSizeMinTextSize="5sp"
|
||||||
|
android:autoSizeTextType="uniform"
|
||||||
|
android:gravity="bottom|center_horizontal"
|
||||||
android:linksClickable="true"
|
android:linksClickable="true"
|
||||||
android:text="@string/weather_data_credit"
|
android:text="@string/weather_data_credit"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp" />
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</LinearLayout>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue