split Settings into subsections

This commit is contained in:
tibbi 2018-05-15 20:48:41 +02:00
parent 107187e255
commit e2ae2caf11
22 changed files with 200 additions and 76 deletions

View File

@ -9,6 +9,7 @@ import com.simplemobiletools.camera.extensions.config
import com.simplemobiletools.commons.dialogs.FilePickerDialog
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
import com.simplemobiletools.commons.extensions.humanizePath
import com.simplemobiletools.commons.extensions.updateTextColors
import com.simplemobiletools.commons.helpers.LICENSE_GLIDE
@ -42,6 +43,7 @@ class SettingsActivity : SimpleActivity() {
setupSavePhotosFolder()
setupPhotoQuality()
updateTextColors(settings_holder)
setupSectionColors()
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
@ -57,6 +59,13 @@ class SettingsActivity : SimpleActivity() {
return true
}
private fun setupSectionColors() {
val adjustedPrimaryColor = getAdjustedPrimaryColor()
arrayListOf(shutter_label, startup_label, saving_label).forEach {
it.setTextColor(adjustedPrimaryColor)
}
}
private fun setupCustomizeColors() {
settings_customize_colors_holder.setOnClickListener {
startCustomizationActivity()

View File

@ -80,7 +80,7 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_show_preview_holder"
android:id="@+id/settings_keep_settings_visible_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
@ -91,39 +91,17 @@
android:paddingTop="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_show_preview"
android:id="@+id/settings_keep_settings_visible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:paddingLeft="@dimen/medium_margin"
android:paddingStart="@dimen/medium_margin"
android:text="@string/show_preview"/>
android:text="@string/keep_settings_visible"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_sound_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingBottom="@dimen/activity_margin"
android:paddingLeft="@dimen/normal_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_sound"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:paddingLeft="@dimen/medium_margin"
android:paddingStart="@dimen/medium_margin"
android:text="@string/shutter_sound"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_focus_before_capture_holder"
@ -148,6 +126,47 @@
</RelativeLayout>
<View
android:id="@+id/shutter_divider"
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/divider_grey"
android:importantForAccessibility="no"/>
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/shutter_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/bigger_margin"
android:layout_marginStart="@dimen/bigger_margin"
android:layout_marginTop="@dimen/activity_margin"
android:text="@string/shutter"
android:textAllCaps="true"
android:textSize="@dimen/smaller_text_size"/>
<RelativeLayout
android:id="@+id/settings_sound_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingBottom="@dimen/activity_margin"
android:paddingLeft="@dimen/normal_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_sound"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:paddingLeft="@dimen/medium_margin"
android:paddingStart="@dimen/medium_margin"
android:text="@string/shutter_sound"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_volume_buttons_as_shutter_holder"
android:layout_width="match_parent"
@ -171,6 +190,24 @@
</RelativeLayout>
<View
android:id="@+id/startup_divider"
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/divider_grey"
android:importantForAccessibility="no"/>
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/startup_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/bigger_margin"
android:layout_marginStart="@dimen/bigger_margin"
android:layout_marginTop="@dimen/activity_margin"
android:text="@string/startup"
android:textAllCaps="true"
android:textSize="@dimen/smaller_text_size"/>
<RelativeLayout
android:id="@+id/settings_turn_flash_off_at_startup_holder"
android:layout_width="match_parent"
@ -194,52 +231,6 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_flip_photos_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingBottom="@dimen/activity_margin"
android:paddingLeft="@dimen/normal_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_flip_photos"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:paddingLeft="@dimen/medium_margin"
android:paddingStart="@dimen/medium_margin"
android:text="@string/flip_front_camera_photos_horizontally"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_keep_settings_visible_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingBottom="@dimen/activity_margin"
android:paddingLeft="@dimen/normal_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_keep_settings_visible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:paddingLeft="@dimen/medium_margin"
android:paddingStart="@dimen/medium_margin"
android:text="@string/keep_settings_visible"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_always_open_back_camera_holder"
android:layout_width="match_parent"
@ -263,6 +254,24 @@
</RelativeLayout>
<View
android:id="@+id/saving_divider"
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/divider_grey"
android:importantForAccessibility="no"/>
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/saving_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/bigger_margin"
android:layout_marginStart="@dimen/bigger_margin"
android:layout_marginTop="@dimen/activity_margin"
android:text="@string/saving"
android:textAllCaps="true"
android:textSize="@dimen/smaller_text_size"/>
<RelativeLayout
android:id="@+id/settings_save_photo_metadata_holder"
android:layout_width="match_parent"
@ -286,6 +295,52 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_show_preview_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingBottom="@dimen/activity_margin"
android:paddingLeft="@dimen/normal_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_show_preview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:paddingLeft="@dimen/medium_margin"
android:paddingStart="@dimen/medium_margin"
android:text="@string/show_preview"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_flip_photos_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingBottom="@dimen/activity_margin"
android:paddingLeft="@dimen/normal_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/settings_flip_photos"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:paddingLeft="@dimen/medium_margin"
android:paddingStart="@dimen/medium_margin"
android:text="@string/flip_front_camera_photos_horizontally"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_save_photos_holder"
android:layout_width="match_parent"

View File

@ -35,6 +35,9 @@
<string name="always_open_back_camera">دائما فتح التطبيق مع الكاميرا الخلفية</string>
<string name="save_photo_metadata">حفظ بيانات الصورة الوصفية</string>
<string name="photo_compression_quality">Photo compression quality</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -35,6 +35,9 @@
<string name="always_open_back_camera">Tətbiqi həmişə Arxa kamerada başlat</string>
<string name="save_photo_metadata">Şəklin haqqında əlavələri saxla</string>
<string name="photo_compression_quality">Şəkil sıxışdırma keyfiyyəti</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -35,6 +35,9 @@
<string name="always_open_back_camera">Starte App immer mit der Rückkamera</string>
<string name="save_photo_metadata">Exif-Metadaten speichern</string>
<string name="photo_compression_quality">Fotokomprimierungsqualität</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -31,10 +31,13 @@
<string name="volume_buttons_as_shutter">Utilizar los botones de volumen como obturador</string>
<string name="turn_flash_off_at_startup">Turn flash off at startup</string>
<string name="flip_front_camera_photos_horizontally">Flip front camera photos horizontally</string>
<string name="keep_settings_visible">Keep setting buttons visible</string>
<string name="keep_settings_visible">Keep the setting buttons visible</string>
<string name="always_open_back_camera">Always open the app with the Back camera</string>
<string name="save_photo_metadata">Save photo exif metadata</string>
<string name="photo_compression_quality">Photo compression quality</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -35,6 +35,9 @@
<string name="always_open_back_camera">Toujours ouvrir l\'application avec la caméra arrière</string>
<string name="save_photo_metadata">Sauvegarder les méta-données exif de la photo</string>
<string name="photo_compression_quality">Qualité des photos</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Play Store. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -35,6 +35,9 @@
<string name="always_open_back_camera">Abrir sempre o aplicativo coa cámara traseira</string>
<string name="save_photo_metadata">Gardar metadatos exif da foto</string>
<string name="photo_compression_quality">Calidade da compresión da foto</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -35,6 +35,9 @@
<string name="always_open_back_camera">Uvijek otvorite aplikaciju pomoću stražnje kamere</string>
<string name="save_photo_metadata">Spremite exif metapodatke fotografije</string>
<string name="photo_compression_quality">Kvaliteta kompresije fotografije</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -31,10 +31,13 @@
<string name="volume_buttons_as_shutter">Use volume buttons as shutter</string>
<string name="turn_flash_off_at_startup">Turn flash off at startup</string>
<string name="flip_front_camera_photos_horizontally">Flip front camera photos horizontally</string>
<string name="keep_settings_visible">Keep setting buttons visible</string>
<string name="keep_settings_visible">Keep the setting buttons visible</string>
<string name="always_open_back_camera">Always open the app with the Back camera</string>
<string name="save_photo_metadata">Save photo exif metadata</string>
<string name="photo_compression_quality">Photo compression quality</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -31,10 +31,13 @@
<string name="volume_buttons_as_shutter">音量ボタンで撮影</string>
<string name="turn_flash_off_at_startup">Turn flash off at startup</string>
<string name="flip_front_camera_photos_horizontally">Flip front camera photos horizontally</string>
<string name="keep_settings_visible">Keep setting buttons visible</string>
<string name="keep_settings_visible">Keep the setting buttons visible</string>
<string name="always_open_back_camera">Always open the app with the Back camera</string>
<string name="save_photo_metadata">Save photo exif metadata</string>
<string name="photo_compression_quality">Photo compression quality</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -35,6 +35,9 @@
<string name="always_open_back_camera">항상 후면카메라로 실행</string>
<string name="save_photo_metadata">사진 exif 메타 데이터 저장</string>
<string name="photo_compression_quality">사진 압축 품질</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -35,6 +35,9 @@
<string name="always_open_back_camera">Visada atidaryti programėlę su nustatyta galine kamera</string>
<string name="save_photo_metadata">Išsaugoti nuotraukos exif metaduomenis</string>
<string name="photo_compression_quality">Nuotraukos suspaudimo kokybė</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -31,10 +31,13 @@
<string name="volume_buttons_as_shutter">Use volume buttons as shutter</string>
<string name="turn_flash_off_at_startup">Turn flash off at startup</string>
<string name="flip_front_camera_photos_horizontally">Flip front camera photos horizontally</string>
<string name="keep_settings_visible">Keep setting buttons visible</string>
<string name="keep_settings_visible">Keep the setting buttons visible</string>
<string name="always_open_back_camera">Always open the app with the Back camera</string>
<string name="save_photo_metadata">Save photo exif metadata</string>
<string name="photo_compression_quality">Photo compression quality</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -35,6 +35,9 @@
<string name="always_open_back_camera">Zawsze otwieraj aplikację z włączoną tylną kamerą</string>
   <string name="save_photo_metadata">Zapisuj dane EXIF w zdjęciach</string>
<string name="photo_compression_quality">Poziom kompresji zdjęć</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -35,6 +35,9 @@
<string name="always_open_back_camera">Sempre abrir o app com a câmera traseira</string>
<string name="save_photo_metadata">Salvar metadados exif com a foto</string>
<string name="photo_compression_quality">Photo compression quality</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -35,6 +35,9 @@
<string name="always_open_back_camera">Abrir a aplicação sempre com a câmara traseira</string>
<string name="save_photo_metadata">Guardar dados exif das fotos</string>
<string name="photo_compression_quality">Qualidade da compressão</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -35,6 +35,9 @@
<string name="always_open_back_camera">Всегда включать заднюю камеру при запуске</string>
<string name="save_photo_metadata">Сохранять данные EXIF</string>
<string name="photo_compression_quality">Качество фото после сжатия</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -35,6 +35,9 @@
<string name="always_open_back_camera">Stále otvárať aplikáciu s aktívnou zadnou kamerou</string>
<string name="save_photo_metadata">Ukladať exif metadáta fotografií</string>
<string name="photo_compression_quality">Kvalita kompresie fotiek</string>
<string name="saving">Ukladanie</string>
<string name="startup">Po spustení</string>
<string name="shutter">Spúšť</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -35,6 +35,9 @@
<string name="always_open_back_camera">Växla till den bakre kameran när appen öppnas</string>
<string name="save_photo_metadata">Spara fotonas Exif-metadata</string>
<string name="photo_compression_quality">Fotokomprimeringskvalitet</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -35,6 +35,9 @@
<string name="always_open_back_camera">開啟程式總是用後鏡頭</string>
<string name="save_photo_metadata">儲存相片EXIF資訊</string>
<string name="photo_compression_quality">相片壓縮品質</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->

View File

@ -31,10 +31,13 @@
<string name="volume_buttons_as_shutter">Use volume buttons as shutter</string>
<string name="turn_flash_off_at_startup">Turn flash off at startup</string>
<string name="flip_front_camera_photos_horizontally">Flip front camera photos horizontally</string>
<string name="keep_settings_visible">Keep setting buttons visible</string>
<string name="keep_settings_visible">Keep the setting buttons visible</string>
<string name="always_open_back_camera">Always open the app with the Back camera</string>
<string name="save_photo_metadata">Save photo exif metadata</string>
<string name="photo_compression_quality">Photo compression quality</string>
<string name="saving">Saving</string>
<string name="startup">Startup</string>
<string name="shutter">Shutter</string>
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
<!-- Short description has to have less than 80 chars -->