Skip to content

Commit 3f1ecc4

Browse files
committed
wip
Signed-off-by: Andrey Parfenov <a1994ndrey@gmail.com>
1 parent 65b71bc commit 3f1ecc4

6 files changed

Lines changed: 43 additions & 15 deletions

File tree

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ dependencies {
3232
testImplementation 'junit:junit:4.12'
3333
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
3434
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
35-
35+
implementation 'com.github.michael-rapp:android-material-preferences:5.3.2'
3636
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@
1414
android:layout_width="match_parent"
1515
android:layout_height="wrap_content"
1616
android:text="@string/submit_button"
17-
android:onClick="prepareSession"
18-
android:theme="@style/PreferenceStartTheme"/>
17+
android:onClick="prepareSession" />
1918
</LinearLayout>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33
<color name="colorPrimary">#6200EE</color>
44
<color name="colorPrimaryDark">#3700B3</color>
55
<color name="colorAccent">#03DAC5</color>
6-
<color name="black">#000000</color>
76
</resources>

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,14 @@
3232
<string name="submit_key">submit_key</string>
3333
<string name="title_activity_data">DataActivity</string>
3434

35+
<string name="units">Hz</string>
36+
<string name="bp_message">Configure BandPass Filter</string>
37+
<string name="bp_title">BandPass</string>
38+
<string name="bp_summary">Configure BandPass Filter</string>
39+
<string name="bp_key">bp_key</string>
40+
<string name="bs_message">Configure BandStop Filter</string>
41+
<string name="bs_title">BandStop</string>
42+
<string name="bs_summary">Configure BandStop Filter</string>
43+
<string name="bs_key">bs_key</string>
44+
<string name="resolution_preference_separator">-</string>
3545
</resources>

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

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
<resources>
2-
<!-- Base application theme. -->
3-
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
4-
<!-- Customize your theme here. -->
5-
<item name="colorPrimary">@color/colorPrimary</item>
6-
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
7-
<item name="colorAccent">@color/colorAccent</item>
8-
</style>
92

10-
<style name="PreferenceStartTheme" parent="Widget.AppCompat.Button.Colored">
11-
<!-- Customize your theme here. -->
12-
<item name="colorButtonNormal">@color/colorAccent</item>
13-
<item name="android:textColor">@color/black</item>
3+
<style name="AppTheme" parent="@style/Theme.MaterialComponents.Light.DarkActionBar">
144
</style>
155

166
</resources>

app/src/main/res/xml/root_preferences.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,36 @@
3535
app:defaultValue="EEG"
3636
app:useSimpleSummaryProvider="true"/>
3737

38+
<de.mrapp.android.preference.ResolutionPreference
39+
app:defaultValue="1-50"
40+
app:unit="@string/units"
41+
app:dialogTitleColor="@android:color/white"
42+
app:dialogMessageColor="@android:color/white"
43+
app:dialogButtonTextColor="@android:color/white"
44+
app:dialogBackground="@color/cardview_shadow_start_color"
45+
app:dialogMessage="@string/bp_message"
46+
app:dialogTitle="@string/bp_title"
47+
app:key="@string/bp_key"
48+
app:summary="@string/bp_summary"
49+
app:title="@string/bp_title"
50+
app:showValueAsSummary="true"
51+
app:dialogThemeResource="@style/MaterialDialog"/>
52+
53+
<de.mrapp.android.preference.ResolutionPreference
54+
app:defaultValue="58-62"
55+
app:unit="@string/units"
56+
app:dialogTitleColor="@android:color/white"
57+
app:dialogMessageColor="@android:color/white"
58+
app:dialogButtonTextColor="@android:color/white"
59+
app:dialogBackground="@color/cardview_shadow_start_color"
60+
app:dialogMessage="@string/bs_message"
61+
app:dialogTitle="@string/bs_title"
62+
app:key="@string/bs_key"
63+
app:summary="@string/bs_summary"
64+
app:title="@string/bs_title"
65+
app:showValueAsSummary="true"
66+
app:dialogThemeResource="@style/MaterialDialog" />
67+
3868
</PreferenceCategory>
3969

4070
</PreferenceScreen>

0 commit comments

Comments
 (0)