mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-04-19 01:37:24 +02:00
use new styles at settings
This commit is contained in:
parent
805d7fe692
commit
ec422f82e6
@ -63,7 +63,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:f38bfd22d5'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:d949143b75'
|
||||||
implementation 'androidx.documentfile:documentfile:1.0.1'
|
implementation 'androidx.documentfile:documentfile:1.0.1'
|
||||||
implementation "androidx.exifinterface:exifinterface:1.3.5"
|
implementation "androidx.exifinterface:exifinterface:1.3.5"
|
||||||
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.5.1"
|
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.5.1"
|
||||||
|
@ -57,18 +57,9 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
).forEach {
|
).forEach {
|
||||||
it.setTextColor(properPrimaryColor)
|
it.setTextColor(properPrimaryColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
arrayOf(
|
|
||||||
settings_color_customization_holder,
|
|
||||||
settings_general_settings_holder,
|
|
||||||
settings_shutter_holder,
|
|
||||||
settings_saving_holder
|
|
||||||
).forEach {
|
|
||||||
it.background.applyColorFilter(getProperBackgroundColor().getContrastColor())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun refreshMenuItems() {
|
private fun refreshMenuItems() {
|
||||||
settings_toolbar.menu.apply {
|
settings_toolbar.menu.apply {
|
||||||
findItem(R.id.more_apps_from_us).isVisible = !resources.getBoolean(R.bool.hide_google_relations)
|
findItem(R.id.more_apps_from_us).isVisible = !resources.getBoolean(R.bool.hide_google_relations)
|
||||||
}
|
}
|
||||||
@ -87,13 +78,6 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
|
|
||||||
private fun setupPurchaseThankYou() {
|
private fun setupPurchaseThankYou() {
|
||||||
settings_purchase_thank_you_holder.beGoneIf(isOrWasThankYouInstalled())
|
settings_purchase_thank_you_holder.beGoneIf(isOrWasThankYouInstalled())
|
||||||
|
|
||||||
// make sure the corners at ripple fit the stroke rounded corners
|
|
||||||
if (settings_purchase_thank_you_holder.isGone()) {
|
|
||||||
settings_use_english_holder.background = resources.getDrawable(R.drawable.ripple_all_corners, theme)
|
|
||||||
settings_language_holder.background = resources.getDrawable(R.drawable.ripple_all_corners, theme)
|
|
||||||
}
|
|
||||||
|
|
||||||
settings_purchase_thank_you_holder.setOnClickListener {
|
settings_purchase_thank_you_holder.setOnClickListener {
|
||||||
launchPurchaseThankYouIntent()
|
launchPurchaseThankYouIntent()
|
||||||
}
|
}
|
||||||
@ -101,7 +85,7 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
|
|
||||||
private fun setupCustomizeColors() {
|
private fun setupCustomizeColors() {
|
||||||
settings_customize_colors_label.text = getCustomizeColorsString()
|
settings_customize_colors_label.text = getCustomizeColorsString()
|
||||||
settings_customize_colors_holder.setOnClickListener {
|
settings_color_customization_holder.setOnClickListener {
|
||||||
handleCustomizeColorsClick()
|
handleCustomizeColorsClick()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,30 +36,26 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/color_customization" />
|
android:text="@string/color_customization" />
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/settings_color_customization_holder"
|
android:id="@+id/settings_color_customization_holder"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="@dimen/medium_margin"
|
|
||||||
android:background="@drawable/section_holder_stroke"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_customize_colors_holder"
|
|
||||||
style="@style/SettingsHolderTextViewOneLinerStyle"
|
style="@style/SettingsHolderTextViewOneLinerStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:background="@drawable/ripple_all_corners">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/settings_customize_colors_label"
|
android:id="@+id/settings_customize_colors_label"
|
||||||
style="@style/SettingsTextLabelStyle"
|
style="@style/SettingsTextLabelStyle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/customize_colors" />
|
android:text="@string/customize_colors"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</LinearLayout>
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/settings_color_customization_divider"
|
||||||
|
layout="@layout/divider" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/settings_general_settings_label"
|
android:id="@+id/settings_general_settings_label"
|
||||||
@ -72,16 +68,13 @@
|
|||||||
android:id="@+id/settings_general_settings_holder"
|
android:id="@+id/settings_general_settings_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/medium_margin"
|
|
||||||
android:background="@drawable/section_holder_stroke"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_purchase_thank_you_holder"
|
android:id="@+id/settings_purchase_thank_you_holder"
|
||||||
style="@style/SettingsHolderTextViewOneLinerStyle"
|
style="@style/SettingsHolderTextViewOneLinerStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:background="@drawable/ripple_top_corners">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/settings_purchase_thank_you"
|
android:id="@+id/settings_purchase_thank_you"
|
||||||
@ -96,8 +89,7 @@
|
|||||||
android:id="@+id/settings_use_english_holder"
|
android:id="@+id/settings_use_english_holder"
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:background="@drawable/ripple_background">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
android:id="@+id/settings_use_english"
|
android:id="@+id/settings_use_english"
|
||||||
@ -112,8 +104,7 @@
|
|||||||
android:id="@+id/settings_language_holder"
|
android:id="@+id/settings_language_holder"
|
||||||
style="@style/SettingsHolderTextViewStyle"
|
style="@style/SettingsHolderTextViewStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:background="@drawable/ripple_bottom_corners">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/settings_language_label"
|
android:id="@+id/settings_language_label"
|
||||||
@ -133,6 +124,10 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/settings_general_settings_divider"
|
||||||
|
layout="@layout/divider" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/settings_shutter_label"
|
android:id="@+id/settings_shutter_label"
|
||||||
style="@style/SettingsSectionLabelStyle"
|
style="@style/SettingsSectionLabelStyle"
|
||||||
@ -144,16 +139,13 @@
|
|||||||
android:id="@+id/settings_shutter_holder"
|
android:id="@+id/settings_shutter_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/medium_margin"
|
|
||||||
android:background="@drawable/section_holder_stroke"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_sound_holder"
|
android:id="@+id/settings_sound_holder"
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:background="@drawable/ripple_top_corners">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
android:id="@+id/settings_sound"
|
android:id="@+id/settings_sound"
|
||||||
@ -168,8 +160,7 @@
|
|||||||
android:id="@+id/settings_volume_buttons_as_shutter_holder"
|
android:id="@+id/settings_volume_buttons_as_shutter_holder"
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:background="@drawable/ripple_bottom_corners">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
android:id="@+id/settings_volume_buttons_as_shutter"
|
android:id="@+id/settings_volume_buttons_as_shutter"
|
||||||
@ -181,6 +172,10 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/settings_shutter_divider"
|
||||||
|
layout="@layout/divider" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/settings_saving_label"
|
android:id="@+id/settings_saving_label"
|
||||||
style="@style/SettingsSectionLabelStyle"
|
style="@style/SettingsSectionLabelStyle"
|
||||||
@ -192,16 +187,13 @@
|
|||||||
android:id="@+id/settings_saving_holder"
|
android:id="@+id/settings_saving_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/medium_margin"
|
|
||||||
android:background="@drawable/section_holder_stroke"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_save_photo_metadata_holder"
|
android:id="@+id/settings_save_photo_metadata_holder"
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:background="@drawable/ripple_top_corners">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
android:id="@+id/settings_save_photo_metadata"
|
android:id="@+id/settings_save_photo_metadata"
|
||||||
@ -216,8 +208,7 @@
|
|||||||
android:id="@+id/settings_flip_photos_holder"
|
android:id="@+id/settings_flip_photos_holder"
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:background="@drawable/ripple_background">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
android:id="@+id/settings_flip_photos"
|
android:id="@+id/settings_flip_photos"
|
||||||
@ -232,8 +223,7 @@
|
|||||||
android:id="@+id/settings_save_photos_holder"
|
android:id="@+id/settings_save_photos_holder"
|
||||||
style="@style/SettingsHolderTextViewStyle"
|
style="@style/SettingsHolderTextViewStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:background="@drawable/ripple_background">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/settings_save_photos_label"
|
android:id="@+id/settings_save_photos_label"
|
||||||
@ -256,8 +246,7 @@
|
|||||||
android:id="@+id/settings_photo_quality_holder"
|
android:id="@+id/settings_photo_quality_holder"
|
||||||
style="@style/SettingsHolderTextViewStyle"
|
style="@style/SettingsHolderTextViewStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:background="@drawable/ripple_background">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/settings_photo_quality_label"
|
android:id="@+id/settings_photo_quality_label"
|
||||||
@ -280,8 +269,7 @@
|
|||||||
android:id="@+id/settings_capture_mode_holder"
|
android:id="@+id/settings_capture_mode_holder"
|
||||||
style="@style/SettingsHolderTextViewStyle"
|
style="@style/SettingsHolderTextViewStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:background="@drawable/ripple_bottom_corners">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/settings_capture_mode_label"
|
android:id="@+id/settings_capture_mode_label"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user