Skip to content

Commit 2c1d43c

Browse files
committed
Merge pull request #326 from fat-tire/develop
Settings: Use PreferenceFragmentCompat Here goes nothin'
2 parents 38f9158 + 175918d commit 2c1d43c

6 files changed

Lines changed: 465 additions & 664 deletions

File tree

cSploit/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ dependencies {
2424
compile 'com.android.support:support-v4:23.0.1'
2525
compile 'com.android.support:appcompat-v7:23.0.1'
2626
compile 'com.android.support:design:23.0.1'
27+
compile 'com.android.support:preference-v7:23.0.1'
2728
compile 'org.apache.commons:commons-compress:1.10'
2829
compile 'commons-net:commons-net:3.3'
2930
compile 'com.github.zafarkhaja:java-semver:0.9.0'

cSploit/res/values/style.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<item name="android:windowBackground">@color/background_window</item>
77
<item name="colorPrimary">@color/app_color</item>
88
<!-- darker variant of colorPrimary (for status bar, contextual app bars) -->
9-
<item name="colorPrimaryDark">@color/holo_blue</item>
9+
<item name="colorPrimaryDark">#0082b2</item>
1010
<!-- theme UI controls like checkboxes and text fields -->
1111
<item name="colorAccent">@color/selectable_blue</item>
1212
<item name="actionModeBackground">@color/app_color_dark</item>
@@ -25,9 +25,16 @@
2525
<item name="colorAccent">@color/selectable_blue_dark</item>
2626
<item name="colorControlHighlight">@color/selectable_blue_dark</item>
2727
<item name="android:windowBackground">@color/background_window_dark</item>
28-
<item name="android:colorBackground">@color/material_blue_grey_950</item>
28+
<item name="android:colorBackground">#ff21272b</item>
2929
</style>
3030

31+
<style name="PrefsTheme" parent="AppTheme">
32+
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
33+
</style>
34+
35+
<style name="PrefsThemeDark" parent="DarkTheme">
36+
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
37+
</style>
3138

3239
<style name="Theme.CSploitActionBarStyle" parent="@style/Widget.AppCompat.Light.ActionBar.Solid">
3340
<item name="android:windowBackground">@color/background_window</item>

cSploit/res/xml-v14/preferences.xml

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

cSploit/res/xml/preferences.xml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<PreferenceCategory android:title="@string/pref_general" >
77

8-
<CheckBoxPreference
8+
<SwitchPreferenceCompat
99
android:defaultValue="true"
1010
android:key="PREF_WAKE_LOCK"
1111
android:summary="@string/pref_wake_lock_desc"
@@ -16,61 +16,61 @@
1616
android:summary="@string/pref_save_path_desc"
1717
android:title="@string/pref_save_path" />
1818

19-
<CheckBoxPreference
19+
<SwitchPreferenceCompat
2020
android:defaultValue="false"
2121
android:key="PREF_DEBUG_ERROR_LOGGING"
2222
android:summary="@string/pref_debug_error_logging_desc"
2323
android:title="@string/pref_debug_error_logging" />
2424

25-
<CheckBoxPreference
25+
<SwitchPreferenceCompat
2626
android:defaultValue="false"
2727
android:key="PREF_ENABLE_PROFILER"
2828
android:summary="@string/pref_enable_profiler_desc"
2929
android:title="@string/pref_enable_profiler" />
3030

31-
<CheckBoxPreference
31+
<SwitchPreferenceCompat
3232
android:defaultValue="false"
3333
android:key="PREF_DARK_THEME"
3434
android:summary="@string/pref_choose_theme"
3535
android:title="@string/pref_theme" />
3636
</PreferenceCategory>
3737

3838
<PreferenceCategory android:title="@string/pref_updates" >
39-
<CheckBoxPreference
39+
<SwitchPreferenceCompat
4040
android:defaultValue="true"
4141
android:key="PREF_CHECK_UPDATES"
4242
android:summary="@string/pref_check_updates_desc"
4343
android:title="@string/pref_check_updates" />
4444

45-
<CheckBoxPreference
45+
<SwitchPreferenceCompat
4646
android:defaultValue="true"
4747
android:key="PREF_UPDATES_APP"
4848
android:dependency="PREF_CHECK_UPDATES"
4949
android:summary="@string/pref_updates_app_desc"
5050
android:title="@string/pref_updates_app" />
5151

52-
<CheckBoxPreference
52+
<SwitchPreferenceCompat
5353
android:defaultValue="true"
5454
android:key="PREF_UPDATES_CORE"
5555
android:dependency="PREF_CHECK_UPDATES"
5656
android:summary="@string/pref_updates_core_desc"
5757
android:title="@string/pref_updates_core" />
5858

59-
<CheckBoxPreference
59+
<SwitchPreferenceCompat
6060
android:defaultValue="true"
6161
android:key="PREF_UPDATES_RUBY"
6262
android:dependency="PREF_CHECK_UPDATES"
6363
android:summary="@string/pref_updates_ruby_desc"
6464
android:title="@string/pref_updates_ruby" />
6565

66-
<CheckBoxPreference
66+
<SwitchPreferenceCompat
6767
android:defaultValue="true"
6868
android:key="PREF_UPDATES_GEMS"
6969
android:dependency="PREF_CHECK_UPDATES"
7070
android:summary="@string/pref_updates_gems_desc"
7171
android:title="@string/pref_updates_gems" />
7272

73-
<CheckBoxPreference
73+
<SwitchPreferenceCompat
7474
android:defaultValue="true"
7575
android:key="PREF_UPDATES_MSF"
7676
android:dependency="PREF_CHECK_UPDATES"
@@ -102,7 +102,7 @@
102102
android:summary="@string/pref_http_server_port_desc"
103103
android:title="@string/pref_http_server_port" />
104104

105-
<CheckBoxPreference
105+
<SwitchPreferenceCompat
106106
android:defaultValue="true"
107107
android:key="PREF_HTTPS_REDIRECT"
108108
android:summary="@string/pref_https_redirect_desc"
@@ -147,7 +147,7 @@
147147
android:summary="@string/choose_method"
148148
android:title="@string/pref_performance_exploit_desc" />
149149

150-
<CheckBoxPreference
150+
<SwitchPreferenceCompat
151151
android:defaultValue="false"
152152
android:key="WIDE_SCAN"
153153
android:summary="@string/pref_performance_widescan_desc"
@@ -157,13 +157,13 @@
157157

158158
<PreferenceCategory android:title="@string/pref_msf" >
159159

160-
<CheckBoxPreference
160+
<SwitchPreferenceCompat
161161
android:defaultValue="true"
162162
android:key="MSF_ENABLED"
163163
android:title="@string/pref_msf_enable"
164164
android:summary="@string/pref_msf_enable_desc" />
165165

166-
<CheckBoxPreference
166+
<SwitchPreferenceCompat
167167
android:defaultValue="true"
168168
android:key="MSF_NOTIFICATIONS"
169169
android:title="@string/pref_msf_notifications"
@@ -203,7 +203,7 @@
203203
android:summary="@string/pref_rpc_host_desc"
204204
android:title="@string/pref_rpc_host" />
205205

206-
<CheckBoxPreference
206+
<SwitchPreferenceCompat
207207
android:defaultValue="false"
208208
android:key="MSF_RPC_SSL"
209209
android:summary="@string/pref_rpc_ssl_desc"

0 commit comments

Comments
 (0)