Skip to content

Commit f6827ce

Browse files
committed
updating commons
1 parent 69eac39 commit f6827ce

File tree

9 files changed

+107
-117
lines changed

9 files changed

+107
-117
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ android {
6262
}
6363

6464
dependencies {
65-
implementation 'com.github.SimpleMobileTools:Simple-Commons:a6032f9c07'
65+
implementation 'com.github.SimpleMobileTools:Simple-Commons:d41abd229b'
6666
implementation 'org.greenrobot:eventbus:3.3.1'
6767
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
6868
}

app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class MainActivity : SimpleActivity() {
4646
setupOptionsMenu()
4747
refreshMenuItems()
4848

49-
updateMaterialActivityViews(main_coordinator, main_holder)
49+
updateMaterialActivityViews(main_coordinator, main_holder, true)
5050
setupMaterialScrollListener(main_nested_scrollview, main_toolbar)
5151

5252
mBus = EventBus.getDefault()

app/src/main/kotlin/com/simplemobiletools/flashlight/activities/SettingsActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class SettingsActivity : SimpleActivity() {
1818
super.onCreate(savedInstanceState)
1919
setContentView(R.layout.activity_settings)
2020

21-
updateMaterialActivityViews(settings_coordinator, settings_holder)
21+
updateMaterialActivityViews(settings_coordinator, settings_holder, true)
2222
setupMaterialScrollListener(settings_nested_scrollview, settings_toolbar)
2323
}
2424

app/src/main/kotlin/com/simplemobiletools/flashlight/activities/WidgetBrightDisplayConfigureActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class WidgetBrightDisplayConfigureActivity : SimpleActivity() {
6666

6767
private fun initVariables() {
6868
mWidgetColor = config.widgetBgColor
69-
if (mWidgetColor == resources.getInteger(R.integer.default_widget_bg_color) && config.isUsingSystemTheme) {
69+
if (mWidgetColor == resources.getColor(R.color.default_widget_bg_color) && config.isUsingSystemTheme) {
7070
mWidgetColor = resources.getColor(R.color.you_primary_color, theme)
7171
}
7272

app/src/main/kotlin/com/simplemobiletools/flashlight/activities/WidgetTorchConfigureActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class WidgetTorchConfigureActivity : SimpleActivity() {
6767

6868
private fun initVariables() {
6969
mWidgetColor = config.widgetBgColor
70-
if (mWidgetColor == resources.getInteger(R.integer.default_widget_bg_color) && config.isUsingSystemTheme) {
70+
if (mWidgetColor == resources.getColor(R.color.default_widget_bg_color) && config.isUsingSystemTheme) {
7171
mWidgetColor = resources.getColor(R.color.you_primary_color, theme)
7272
}
7373

app/src/main/res/layout/activity_settings.xml

Lines changed: 100 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -80,140 +80,133 @@
8080
android:layout_height="wrap_content"
8181
android:text="@string/general_settings" />
8282

83-
<LinearLayout
84-
android:id="@+id/settings_general_settings_holder"
83+
<RelativeLayout
84+
android:id="@+id/settings_purchase_thank_you_holder"
85+
style="@style/SettingsHolderTextViewStyle"
8586
android:layout_width="match_parent"
86-
android:layout_height="wrap_content"
87-
android:orientation="vertical">
87+
android:layout_height="wrap_content">
8888

89-
<RelativeLayout
90-
android:id="@+id/settings_purchase_thank_you_holder"
91-
style="@style/SettingsHolderTextViewStyle"
92-
android:layout_width="match_parent"
93-
android:layout_height="wrap_content">
89+
<com.simplemobiletools.commons.views.MyTextView
90+
android:id="@+id/settings_purchase_thank_you"
91+
style="@style/SettingsTextLabelStyle"
92+
android:layout_width="wrap_content"
93+
android:layout_height="wrap_content"
94+
android:text="@string/purchase_simple_thank_you" />
9495

95-
<com.simplemobiletools.commons.views.MyTextView
96-
android:id="@+id/settings_purchase_thank_you"
97-
style="@style/SettingsTextLabelStyle"
98-
android:layout_width="wrap_content"
99-
android:layout_height="wrap_content"
100-
android:text="@string/purchase_simple_thank_you" />
96+
</RelativeLayout>
10197

102-
</RelativeLayout>
98+
<RelativeLayout
99+
android:id="@+id/settings_use_english_holder"
100+
style="@style/SettingsHolderCheckboxStyle"
101+
android:layout_width="match_parent"
102+
android:layout_height="wrap_content">
103103

104-
<RelativeLayout
105-
android:id="@+id/settings_use_english_holder"
106-
style="@style/SettingsHolderCheckboxStyle"
104+
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
105+
android:id="@+id/settings_use_english"
106+
style="@style/SettingsCheckboxStyle"
107107
android:layout_width="match_parent"
108-
android:layout_height="wrap_content">
108+
android:layout_height="wrap_content"
109+
android:text="@string/use_english_language" />
109110

110-
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
111-
android:id="@+id/settings_use_english"
112-
style="@style/SettingsCheckboxStyle"
113-
android:layout_width="match_parent"
114-
android:layout_height="wrap_content"
115-
android:text="@string/use_english_language" />
111+
</RelativeLayout>
116112

117-
</RelativeLayout>
113+
<RelativeLayout
114+
android:id="@+id/settings_language_holder"
115+
style="@style/SettingsHolderTextViewStyle"
116+
android:layout_width="match_parent"
117+
android:layout_height="wrap_content">
118118

119-
<RelativeLayout
120-
android:id="@+id/settings_language_holder"
121-
style="@style/SettingsHolderTextViewStyle"
122-
android:layout_width="match_parent"
123-
android:layout_height="wrap_content">
124-
125-
<com.simplemobiletools.commons.views.MyTextView
126-
android:id="@+id/settings_language_label"
127-
style="@style/SettingsTextLabelStyle"
128-
android:layout_width="wrap_content"
129-
android:layout_height="wrap_content"
130-
android:text="@string/language" />
131-
132-
<com.simplemobiletools.commons.views.MyTextView
133-
android:id="@+id/settings_language"
134-
style="@style/SettingsTextValueStyle"
135-
android:layout_width="wrap_content"
136-
android:layout_height="wrap_content"
137-
android:layout_below="@+id/settings_language_label"
138-
tools:text="English" />
139-
140-
</RelativeLayout>
141-
142-
<RelativeLayout
143-
android:id="@+id/settings_turn_flashlight_on_holder"
144-
style="@style/SettingsHolderCheckboxStyle"
145-
android:layout_width="match_parent"
146-
android:layout_height="wrap_content">
119+
<com.simplemobiletools.commons.views.MyTextView
120+
android:id="@+id/settings_language_label"
121+
style="@style/SettingsTextLabelStyle"
122+
android:layout_width="wrap_content"
123+
android:layout_height="wrap_content"
124+
android:text="@string/language" />
125+
126+
<com.simplemobiletools.commons.views.MyTextView
127+
android:id="@+id/settings_language"
128+
style="@style/SettingsTextValueStyle"
129+
android:layout_width="wrap_content"
130+
android:layout_height="wrap_content"
131+
android:layout_below="@+id/settings_language_label"
132+
tools:text="English" />
147133

148-
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
149-
android:id="@+id/settings_turn_flashlight_on"
150-
style="@style/SettingsCheckboxStyle"
151-
android:layout_width="match_parent"
152-
android:layout_height="wrap_content"
153-
android:text="@string/turn_flashlight_on" />
134+
</RelativeLayout>
154135

155-
</RelativeLayout>
136+
<RelativeLayout
137+
android:id="@+id/settings_turn_flashlight_on_holder"
138+
style="@style/SettingsHolderCheckboxStyle"
139+
android:layout_width="match_parent"
140+
android:layout_height="wrap_content">
156141

157-
<RelativeLayout
158-
android:id="@+id/settings_force_portrait_holder"
159-
style="@style/SettingsHolderCheckboxStyle"
142+
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
143+
android:id="@+id/settings_turn_flashlight_on"
144+
style="@style/SettingsCheckboxStyle"
160145
android:layout_width="match_parent"
161-
android:layout_height="wrap_content">
146+
android:layout_height="wrap_content"
147+
android:text="@string/turn_flashlight_on" />
162148

163-
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
164-
android:id="@+id/settings_force_portrait"
165-
style="@style/SettingsCheckboxStyle"
166-
android:layout_width="match_parent"
167-
android:layout_height="wrap_content"
168-
android:text="@string/force_portrait_mode" />
149+
</RelativeLayout>
169150

170-
</RelativeLayout>
151+
<RelativeLayout
152+
android:id="@+id/settings_force_portrait_holder"
153+
style="@style/SettingsHolderCheckboxStyle"
154+
android:layout_width="match_parent"
155+
android:layout_height="wrap_content">
171156

172-
<RelativeLayout
173-
android:id="@+id/settings_bright_display_holder"
174-
style="@style/SettingsHolderCheckboxStyle"
157+
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
158+
android:id="@+id/settings_force_portrait"
159+
style="@style/SettingsCheckboxStyle"
175160
android:layout_width="match_parent"
176-
android:layout_height="wrap_content">
161+
android:layout_height="wrap_content"
162+
android:text="@string/force_portrait_mode" />
177163

178-
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
179-
android:id="@+id/settings_bright_display"
180-
style="@style/SettingsCheckboxStyle"
181-
android:layout_width="match_parent"
182-
android:layout_height="wrap_content"
183-
android:text="@string/show_bright_display" />
164+
</RelativeLayout>
184165

185-
</RelativeLayout>
166+
<RelativeLayout
167+
android:id="@+id/settings_bright_display_holder"
168+
style="@style/SettingsHolderCheckboxStyle"
169+
android:layout_width="match_parent"
170+
android:layout_height="wrap_content">
186171

187-
<RelativeLayout
188-
android:id="@+id/settings_sos_holder"
189-
style="@style/SettingsHolderCheckboxStyle"
172+
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
173+
android:id="@+id/settings_bright_display"
174+
style="@style/SettingsCheckboxStyle"
190175
android:layout_width="match_parent"
191-
android:layout_height="wrap_content">
176+
android:layout_height="wrap_content"
177+
android:text="@string/show_bright_display" />
192178

193-
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
194-
android:id="@+id/settings_sos"
195-
style="@style/SettingsCheckboxStyle"
196-
android:layout_width="match_parent"
197-
android:layout_height="wrap_content"
198-
android:text="@string/show_sos" />
179+
</RelativeLayout>
199180

200-
</RelativeLayout>
181+
<RelativeLayout
182+
android:id="@+id/settings_sos_holder"
183+
style="@style/SettingsHolderCheckboxStyle"
184+
android:layout_width="match_parent"
185+
android:layout_height="wrap_content">
201186

202-
<RelativeLayout
203-
android:id="@+id/settings_stroboscope_holder"
204-
style="@style/SettingsHolderCheckboxStyle"
187+
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
188+
android:id="@+id/settings_sos"
189+
style="@style/SettingsCheckboxStyle"
205190
android:layout_width="match_parent"
206-
android:layout_height="wrap_content">
191+
android:layout_height="wrap_content"
192+
android:text="@string/show_sos" />
193+
194+
</RelativeLayout>
207195

208-
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
209-
android:id="@+id/settings_stroboscope"
210-
style="@style/SettingsCheckboxStyle"
211-
android:layout_width="match_parent"
212-
android:layout_height="wrap_content"
213-
android:text="@string/show_stroboscope" />
196+
<RelativeLayout
197+
android:id="@+id/settings_stroboscope_holder"
198+
style="@style/SettingsHolderCheckboxStyle"
199+
android:layout_width="match_parent"
200+
android:layout_height="wrap_content">
201+
202+
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
203+
android:id="@+id/settings_stroboscope"
204+
style="@style/SettingsCheckboxStyle"
205+
android:layout_width="match_parent"
206+
android:layout_height="wrap_content"
207+
android:text="@string/show_stroboscope" />
214208

215-
</RelativeLayout>
216-
</LinearLayout>
209+
</RelativeLayout>
217210
</LinearLayout>
218211
</androidx.core.widget.NestedScrollView>
219212
</androidx.coordinatorlayout.widget.CoordinatorLayout>

app/src/main/res/layout/widget_torch_config.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
android:layout_centerVertical="true"
5252
android:paddingStart="@dimen/activity_margin"
5353
android:paddingEnd="@dimen/activity_margin" />
54+
5455
</RelativeLayout>
5556

5657
<Button

app/src/main/res/values/colors.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
3+
<color name="default_widget_bg_color">#FFF57C00</color>
44
</resources>

app/src/main/res/values/integers.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)