mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-04-13 18:02:09 +02: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.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import com.simplemobiletools.commons.dialogs.ChangeDateTimeFormatDialog
|
||||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||||
import com.simplemobiletools.commons.dialogs.SecurityDialog
|
import com.simplemobiletools.commons.dialogs.SecurityDialog
|
||||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||||
@ -28,6 +29,7 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
setupCustomizeColors()
|
setupCustomizeColors()
|
||||||
setupUseEnglish()
|
setupUseEnglish()
|
||||||
setupManageFavorites()
|
setupManageFavorites()
|
||||||
|
setupChangeDateTimeFormat()
|
||||||
setupShowHidden()
|
setupShowHidden()
|
||||||
setupHiddenItemPasswordProtection()
|
setupHiddenItemPasswordProtection()
|
||||||
setupAppPasswordProtection()
|
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() {
|
private fun setupUseEnglish() {
|
||||||
settings_use_english_holder.beVisibleIf(config.wasUseEnglishToggled || Locale.getDefault().language != "en")
|
settings_use_english_holder.beVisibleIf(config.wasUseEnglishToggled || Locale.getDefault().language != "en")
|
||||||
settings_use_english.isChecked = config.useEnglish
|
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() {
|
private fun setupShowHidden() {
|
||||||
settings_show_hidden.isChecked = config.showHidden
|
settings_show_hidden.isChecked = config.showHidden
|
||||||
settings_show_hidden_holder.setOnClickListener {
|
settings_show_hidden_holder.setOnClickListener {
|
||||||
|
@ -33,6 +33,29 @@
|
|||||||
|
|
||||||
</RelativeLayout>
|
</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
|
<RelativeLayout
|
||||||
android:id="@+id/settings_manage_favorites_holder"
|
android:id="@+id/settings_manage_favorites_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -56,7 +79,7 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<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_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
@ -66,15 +89,13 @@
|
|||||||
android:paddingRight="@dimen/normal_margin"
|
android:paddingRight="@dimen/normal_margin"
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
android:paddingBottom="@dimen/activity_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/settings_use_english"
|
android:id="@+id/settings_change_date_time_format"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@null"
|
android:layout_centerVertical="true"
|
||||||
android:clickable="false"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
android:text="@string/use_english_language"
|
android:text="@string/change_date_and_time_format"/>
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user