mirror of
https://github.com/SimpleMobileTools/Simple-Flashlight.git
synced 2025-04-25 07:28:45 +02:00
updating commons
This commit is contained in:
parent
69eac399db
commit
f6827cec6d
@ -62,7 +62,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:a6032f9c07'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:d41abd229b'
|
||||||
implementation 'org.greenrobot:eventbus:3.3.1'
|
implementation 'org.greenrobot:eventbus:3.3.1'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ class MainActivity : SimpleActivity() {
|
|||||||
setupOptionsMenu()
|
setupOptionsMenu()
|
||||||
refreshMenuItems()
|
refreshMenuItems()
|
||||||
|
|
||||||
updateMaterialActivityViews(main_coordinator, main_holder)
|
updateMaterialActivityViews(main_coordinator, main_holder, true)
|
||||||
setupMaterialScrollListener(main_nested_scrollview, main_toolbar)
|
setupMaterialScrollListener(main_nested_scrollview, main_toolbar)
|
||||||
|
|
||||||
mBus = EventBus.getDefault()
|
mBus = EventBus.getDefault()
|
||||||
|
@ -18,7 +18,7 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_settings)
|
setContentView(R.layout.activity_settings)
|
||||||
|
|
||||||
updateMaterialActivityViews(settings_coordinator, settings_holder)
|
updateMaterialActivityViews(settings_coordinator, settings_holder, true)
|
||||||
setupMaterialScrollListener(settings_nested_scrollview, settings_toolbar)
|
setupMaterialScrollListener(settings_nested_scrollview, settings_toolbar)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ class WidgetBrightDisplayConfigureActivity : SimpleActivity() {
|
|||||||
|
|
||||||
private fun initVariables() {
|
private fun initVariables() {
|
||||||
mWidgetColor = config.widgetBgColor
|
mWidgetColor = config.widgetBgColor
|
||||||
if (mWidgetColor == resources.getInteger(R.integer.default_widget_bg_color) && config.isUsingSystemTheme) {
|
if (mWidgetColor == resources.getColor(R.color.default_widget_bg_color) && config.isUsingSystemTheme) {
|
||||||
mWidgetColor = resources.getColor(R.color.you_primary_color, theme)
|
mWidgetColor = resources.getColor(R.color.you_primary_color, theme)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ class WidgetTorchConfigureActivity : SimpleActivity() {
|
|||||||
|
|
||||||
private fun initVariables() {
|
private fun initVariables() {
|
||||||
mWidgetColor = config.widgetBgColor
|
mWidgetColor = config.widgetBgColor
|
||||||
if (mWidgetColor == resources.getInteger(R.integer.default_widget_bg_color) && config.isUsingSystemTheme) {
|
if (mWidgetColor == resources.getColor(R.color.default_widget_bg_color) && config.isUsingSystemTheme) {
|
||||||
mWidgetColor = resources.getColor(R.color.you_primary_color, theme)
|
mWidgetColor = resources.getColor(R.color.you_primary_color, theme)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,140 +80,133 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/general_settings" />
|
android:text="@string/general_settings" />
|
||||||
|
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_general_settings_holder"
|
android:id="@+id/settings_purchase_thank_you_holder"
|
||||||
|
style="@style/SettingsHolderTextViewStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/settings_purchase_thank_you_holder"
|
android:id="@+id/settings_purchase_thank_you"
|
||||||
style="@style/SettingsHolderTextViewStyle"
|
style="@style/SettingsTextLabelStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/purchase_simple_thank_you" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_use_english_holder"
|
||||||
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/settings_use_english"
|
||||||
|
style="@style/SettingsCheckboxStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/use_english_language" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
</RelativeLayout>
|
||||||
android:id="@+id/settings_purchase_thank_you"
|
|
||||||
style="@style/SettingsTextLabelStyle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/purchase_simple_thank_you" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_language_holder"
|
||||||
|
style="@style/SettingsHolderTextViewStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/settings_use_english_holder"
|
android:id="@+id/settings_language_label"
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
style="@style/SettingsTextLabelStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/language" />
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/settings_language"
|
||||||
|
style="@style/SettingsTextValueStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/settings_language_label"
|
||||||
|
tools:text="English" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_turn_flashlight_on_holder"
|
||||||
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/settings_turn_flashlight_on"
|
||||||
|
style="@style/SettingsCheckboxStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/turn_flashlight_on" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
</RelativeLayout>
|
||||||
android:id="@+id/settings_use_english"
|
|
||||||
style="@style/SettingsCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/use_english_language" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_force_portrait_holder"
|
||||||
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
android:id="@+id/settings_language_holder"
|
android:id="@+id/settings_force_portrait"
|
||||||
style="@style/SettingsHolderTextViewStyle"
|
style="@style/SettingsCheckboxStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/force_portrait_mode" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
</RelativeLayout>
|
||||||
android:id="@+id/settings_language_label"
|
|
||||||
style="@style/SettingsTextLabelStyle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/language" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<RelativeLayout
|
||||||
android:id="@+id/settings_language"
|
android:id="@+id/settings_bright_display_holder"
|
||||||
style="@style/SettingsTextValueStyle"
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:layout_below="@+id/settings_language_label"
|
|
||||||
tools:text="English" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/settings_bright_display"
|
||||||
<RelativeLayout
|
style="@style/SettingsCheckboxStyle"
|
||||||
android:id="@+id/settings_turn_flashlight_on_holder"
|
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/show_bright_display" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
</RelativeLayout>
|
||||||
android:id="@+id/settings_turn_flashlight_on"
|
|
||||||
style="@style/SettingsCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/turn_flashlight_on" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_sos_holder"
|
||||||
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
android:id="@+id/settings_force_portrait_holder"
|
android:id="@+id/settings_sos"
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
style="@style/SettingsCheckboxStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/show_sos" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
</RelativeLayout>
|
||||||
android:id="@+id/settings_force_portrait"
|
|
||||||
style="@style/SettingsCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/force_portrait_mode" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_stroboscope_holder"
|
||||||
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
android:id="@+id/settings_bright_display_holder"
|
android:id="@+id/settings_stroboscope"
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
style="@style/SettingsCheckboxStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/show_stroboscope" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
</RelativeLayout>
|
||||||
android:id="@+id/settings_bright_display"
|
|
||||||
style="@style/SettingsCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/show_bright_display" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_sos_holder"
|
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
|
||||||
android:id="@+id/settings_sos"
|
|
||||||
style="@style/SettingsCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/show_sos" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_stroboscope_holder"
|
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
|
||||||
android:id="@+id/settings_stroboscope"
|
|
||||||
style="@style/SettingsCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/show_stroboscope" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:paddingStart="@dimen/activity_margin"
|
android:paddingStart="@dimen/activity_margin"
|
||||||
android:paddingEnd="@dimen/activity_margin" />
|
android:paddingEnd="@dimen/activity_margin" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
<color name="default_widget_bg_color">#FFF57C00</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<integer name="default_widget_bg_color">-571114496</integer> <!-- #DDF57C00 -->
|
|
||||||
</resources>
|
|
Loading…
x
Reference in New Issue
Block a user