mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-02-16 20:00:36 +01:00
allow changing the selected date and time format
This commit is contained in:
parent
12f0d5c193
commit
d12ab55d17
@ -2,6 +2,7 @@ package com.simplemobiletools.filemanager.pro.activities
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.simplemobiletools.commons.dialogs.ChangeDateTimeFormatDialog
|
||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||
import com.simplemobiletools.commons.dialogs.SecurityDialog
|
||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||
@ -28,6 +29,7 @@ class SettingsActivity : SimpleActivity() {
|
||||
setupCustomizeColors()
|
||||
setupUseEnglish()
|
||||
setupManageFavorites()
|
||||
setupChangeDateTimeFormat()
|
||||
setupShowHidden()
|
||||
setupHiddenItemPasswordProtection()
|
||||
setupAppPasswordProtection()
|
||||
@ -52,12 +54,6 @@ class SettingsActivity : SimpleActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupManageFavorites() {
|
||||
settings_manage_favorites_holder.setOnClickListener {
|
||||
startActivity(Intent(this, FavoritesActivity::class.java))
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupUseEnglish() {
|
||||
settings_use_english_holder.beVisibleIf(config.wasUseEnglishToggled || Locale.getDefault().language != "en")
|
||||
settings_use_english.isChecked = config.useEnglish
|
||||
@ -68,6 +64,18 @@ class SettingsActivity : SimpleActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupManageFavorites() {
|
||||
settings_manage_favorites_holder.setOnClickListener {
|
||||
startActivity(Intent(this, FavoritesActivity::class.java))
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupChangeDateTimeFormat() {
|
||||
settings_change_date_time_format_holder.setOnClickListener {
|
||||
ChangeDateTimeFormatDialog(this) {}
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupShowHidden() {
|
||||
settings_show_hidden.isChecked = config.showHidden
|
||||
settings_show_hidden_holder.setOnClickListener {
|
||||
|
@ -33,6 +33,29 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_use_english_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingLeft="@dimen/normal_margin"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/normal_margin"
|
||||
android:paddingBottom="@dimen/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||
android:id="@+id/settings_use_english"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:paddingStart="@dimen/medium_margin"
|
||||
android:text="@string/use_english_language"
|
||||
app:switchPadding="@dimen/medium_margin"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_manage_favorites_holder"
|
||||
android:layout_width="match_parent"
|
||||
@ -56,7 +79,7 @@
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_use_english_holder"
|
||||
android:id="@+id/settings_change_date_time_format_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
@ -66,15 +89,13 @@
|
||||
android:paddingRight="@dimen/normal_margin"
|
||||
android:paddingBottom="@dimen/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||
android:id="@+id/settings_use_english"
|
||||
android:layout_width="match_parent"
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/settings_change_date_time_format"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingStart="@dimen/medium_margin"
|
||||
android:text="@string/use_english_language"
|
||||
app:switchPadding="@dimen/medium_margin"/>
|
||||
android:text="@string/change_date_and_time_format"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user