diff options
| author | cherifyass <cherif.esir@gmail.com> | 2015-03-25 17:36:49 +0100 |
|---|---|---|
| committer | cherifyass <cherif.esir@gmail.com> | 2015-03-26 15:18:29 +0100 |
| commit | 179d7ec7dbd6e22c31ead79576a39922a94fe1c9 (patch) | |
| tree | 65375f41d45f3e1e828eb8bf5fe7ebb71978f484 | |
| parent | a2f4a97bb1ab08ab9d189e0c6ae9a0e957af5910 (diff) | |
DSPManager: materialize
Based on Max Weninger's work on PerformanceControl app
PS6: CheckBoxPreference
Change-Id: I07cc004d674de9b5d4c950b62e1befc07bc59f83
| -rw-r--r-- | AndroidManifest.xml | 2 | ||||
| -rw-r--r-- | res/drawable-hdpi/ic_drawer.png | bin | 2829 -> 0 bytes | |||
| -rw-r--r-- | res/drawable-hdpi/ic_drawer_raw.png | bin | 0 -> 176 bytes | |||
| -rw-r--r-- | res/drawable-mdpi/ic_drawer.png | bin | 2820 -> 0 bytes | |||
| -rw-r--r-- | res/drawable-mdpi/ic_drawer_raw.png | bin | 0 -> 163 bytes | |||
| -rw-r--r-- | res/drawable-xhdpi/ic_drawer.png | bin | 2836 -> 0 bytes | |||
| -rw-r--r-- | res/drawable-xhdpi/ic_drawer_raw.png | bin | 0 -> 187 bytes | |||
| -rw-r--r-- | res/drawable/ic_drawer_white.xml | 24 | ||||
| -rw-r--r-- | res/layout/activity_main.xml | 4 | ||||
| -rw-r--r-- | res/layout/drawer_item.xml | 15 | ||||
| -rw-r--r-- | res/values/colors.xml | 7 | ||||
| -rw-r--r-- | res/values/config.xml | 4 | ||||
| -rw-r--r-- | res/values/styles.xml | 9 | ||||
| -rw-r--r-- | res/values/themes.xml | 22 | ||||
| -rw-r--r-- | res/xml/boefflasoundcontrol_preferences.xml | 2 | ||||
| -rw-r--r-- | src/com/bel/android/dspmanager/activity/DSPManager.java | 2 | ||||
| -rw-r--r-- | src/com/bel/android/dspmanager/modules/boefflasoundcontrol/BoefflaSoundControl.java | 6 |
17 files changed, 58 insertions, 39 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 93eb912..97426b4 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -4,7 +4,7 @@ android:versionCode="3" android:versionName="2.1"> - <uses-sdk android:minSdkVersion="14" /> + <uses-sdk android:minSdkVersion="21" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> diff --git a/res/drawable-hdpi/ic_drawer.png b/res/drawable-hdpi/ic_drawer.png Binary files differdeleted file mode 100644 index c59f601..0000000 --- a/res/drawable-hdpi/ic_drawer.png +++ /dev/null diff --git a/res/drawable-hdpi/ic_drawer_raw.png b/res/drawable-hdpi/ic_drawer_raw.png Binary files differnew file mode 100644 index 0000000..e09c893 --- /dev/null +++ b/res/drawable-hdpi/ic_drawer_raw.png diff --git a/res/drawable-mdpi/ic_drawer.png b/res/drawable-mdpi/ic_drawer.png Binary files differdeleted file mode 100644 index 1ed2c56..0000000 --- a/res/drawable-mdpi/ic_drawer.png +++ /dev/null diff --git a/res/drawable-mdpi/ic_drawer_raw.png b/res/drawable-mdpi/ic_drawer_raw.png Binary files differnew file mode 100644 index 0000000..e208b9a --- /dev/null +++ b/res/drawable-mdpi/ic_drawer_raw.png diff --git a/res/drawable-xhdpi/ic_drawer.png b/res/drawable-xhdpi/ic_drawer.png Binary files differdeleted file mode 100644 index a5fa74d..0000000 --- a/res/drawable-xhdpi/ic_drawer.png +++ /dev/null diff --git a/res/drawable-xhdpi/ic_drawer_raw.png b/res/drawable-xhdpi/ic_drawer_raw.png Binary files differnew file mode 100644 index 0000000..afea5a1 --- /dev/null +++ b/res/drawable-xhdpi/ic_drawer_raw.png diff --git a/res/drawable/ic_drawer_white.xml b/res/drawable/ic_drawer_white.xml new file mode 100644 index 0000000..2e91172 --- /dev/null +++ b/res/drawable/ic_drawer_white.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* + * Copyright (C) 2015 The OmniROM Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> + +<bitmap xmlns:android="http://schemas.android.com/apk/res/android" + android:src="@drawable/ic_drawer_raw" + android:autoMirrored="true" + android:tint="@android:color/white"> +</bitmap> diff --git a/res/layout/activity_main.xml b/res/layout/activity_main.xml index d6c1364..92cf4be 100644 --- a/res/layout/activity_main.xml +++ b/res/layout/activity_main.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2013 The OmniROM Project +<!-- Copyright (C) 2015 The OmniROM Project This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -30,7 +30,7 @@ <ListView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/dsp_navigation_drawer" - android:background="@drawable/pager_background" + android:background="@color/navigation_drawer" android:layout_width="260dp" android:layout_height="match_parent" android:layout_gravity="start" diff --git a/res/layout/drawer_item.xml b/res/layout/drawer_item.xml index 5fc75f2..c0b8b9b 100644 --- a/res/layout/drawer_item.xml +++ b/res/layout/drawer_item.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2013 Alexander "Evisceration" Martinz + Copyright (C) 2015 The OmniROM Project This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,11 +34,15 @@ <TextView android:id="@+id/drawer_title" - android:layout_width="wrap_content" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_toRightOf="@+id/drawer_icon" - android:layout_centerVertical="true" - android:textColor="#fff" - android:textSize="15sp" /> + android:textColor="#111" + android:textSize="15sp" + android:background="?android:attr/activatedBackgroundIndicator" + android:textAppearance="?android:attr/textAppearanceListItemSmall" + android:minHeight="?android:attr/listPreferredItemHeightSmall" + android:gravity="center_vertical" + android:paddingLeft="16dp" + android:paddingRight="16dp" /> </RelativeLayout> diff --git a/res/values/colors.xml b/res/values/colors.xml index 335b437..f38ecbf 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2012-2013 The CyanogenMod Project + Copyright (C) 2015 The OmniROM Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -29,4 +30,10 @@ <color name="cb_shader">#ffccffff</color> <color name="cb_shader_alpha">#44ccffff</color> <color name="action_bar_color">#ff0d0d0d</color> + + <!-- Material --> + <color name="primary">#009688</color> + <color name="primary_dark">#00796B</color> + <color name="accent">#009688</color> + <color name="navigation_drawer">#fff</color> </resources> diff --git a/res/values/config.xml b/res/values/config.xml index 1b9474e..12ae924 100644 --- a/res/values/config.xml +++ b/res/values/config.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2013 The OmniROM Project +<!-- Copyright (C) 2015 The OmniROM Project This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,6 @@ <bool name="config_use_tabbed">false</bool> <!-- If false, user can't switch between menu_tabbed and menu_drawer mode --> - <bool name="config_allow_toggle_tabbed">true</bool> + <bool name="config_allow_toggle_tabbed">false</bool> </resources> diff --git a/res/values/styles.xml b/res/values/styles.xml index 17bab44..67fb656 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (C) 2012-2013 The CyanogenMod Project + Copyright (C) 2015 The OmniROM Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,7 +16,11 @@ --> <resources xmlns:android="http://schemas.android.com/apk/res/android"> - <style name="action_bar_style" parent="android:Widget.ActionBar"> - <item name="android:background">@color/action_bar_color</item> + <style name="AppTheme" parent="@android:style/Theme.Material.Light.DarkActionBar"> + <item name="android:colorPrimary">@color/primary</item> + <item name="android:colorPrimaryDark">@color/primary_dark</item> + <item name="android:colorAccent">@color/accent</item> + <item name="android:navigationBarColor">@color/primary_dark</item> </style> + </resources> diff --git a/res/values/themes.xml b/res/values/themes.xml deleted file mode 100644 index 7ea0570..0000000 --- a/res/values/themes.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2012-2013 The CyanogenMod Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<resources xmlns:android="http://schemas.android.com/apk/res/android"> - - <style name="AppTheme" parent="android:Theme.Holo"> - <item name="android:actionBarStyle">@style/action_bar_style</item> - </style> -</resources> - diff --git a/res/xml/boefflasoundcontrol_preferences.xml b/res/xml/boefflasoundcontrol_preferences.xml index 8190447..187c4f4 100644 --- a/res/xml/boefflasoundcontrol_preferences.xml +++ b/res/xml/boefflasoundcontrol_preferences.xml @@ -18,7 +18,7 @@ android:title="@string/boeffla_sound_control" xmlns:dsp="http://schemas.android.com/apk/res/com.bel.android.dspmanager"> - <SwitchPreference + <CheckBoxPreference android:key="boeffla_sound" android:title="@string/boeffla_sound_title" android:summary="@string/boeffla_sound_summary" diff --git a/src/com/bel/android/dspmanager/activity/DSPManager.java b/src/com/bel/android/dspmanager/activity/DSPManager.java index 4d41b00..96a3295 100644 --- a/src/com/bel/android/dspmanager/activity/DSPManager.java +++ b/src/com/bel/android/dspmanager/activity/DSPManager.java @@ -497,7 +497,7 @@ public final class DSPManager extends Activity { mDrawerToggle = new ActionBarDrawerToggle( this, mDrawerLayout, - R.drawable.ic_drawer, + R.drawable.ic_drawer_white, R.string.navigation_drawer_open, R.string.navigation_drawer_close ) { diff --git a/src/com/bel/android/dspmanager/modules/boefflasoundcontrol/BoefflaSoundControl.java b/src/com/bel/android/dspmanager/modules/boefflasoundcontrol/BoefflaSoundControl.java index ba748b5..3c096c8 100644 --- a/src/com/bel/android/dspmanager/modules/boefflasoundcontrol/BoefflaSoundControl.java +++ b/src/com/bel/android/dspmanager/modules/boefflasoundcontrol/BoefflaSoundControl.java @@ -23,7 +23,7 @@ import android.preference.CheckBoxPreference; import android.preference.ListPreference; import android.preference.Preference; import android.preference.PreferenceFragment; -import android.preference.SwitchPreference; +import android.preference.CheckBoxPreference; import com.bel.android.dspmanager.R; import com.bel.android.dspmanager.activity.DSPManager; @@ -41,7 +41,7 @@ public class BoefflaSoundControl extends PreferenceFragment // Fields //========================= public static final String NAME = "BoefflaSoundControl"; - private SwitchPreference mBoefflaSound; + private CheckBoxPreference mBoefflaSound; // General private CheckBoxPreference mDACDirect; private CheckBoxPreference mDACOversampling; @@ -92,7 +92,7 @@ public class BoefflaSoundControl extends PreferenceFragment addPreferencesFromResource(R.xml.boefflasoundcontrol_preferences); - mBoefflaSound = (SwitchPreference) findPreference(BOEFFLA_SOUND); + mBoefflaSound = (CheckBoxPreference) findPreference(BOEFFLA_SOUND); updateBoefflaSound(); mBoefflaSound.setOnPreferenceChangeListener(this); |
