diff options
author | linuxx <joey@cyanogenmoditalia.it> | 2015-02-14 23:52:14 +0100 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2015-04-07 20:38:11 +0000 |
commit | 24f0c37d381b43282e693f099b009c12023bf895 (patch) | |
tree | 82b3e7f238e86221aee98bd7a8da38dfd3240010 | |
parent | 8b0304bd887adf7a78004aba2f27bf51b6119784 (diff) | |
download | android_hardware_qcom_fm-24f0c37d381b43282e693f099b009c12023bf895.tar.gz android_hardware_qcom_fm-24f0c37d381b43282e693f099b009c12023bf895.tar.bz2 android_hardware_qcom_fm-24f0c37d381b43282e693f099b009c12023bf895.zip |
fmapp2: materialize
* Update colors
* Vectors
* Off state messages
Change-Id: I0186edda6c408fcde3dd98cd886ced775adbd938
Signed-off-by: linuxx <joey@cyanogenmoditalia.it>
92 files changed, 304 insertions, 83 deletions
diff --git a/fmapp2/AndroidManifest.xml b/fmapp2/AndroidManifest.xml index 7cc6658..cfa0bea 100644 --- a/fmapp2/AndroidManifest.xml +++ b/fmapp2/AndroidManifest.xml @@ -45,11 +45,14 @@ <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL"/> <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" /> + <uses-sdk android:minSdkVersion="21"/> + <application android:icon="@mipmap/ic_launcher_fmradio" android:label="@string/app_name" android:allowTaskReparenting="true" android:taskAffinity="com.caf.task.fmradio" + android:theme="@style/FMTheme" android:name=".FMAdapterApp"> <uses-library android:name="qcom.fmradio" @@ -63,6 +66,7 @@ android:allowTaskReparenting="true" android:launchMode="singleTask" android:configChanges="orientation|keyboardHidden|screenSize" + android:theme="@style/FMTheme" android:excludeFromRecents="false" > <intent-filter> @@ -85,6 +89,7 @@ </receiver> <activity android:name=".Settings" + android:theme="@style/FMTheme" android:label="@string/menu_settings"> <intent-filter> @@ -98,6 +103,7 @@ android:label="@string/tx_app_name" android:clearTaskOnLaunch="true" android:taskAffinity="" + android:theme="@style/FMTheme" android:excludeFromRecents="false"> <intent-filter> diff --git a/fmapp2/res/drawable-hdpi/btn_arrow_left_default.png b/fmapp2/res/drawable-hdpi/btn_arrow_left_default.png Binary files differdeleted file mode 100644 index 8ac0c4e..0000000 --- a/fmapp2/res/drawable-hdpi/btn_arrow_left_default.png +++ /dev/null diff --git a/fmapp2/res/drawable-hdpi/btn_arrow_left_press.png b/fmapp2/res/drawable-hdpi/btn_arrow_left_press.png Binary files differdeleted file mode 100644 index 8ded17a..0000000 --- a/fmapp2/res/drawable-hdpi/btn_arrow_left_press.png +++ /dev/null diff --git a/fmapp2/res/drawable-hdpi/btn_arrow_right_default.png b/fmapp2/res/drawable-hdpi/btn_arrow_right_default.png Binary files differdeleted file mode 100644 index 330bb9f..0000000 --- a/fmapp2/res/drawable-hdpi/btn_arrow_right_default.png +++ /dev/null diff --git a/fmapp2/res/drawable-hdpi/btn_arrow_right_press.png b/fmapp2/res/drawable-hdpi/btn_arrow_right_press.png Binary files differdeleted file mode 100644 index f3206bf..0000000 --- a/fmapp2/res/drawable-hdpi/btn_arrow_right_press.png +++ /dev/null diff --git a/fmapp2/res/drawable-hdpi/ic_btn_earphone_default.png b/fmapp2/res/drawable-hdpi/ic_btn_earphone_default.png Binary files differdeleted file mode 100644 index 2f45a17..0000000 --- a/fmapp2/res/drawable-hdpi/ic_btn_earphone_default.png +++ /dev/null diff --git a/fmapp2/res/drawable-hdpi/ic_btn_earphone_diable.png b/fmapp2/res/drawable-hdpi/ic_btn_earphone_diable.png Binary files differdeleted file mode 100644 index 2f45a17..0000000 --- a/fmapp2/res/drawable-hdpi/ic_btn_earphone_diable.png +++ /dev/null diff --git a/fmapp2/res/drawable-hdpi/ic_btn_earphone_select.png b/fmapp2/res/drawable-hdpi/ic_btn_earphone_select.png Binary files differdeleted file mode 100644 index 66ac5c1..0000000 --- a/fmapp2/res/drawable-hdpi/ic_btn_earphone_select.png +++ /dev/null diff --git a/fmapp2/res/drawable-hdpi/ic_btn_onoff_default.png b/fmapp2/res/drawable-hdpi/ic_btn_onoff_default.png Binary files differdeleted file mode 100644 index 456c77f..0000000 --- a/fmapp2/res/drawable-hdpi/ic_btn_onoff_default.png +++ /dev/null diff --git a/fmapp2/res/drawable-hdpi/ic_btn_onoff_disable.png b/fmapp2/res/drawable-hdpi/ic_btn_onoff_disable.png Binary files differdeleted file mode 100644 index 6fac84e..0000000 --- a/fmapp2/res/drawable-hdpi/ic_btn_onoff_disable.png +++ /dev/null diff --git a/fmapp2/res/drawable-hdpi/ic_btn_onoff_press.png b/fmapp2/res/drawable-hdpi/ic_btn_onoff_press.png Binary files differdeleted file mode 100644 index 94893c2..0000000 --- a/fmapp2/res/drawable-hdpi/ic_btn_onoff_press.png +++ /dev/null diff --git a/fmapp2/res/drawable-hdpi/ic_btn_spaker_select.png b/fmapp2/res/drawable-hdpi/ic_btn_spaker_select.png Binary files differdeleted file mode 100644 index 1b14993..0000000 --- a/fmapp2/res/drawable-hdpi/ic_btn_spaker_select.png +++ /dev/null diff --git a/fmapp2/res/drawable-hdpi/ic_silent_mode.png b/fmapp2/res/drawable-hdpi/ic_silent_mode.png Binary files differdeleted file mode 100644 index 1bb2631..0000000 --- a/fmapp2/res/drawable-hdpi/ic_silent_mode.png +++ /dev/null diff --git a/fmapp2/res/drawable-hdpi/ic_silent_mode_off.png b/fmapp2/res/drawable-hdpi/ic_silent_mode_off.png Binary files differdeleted file mode 100644 index 76a7498..0000000 --- a/fmapp2/res/drawable-hdpi/ic_silent_mode_off.png +++ /dev/null diff --git a/fmapp2/res/drawable-hdpi/stat_notify_fm.png b/fmapp2/res/drawable-hdpi/stat_notify_fm.png Binary files differindex d729ffb..ad804c1 100644 --- a/fmapp2/res/drawable-hdpi/stat_notify_fm.png +++ b/fmapp2/res/drawable-hdpi/stat_notify_fm.png diff --git a/fmapp2/res/drawable-mdpi/btn_arrow_left_default.png b/fmapp2/res/drawable-mdpi/btn_arrow_left_default.png Binary files differdeleted file mode 100644 index 13fc36f..0000000 --- a/fmapp2/res/drawable-mdpi/btn_arrow_left_default.png +++ /dev/null diff --git a/fmapp2/res/drawable-mdpi/btn_arrow_left_press.png b/fmapp2/res/drawable-mdpi/btn_arrow_left_press.png Binary files differdeleted file mode 100644 index 822151e..0000000 --- a/fmapp2/res/drawable-mdpi/btn_arrow_left_press.png +++ /dev/null diff --git a/fmapp2/res/drawable-mdpi/btn_arrow_right_default.png b/fmapp2/res/drawable-mdpi/btn_arrow_right_default.png Binary files differdeleted file mode 100644 index b2d6cf7..0000000 --- a/fmapp2/res/drawable-mdpi/btn_arrow_right_default.png +++ /dev/null diff --git a/fmapp2/res/drawable-mdpi/btn_arrow_right_press.png b/fmapp2/res/drawable-mdpi/btn_arrow_right_press.png Binary files differdeleted file mode 100644 index d217663..0000000 --- a/fmapp2/res/drawable-mdpi/btn_arrow_right_press.png +++ /dev/null diff --git a/fmapp2/res/drawable-mdpi/ic_btn_earphone_default.png b/fmapp2/res/drawable-mdpi/ic_btn_earphone_default.png Binary files differdeleted file mode 100644 index 384a6bd..0000000 --- a/fmapp2/res/drawable-mdpi/ic_btn_earphone_default.png +++ /dev/null diff --git a/fmapp2/res/drawable-mdpi/ic_btn_earphone_diable.png b/fmapp2/res/drawable-mdpi/ic_btn_earphone_diable.png Binary files differdeleted file mode 100644 index 384a6bd..0000000 --- a/fmapp2/res/drawable-mdpi/ic_btn_earphone_diable.png +++ /dev/null diff --git a/fmapp2/res/drawable-mdpi/ic_btn_earphone_select.png b/fmapp2/res/drawable-mdpi/ic_btn_earphone_select.png Binary files differdeleted file mode 100644 index 543dc81..0000000 --- a/fmapp2/res/drawable-mdpi/ic_btn_earphone_select.png +++ /dev/null diff --git a/fmapp2/res/drawable-mdpi/ic_btn_onoff_default.png b/fmapp2/res/drawable-mdpi/ic_btn_onoff_default.png Binary files differdeleted file mode 100644 index 0f21a6c..0000000 --- a/fmapp2/res/drawable-mdpi/ic_btn_onoff_default.png +++ /dev/null diff --git a/fmapp2/res/drawable-mdpi/ic_btn_onoff_disable.png b/fmapp2/res/drawable-mdpi/ic_btn_onoff_disable.png Binary files differdeleted file mode 100644 index 9835514..0000000 --- a/fmapp2/res/drawable-mdpi/ic_btn_onoff_disable.png +++ /dev/null diff --git a/fmapp2/res/drawable-mdpi/ic_btn_onoff_press.png b/fmapp2/res/drawable-mdpi/ic_btn_onoff_press.png Binary files differdeleted file mode 100644 index 524a101..0000000 --- a/fmapp2/res/drawable-mdpi/ic_btn_onoff_press.png +++ /dev/null diff --git a/fmapp2/res/drawable-mdpi/ic_btn_spaker_select.png b/fmapp2/res/drawable-mdpi/ic_btn_spaker_select.png Binary files differdeleted file mode 100644 index da74c11..0000000 --- a/fmapp2/res/drawable-mdpi/ic_btn_spaker_select.png +++ /dev/null diff --git a/fmapp2/res/drawable-mdpi/ic_silent_mode.png b/fmapp2/res/drawable-mdpi/ic_silent_mode.png Binary files differdeleted file mode 100644 index fb64fc7..0000000 --- a/fmapp2/res/drawable-mdpi/ic_silent_mode.png +++ /dev/null diff --git a/fmapp2/res/drawable-mdpi/ic_silent_mode_off.png b/fmapp2/res/drawable-mdpi/ic_silent_mode_off.png Binary files differdeleted file mode 100644 index 5e1a972..0000000 --- a/fmapp2/res/drawable-mdpi/ic_silent_mode_off.png +++ /dev/null diff --git a/fmapp2/res/drawable-mdpi/stat_notify_fm.png b/fmapp2/res/drawable-mdpi/stat_notify_fm.png Binary files differindex 6861a44..331abff 100644 --- a/fmapp2/res/drawable-mdpi/stat_notify_fm.png +++ b/fmapp2/res/drawable-mdpi/stat_notify_fm.png diff --git a/fmapp2/res/drawable-xhdpi/btn_arrow_left_default.png b/fmapp2/res/drawable-xhdpi/btn_arrow_left_default.png Binary files differdeleted file mode 100644 index 7197506..0000000 --- a/fmapp2/res/drawable-xhdpi/btn_arrow_left_default.png +++ /dev/null diff --git a/fmapp2/res/drawable-xhdpi/btn_arrow_left_press.png b/fmapp2/res/drawable-xhdpi/btn_arrow_left_press.png Binary files differdeleted file mode 100644 index 607547b..0000000 --- a/fmapp2/res/drawable-xhdpi/btn_arrow_left_press.png +++ /dev/null diff --git a/fmapp2/res/drawable-xhdpi/btn_arrow_right_default.png b/fmapp2/res/drawable-xhdpi/btn_arrow_right_default.png Binary files differdeleted file mode 100644 index 3d14eb3..0000000 --- a/fmapp2/res/drawable-xhdpi/btn_arrow_right_default.png +++ /dev/null diff --git a/fmapp2/res/drawable-xhdpi/btn_arrow_right_press.png b/fmapp2/res/drawable-xhdpi/btn_arrow_right_press.png Binary files differdeleted file mode 100644 index 1b476da..0000000 --- a/fmapp2/res/drawable-xhdpi/btn_arrow_right_press.png +++ /dev/null diff --git a/fmapp2/res/drawable-xhdpi/ic_btn_earphone_default.png b/fmapp2/res/drawable-xhdpi/ic_btn_earphone_default.png Binary files differdeleted file mode 100644 index 70e0193..0000000 --- a/fmapp2/res/drawable-xhdpi/ic_btn_earphone_default.png +++ /dev/null diff --git a/fmapp2/res/drawable-xhdpi/ic_btn_earphone_diable.png b/fmapp2/res/drawable-xhdpi/ic_btn_earphone_diable.png Binary files differdeleted file mode 100644 index 70e0193..0000000 --- a/fmapp2/res/drawable-xhdpi/ic_btn_earphone_diable.png +++ /dev/null diff --git a/fmapp2/res/drawable-xhdpi/ic_btn_earphone_select.png b/fmapp2/res/drawable-xhdpi/ic_btn_earphone_select.png Binary files differdeleted file mode 100644 index 4cbbee1..0000000 --- a/fmapp2/res/drawable-xhdpi/ic_btn_earphone_select.png +++ /dev/null diff --git a/fmapp2/res/drawable-xhdpi/ic_btn_onoff_default.png b/fmapp2/res/drawable-xhdpi/ic_btn_onoff_default.png Binary files differdeleted file mode 100644 index 87e7444..0000000 --- a/fmapp2/res/drawable-xhdpi/ic_btn_onoff_default.png +++ /dev/null diff --git a/fmapp2/res/drawable-xhdpi/ic_btn_onoff_disable.png b/fmapp2/res/drawable-xhdpi/ic_btn_onoff_disable.png Binary files differdeleted file mode 100644 index ca13752..0000000 --- a/fmapp2/res/drawable-xhdpi/ic_btn_onoff_disable.png +++ /dev/null diff --git a/fmapp2/res/drawable-xhdpi/ic_btn_onoff_press.png b/fmapp2/res/drawable-xhdpi/ic_btn_onoff_press.png Binary files differdeleted file mode 100644 index 9256e04..0000000 --- a/fmapp2/res/drawable-xhdpi/ic_btn_onoff_press.png +++ /dev/null diff --git a/fmapp2/res/drawable-xhdpi/ic_btn_spaker_select.png b/fmapp2/res/drawable-xhdpi/ic_btn_spaker_select.png Binary files differdeleted file mode 100644 index be19ec0..0000000 --- a/fmapp2/res/drawable-xhdpi/ic_btn_spaker_select.png +++ /dev/null diff --git a/fmapp2/res/drawable-xhdpi/ic_silent_mode.png b/fmapp2/res/drawable-xhdpi/ic_silent_mode.png Binary files differdeleted file mode 100644 index 38b2097..0000000 --- a/fmapp2/res/drawable-xhdpi/ic_silent_mode.png +++ /dev/null diff --git a/fmapp2/res/drawable-xhdpi/ic_silent_mode_off.png b/fmapp2/res/drawable-xhdpi/ic_silent_mode_off.png Binary files differdeleted file mode 100644 index cd253f5..0000000 --- a/fmapp2/res/drawable-xhdpi/ic_silent_mode_off.png +++ /dev/null diff --git a/fmapp2/res/drawable-xhdpi/stat_notify_fm.png b/fmapp2/res/drawable-xhdpi/stat_notify_fm.png Binary files differnew file mode 100644 index 0000000..51fbe01 --- /dev/null +++ b/fmapp2/res/drawable-xhdpi/stat_notify_fm.png diff --git a/fmapp2/res/drawable-xxhdpi/btn_arrow_left_default.png b/fmapp2/res/drawable-xxhdpi/btn_arrow_left_default.png Binary files differdeleted file mode 100644 index a5048bc..0000000 --- a/fmapp2/res/drawable-xxhdpi/btn_arrow_left_default.png +++ /dev/null diff --git a/fmapp2/res/drawable-xxhdpi/btn_arrow_left_press.png b/fmapp2/res/drawable-xxhdpi/btn_arrow_left_press.png Binary files differdeleted file mode 100644 index 17992ea..0000000 --- a/fmapp2/res/drawable-xxhdpi/btn_arrow_left_press.png +++ /dev/null diff --git a/fmapp2/res/drawable-xxhdpi/btn_arrow_right_default.png b/fmapp2/res/drawable-xxhdpi/btn_arrow_right_default.png Binary files differdeleted file mode 100644 index 44162e8..0000000 --- a/fmapp2/res/drawable-xxhdpi/btn_arrow_right_default.png +++ /dev/null diff --git a/fmapp2/res/drawable-xxhdpi/btn_arrow_right_press.png b/fmapp2/res/drawable-xxhdpi/btn_arrow_right_press.png Binary files differdeleted file mode 100644 index a664e5d..0000000 --- a/fmapp2/res/drawable-xxhdpi/btn_arrow_right_press.png +++ /dev/null diff --git a/fmapp2/res/drawable-xxhdpi/ic_btn_earphone_default.png b/fmapp2/res/drawable-xxhdpi/ic_btn_earphone_default.png Binary files differdeleted file mode 100644 index ec3c9b8..0000000 --- a/fmapp2/res/drawable-xxhdpi/ic_btn_earphone_default.png +++ /dev/null diff --git a/fmapp2/res/drawable-xxhdpi/ic_btn_earphone_diable.png b/fmapp2/res/drawable-xxhdpi/ic_btn_earphone_diable.png Binary files differdeleted file mode 100644 index ec3c9b8..0000000 --- a/fmapp2/res/drawable-xxhdpi/ic_btn_earphone_diable.png +++ /dev/null diff --git a/fmapp2/res/drawable-xxhdpi/ic_btn_earphone_select.png b/fmapp2/res/drawable-xxhdpi/ic_btn_earphone_select.png Binary files differdeleted file mode 100644 index 08544f3..0000000 --- a/fmapp2/res/drawable-xxhdpi/ic_btn_earphone_select.png +++ /dev/null diff --git a/fmapp2/res/drawable-xxhdpi/ic_btn_onoff_default.png b/fmapp2/res/drawable-xxhdpi/ic_btn_onoff_default.png Binary files differdeleted file mode 100644 index 57e34e0..0000000 --- a/fmapp2/res/drawable-xxhdpi/ic_btn_onoff_default.png +++ /dev/null diff --git a/fmapp2/res/drawable-xxhdpi/ic_btn_onoff_disable.png b/fmapp2/res/drawable-xxhdpi/ic_btn_onoff_disable.png Binary files differdeleted file mode 100644 index a345efc..0000000 --- a/fmapp2/res/drawable-xxhdpi/ic_btn_onoff_disable.png +++ /dev/null diff --git a/fmapp2/res/drawable-xxhdpi/ic_btn_onoff_press.png b/fmapp2/res/drawable-xxhdpi/ic_btn_onoff_press.png Binary files differdeleted file mode 100644 index c5ed5af..0000000 --- a/fmapp2/res/drawable-xxhdpi/ic_btn_onoff_press.png +++ /dev/null diff --git a/fmapp2/res/drawable-xxhdpi/ic_btn_spaker_select.png b/fmapp2/res/drawable-xxhdpi/ic_btn_spaker_select.png Binary files differdeleted file mode 100644 index 52b4585..0000000 --- a/fmapp2/res/drawable-xxhdpi/ic_btn_spaker_select.png +++ /dev/null diff --git a/fmapp2/res/drawable-xxhdpi/ic_silent_mode.png b/fmapp2/res/drawable-xxhdpi/ic_silent_mode.png Binary files differdeleted file mode 100644 index 7414f33..0000000 --- a/fmapp2/res/drawable-xxhdpi/ic_silent_mode.png +++ /dev/null diff --git a/fmapp2/res/drawable-xxhdpi/ic_silent_mode_off.png b/fmapp2/res/drawable-xxhdpi/ic_silent_mode_off.png Binary files differdeleted file mode 100644 index 200ef39..0000000 --- a/fmapp2/res/drawable-xxhdpi/ic_silent_mode_off.png +++ /dev/null diff --git a/fmapp2/res/drawable-xxhdpi/stat_notify_fm.png b/fmapp2/res/drawable-xxhdpi/stat_notify_fm.png Binary files differnew file mode 100644 index 0000000..1be7c37 --- /dev/null +++ b/fmapp2/res/drawable-xxhdpi/stat_notify_fm.png diff --git a/fmapp2/res/drawable/btn_arrow_left_default.xml b/fmapp2/res/drawable/btn_arrow_left_default.xml new file mode 100644 index 0000000..e07667c --- /dev/null +++ b/fmapp2/res/drawable/btn_arrow_left_default.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <group> + <path + android:fillColor="#fafafa" + android:pathData="M15.41 16.09l-4.58-4.59 4.58-4.59-1.41-1.41-6 6 6 6z" /> + <path + android:pathData="M0-.5h24v24h-24z" /> + </group> +</vector> diff --git a/fmapp2/res/drawable/btn_arrow_left_press.xml b/fmapp2/res/drawable/btn_arrow_left_press.xml new file mode 100644 index 0000000..75b7687 --- /dev/null +++ b/fmapp2/res/drawable/btn_arrow_left_press.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <group> + <path + android:fillColor="#fefefe" + android:pathData="M15.41 16.09l-4.58-4.59 4.58-4.59-1.41-1.41-6 6 6 6z" /> + <path + android:pathData="M0-.5h24v24h-24z" /> + </group> +</vector> diff --git a/fmapp2/res/drawable/btn_arrow_right_default.xml b/fmapp2/res/drawable/btn_arrow_right_default.xml new file mode 100644 index 0000000..8c782e1 --- /dev/null +++ b/fmapp2/res/drawable/btn_arrow_right_default.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <group> + <path + android:fillColor="#fafafa" + android:pathData="M8.59 16.34l4.58-4.59-4.58-4.59 1.41-1.41 6 6-6 6z" /> + <path + android:pathData="M0-.25h24v24h-24z" /> + </group> +</vector> diff --git a/fmapp2/res/drawable/btn_arrow_right_press.xml b/fmapp2/res/drawable/btn_arrow_right_press.xml new file mode 100644 index 0000000..9c979c9 --- /dev/null +++ b/fmapp2/res/drawable/btn_arrow_right_press.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <group> + <path + android:fillColor="#fefefe" + android:pathData="M8.59 16.34l4.58-4.59-4.58-4.59 1.41-1.41 6 6-6 6z" /> + <path + android:pathData="M0-.25h24v24h-24z" /> + </group> +</vector> diff --git a/fmapp2/res/drawable/ic_btn_earphone_default.png b/fmapp2/res/drawable/ic_btn_earphone_default.png Binary files differdeleted file mode 100644 index 6a5b8db..0000000 --- a/fmapp2/res/drawable/ic_btn_earphone_default.png +++ /dev/null diff --git a/fmapp2/res/drawable/ic_btn_earphone_default.xml b/fmapp2/res/drawable/ic_btn_earphone_default.xml new file mode 100644 index 0000000..bb2da4f --- /dev/null +++ b/fmapp2/res/drawable/ic_btn_earphone_default.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <group> + <path + android:fillAlpha=".1" + android:strokeAlpha=".1" + android:pathData="M0 0h24v24h-24z" /> + <path + android:fillColor="#fafafa" + android:pathData="M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8h-4v-2c0-3.87 3.13-7 7-7s7 3.13 +7 7v2h-4v8h3c1.66 0 3-1.34 3-3v-7c0-4.97-4.03-9-9-9z" /> + </group> +</vector> diff --git a/fmapp2/res/drawable/ic_btn_earphone_diable.png b/fmapp2/res/drawable/ic_btn_earphone_diable.png Binary files differdeleted file mode 100644 index f32b96e..0000000 --- a/fmapp2/res/drawable/ic_btn_earphone_diable.png +++ /dev/null diff --git a/fmapp2/res/drawable/ic_btn_earphone_diable.xml b/fmapp2/res/drawable/ic_btn_earphone_diable.xml new file mode 100644 index 0000000..b7d2a39 --- /dev/null +++ b/fmapp2/res/drawable/ic_btn_earphone_diable.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <group> + <path + android:fillAlpha=".1" + android:strokeAlpha=".1" + android:pathData="M0 0h24v24h-24z" /> + <path + android:fillColor="#fefefe" + android:pathData="M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8h-4v-2c0-3.87 3.13-7 7-7s7 3.13 +7 7v2h-4v8h3c1.66 0 3-1.34 3-3v-7c0-4.97-4.03-9-9-9z" /> + </group> +</vector> diff --git a/fmapp2/res/drawable/ic_btn_earphone_select.png b/fmapp2/res/drawable/ic_btn_earphone_select.png Binary files differdeleted file mode 100644 index 67afd3e..0000000 --- a/fmapp2/res/drawable/ic_btn_earphone_select.png +++ /dev/null diff --git a/fmapp2/res/drawable/ic_btn_earphone_select.xml b/fmapp2/res/drawable/ic_btn_earphone_select.xml new file mode 100644 index 0000000..443e1f6 --- /dev/null +++ b/fmapp2/res/drawable/ic_btn_earphone_select.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <group> + <path + android:fillAlpha=".1" + android:strokeAlpha=".1" + android:pathData="M0 0h24v24h-24z" /> + <path + android:fillColor="#eeeeee" + android:pathData="M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8h-4v-2c0-3.87 3.13-7 7-7s7 3.13 +7 7v2h-4v8h3c1.66 0 3-1.34 3-3v-7c0-4.97-4.03-9-9-9z" /> + </group> +</vector> diff --git a/fmapp2/res/drawable/ic_btn_onoff_default.png b/fmapp2/res/drawable/ic_btn_onoff_default.png Binary files differdeleted file mode 100644 index 1c0f511..0000000 --- a/fmapp2/res/drawable/ic_btn_onoff_default.png +++ /dev/null diff --git a/fmapp2/res/drawable/ic_btn_onoff_default.xml b/fmapp2/res/drawable/ic_btn_onoff_default.xml new file mode 100644 index 0000000..78a428b --- /dev/null +++ b/fmapp2/res/drawable/ic_btn_onoff_default.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <group> + <path + android:pathData="M0 0h24v24h-24z" /> + <path + android:fillColor="#fafafa" + android:pathData="M7 24h2v-2h-2v2zm4 0h2v-2h-2v2zm2-22h-2v10h2v-10zm3.56 2.44l-1.45 1.45c1.73 1.05 +2.89 2.94 2.89 5.11 0 3.31-2.69 6-6 6s-6-2.69-6-6c0-2.17 1.16-4.06 +2.88-5.12l-1.44-1.44c-2.08 1.44-3.44 3.84-3.44 6.56 0 4.42 3.58 8 8 8s8-3.58 +8-8c0-2.72-1.36-5.12-3.44-6.56zm-1.56 19.56h2v-2h-2v2z" /> + </group> +</vector> diff --git a/fmapp2/res/drawable/ic_btn_onoff_disable.png b/fmapp2/res/drawable/ic_btn_onoff_disable.png Binary files differdeleted file mode 100644 index 12b2d28..0000000 --- a/fmapp2/res/drawable/ic_btn_onoff_disable.png +++ /dev/null diff --git a/fmapp2/res/drawable/ic_btn_onoff_disable.xml b/fmapp2/res/drawable/ic_btn_onoff_disable.xml new file mode 100644 index 0000000..73f72da --- /dev/null +++ b/fmapp2/res/drawable/ic_btn_onoff_disable.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <group> + <path + android:pathData="M0 0h24v24h-24z" /> + <path + android:fillColor="#fefefe" + android:pathData="M7 24h2v-2h-2v2zm4 0h2v-2h-2v2zm2-22h-2v10h2v-10zm3.56 2.44l-1.45 1.45c1.73 1.05 +2.89 2.94 2.89 5.11 0 3.31-2.69 6-6 6s-6-2.69-6-6c0-2.17 1.16-4.06 +2.88-5.12l-1.44-1.44c-2.08 1.44-3.44 3.84-3.44 6.56 0 4.42 3.58 8 8 8s8-3.58 +8-8c0-2.72-1.36-5.12-3.44-6.56zm-1.56 19.56h2v-2h-2v2z" /> + </group> +</vector> diff --git a/fmapp2/res/drawable/ic_btn_onoff_press.png b/fmapp2/res/drawable/ic_btn_onoff_press.png Binary files differdeleted file mode 100644 index efeebd3..0000000 --- a/fmapp2/res/drawable/ic_btn_onoff_press.png +++ /dev/null diff --git a/fmapp2/res/drawable/ic_btn_onoff_press.xml b/fmapp2/res/drawable/ic_btn_onoff_press.xml new file mode 100644 index 0000000..fc6f74a --- /dev/null +++ b/fmapp2/res/drawable/ic_btn_onoff_press.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <group> + <path + android:pathData="M0 0h24v24h-24z" /> + <path + android:fillColor="#eeeeee" + android:pathData="M7 24h2v-2h-2v2zm4 0h2v-2h-2v2zm2-22h-2v10h2v-10zm3.56 2.44l-1.45 1.45c1.73 1.05 +2.89 2.94 2.89 5.11 0 3.31-2.69 6-6 6s-6-2.69-6-6c0-2.17 1.16-4.06 +2.88-5.12l-1.44-1.44c-2.08 1.44-3.44 3.84-3.44 6.56 0 4.42 3.58 8 8 8s8-3.58 +8-8c0-2.72-1.36-5.12-3.44-6.56zm-1.56 19.56h2v-2h-2v2z" /> + </group> +</vector> diff --git a/fmapp2/res/drawable/ic_btn_search.png b/fmapp2/res/drawable/ic_btn_search.png Binary files differdeleted file mode 100644 index 7eea584..0000000 --- a/fmapp2/res/drawable/ic_btn_search.png +++ /dev/null diff --git a/fmapp2/res/drawable/ic_btn_search.xml b/fmapp2/res/drawable/ic_btn_search.xml new file mode 100644 index 0000000..ba4d4ba --- /dev/null +++ b/fmapp2/res/drawable/ic_btn_search.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <group> + <path + android:fillColor="#fafafa" + android:pathData="M15.5 14h-.79l-.28-.27c.98-1.14 1.57-2.62 1.57-4.23 0-3.59-2.91-6.5-6.5-6.5s-6.5 +2.91-6.5 6.5 2.91 6.5 6.5 6.5c1.61 0 3.09-.59 4.23-1.57l.27 .28 v.79l5 4.99 +1.49-1.49-4.99-5zm-6 0c-2.49 0-4.5-2.01-4.5-4.5s2.01-4.5 4.5-4.5 4.5 2.01 4.5 +4.5-2.01 4.5-4.5 4.5z" /> + <path + android:pathData="M0 0h24v24h-24z" /> + </group> +</vector> diff --git a/fmapp2/res/drawable/ic_btn_search_stop.png b/fmapp2/res/drawable/ic_btn_search_stop.png Binary files differdeleted file mode 100644 index 0b8c4e8..0000000 --- a/fmapp2/res/drawable/ic_btn_search_stop.png +++ /dev/null diff --git a/fmapp2/res/drawable/ic_btn_search_stop.xml b/fmapp2/res/drawable/ic_btn_search_stop.xml new file mode 100644 index 0000000..00381de --- /dev/null +++ b/fmapp2/res/drawable/ic_btn_search_stop.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <group> + <path + android:pathData="M0 0h24v24h-24z" /> + <path + android:fillColor="#fafafa" + android:pathData="M12 2c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10zm-8 +10c0-4.42 3.58-8 8-8 1.85 0 3.55 .63 4.9 1.69l-11.21 +11.21c-1.06-1.35-1.69-3.05-1.69-4.9zm8 8c-1.85 +0-3.55-.63-4.9-1.69l11.21-11.21c1.06 1.35 1.69 3.05 1.69 4.9 0 4.42-3.58 8-8 8z" /> + </group> +</vector> diff --git a/fmapp2/res/drawable/ic_btn_spaker_select.png b/fmapp2/res/drawable/ic_btn_spaker_select.png Binary files differdeleted file mode 100644 index bd5d57b..0000000 --- a/fmapp2/res/drawable/ic_btn_spaker_select.png +++ /dev/null diff --git a/fmapp2/res/drawable/ic_btn_spaker_select.xml b/fmapp2/res/drawable/ic_btn_spaker_select.xml new file mode 100644 index 0000000..9cb39b2 --- /dev/null +++ b/fmapp2/res/drawable/ic_btn_spaker_select.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <group> + <path + android:fillColor="#fafafa" + android:pathData="M18.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM5 9v6h4l5 +5V4L9 9H5z" /> + <path + android:pathData="M0 0h24v24H0z" /> + </group> +</vector> diff --git a/fmapp2/res/drawable/ic_silent_mode.png b/fmapp2/res/drawable/ic_silent_mode.png Binary files differdeleted file mode 100644 index c89291a..0000000 --- a/fmapp2/res/drawable/ic_silent_mode.png +++ /dev/null diff --git a/fmapp2/res/drawable/ic_silent_mode.xml b/fmapp2/res/drawable/ic_silent_mode.xml new file mode 100644 index 0000000..29ecfdb --- /dev/null +++ b/fmapp2/res/drawable/ic_silent_mode.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <group> + <path + android:fillColor="#fafafa" + android:pathData="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2 .05 -.41 .05 -.63zm2.5 +0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 +12c0-4.28-2.99-7.86-7-8.77v2.06c2.89 .86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 +9H3v6h4l5 5v-6.73l4.25 4.25c-.67 .52 -1.42 .93 -2.25 1.18v2.06c1.38-.31 2.63-.95 +3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z" /> + <path + android:pathData="M0 0h24v24H0z" /> + </group> +</vector> diff --git a/fmapp2/res/drawable/ic_silent_mode_off.png b/fmapp2/res/drawable/ic_silent_mode_off.png Binary files differdeleted file mode 100644 index 4748b9e..0000000 --- a/fmapp2/res/drawable/ic_silent_mode_off.png +++ /dev/null diff --git a/fmapp2/res/drawable/ic_silent_mode_off.xml b/fmapp2/res/drawable/ic_silent_mode_off.xml new file mode 100644 index 0000000..5264210 --- /dev/null +++ b/fmapp2/res/drawable/ic_silent_mode_off.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + <group> + <path + android:fillColor="#fafafa" + android:pathData="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 +2.5-4.02zM14 3.23v2.06c2.89 .86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 +7-4.49 7-8.77s-2.99-7.86-7-8.77z" /> + <path + android:pathData="M0 0h24v24H0z" /> + </group> +</vector> diff --git a/fmapp2/res/drawable/seeker.png b/fmapp2/res/drawable/seeker.png Binary files differindex 7ad3927..9babc55 100644 --- a/fmapp2/res/drawable/seeker.png +++ b/fmapp2/res/drawable/seeker.png diff --git a/fmapp2/res/layout/action_bar.xml b/fmapp2/res/layout/action_bar.xml index b4915ef..75c8628 100644 --- a/fmapp2/res/layout/action_bar.xml +++ b/fmapp2/res/layout/action_bar.xml @@ -17,7 +17,7 @@ <TextView android:id="@+id/title" android:paddingLeft="10dp" android:textSize="18sp" - android:textColor="#FFFFFF" + android:textColor="@color/white" android:textAllCaps="true" android:textStyle="bold" android:layout_width="wrap_content" diff --git a/fmapp2/res/layout/fmradio.xml b/fmapp2/res/layout/fmradio.xml index 3d13e76..bfbbd11 100644 --- a/fmapp2/res/layout/fmradio.xml +++ b/fmapp2/res/layout/fmradio.xml @@ -55,9 +55,11 @@ android:background="@color/picker_background_color"/> <ImageView + android:id="@+id/fm_seeker" android:src="@drawable/seeker" android:layout_width="match_parent" - android:layout_height="match_parent"/> + android:layout_height="match_parent" + android:visibility="gone"/> </RelativeLayout> diff --git a/fmapp2/res/values/colors.xml b/fmapp2/res/values/colors.xml index f143df1..1b147dd 100644 --- a/fmapp2/res/values/colors.xml +++ b/fmapp2/res/values/colors.xml @@ -1,7 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <color name="favorite_button_normal">#39BECB</color> - <color name="favorite_button_active">#CC39BECB</color> - <color name="background_color">#39BECB</color> - <color name="picker_background_color">#33AAB6</color> + <color name="favorite_button_normal">#4DB6AC</color> + <color name="favorite_button_active">#673AB7</color> + <color name="background_color">#4DB6AC</color> + <color name="picker_background_color">#00796B</color> + <color name="white">#fafafa</color> + <!-- Material --> + <color name="primary">#00796B</color> + <color name="primary_dark">#004D40</color> + <color name="accent">#673AB7</color> </resources> diff --git a/fmapp2/res/values/strings.xml b/fmapp2/res/values/strings.xml index ff8736f..2a019fd 100644 --- a/fmapp2/res/values/strings.xml +++ b/fmapp2/res/values/strings.xml @@ -91,6 +91,11 @@ <string name="menu_scan_for_preset">Scan for presets</string> + <!-- Off messages --> + <string name="fm_off">FM is turned off.</string> + <string name="fm_call">FM can\'t be used while calling.</string> + + <!-- The messsage shown when long pressed on a station. --> <string name="alert_dialog_hint">Enter a name</string> diff --git a/fmapp2/res/values/styles.xml b/fmapp2/res/values/styles.xml index 120c187..a53ced9 100644 --- a/fmapp2/res/values/styles.xml +++ b/fmapp2/res/values/styles.xml @@ -27,6 +27,11 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> <resources> + <style name="FMTheme" parent="@android:Theme.Material"> + <item name="android:colorPrimary">@color/primary</item> + <item name="android:colorPrimaryDark">@color/primary_dark</item> + <item name="android:colorAccent">@color/accent</item> + </style> <style name="FMStationSeekBar"> <item name="android:indeterminateOnly">false</item> <item name="android:progressDrawable">@android:drawable/progress_horizontal</item> @@ -43,7 +48,7 @@ <item name="android:layout_width">80dp</item> <item name="android:layout_height">match_parent</item> <item name="android:textSize">18sp</item> - <item name="android:textColor">#9DFFFFFF</item> + <item name="android:textColor">@color/white</item> <item name="android:background">@drawable/preset_button_background</item> <item name="android:singleLine">true</item> <item name="android:text">@string/add_station</item> @@ -55,7 +60,7 @@ <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> <item name="android:textSize">18sp</item> - <item name="android:textColor">#9DFFFFFF</item> + <item name="android:textColor">@color/white</item> <item name="android:background">@drawable/preset_button_background</item> <item name="android:singleLine">true</item> </style> @@ -64,7 +69,7 @@ <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> <item name="android:textSize">18sp</item> - <item name="android:textColor">#9DFFFFFF</item> + <item name="android:textColor">@color/white</item> <item name="android:background">@drawable/preset_button_background</item> <item name="android:singleLine">true</item> </style> @@ -74,7 +79,7 @@ <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> <item name="android:textSize">18sp</item> - <item name="android:textColor">#9DFFFFFF</item> + <item name="android:textColor">@color/white</item> <item name="android:background">@drawable/preset_button_background</item> <item name="android:singleLine">true</item> </style> diff --git a/fmapp2/src/com/caf/fmradio/FMRadio.java b/fmapp2/src/com/caf/fmradio/FMRadio.java index 6c35dd8..92f1019 100644 --- a/fmapp2/src/com/caf/fmradio/FMRadio.java +++ b/fmapp2/src/com/caf/fmradio/FMRadio.java @@ -225,6 +225,8 @@ public class FMRadio extends Activity private TextView mSleepMsgTV; private TextView mRecordingMsgTV; + private ImageView mFmSeeker; + private double mOutputFreq; private int mPresetPageNumber = 0; private int mStereo = -1; @@ -355,6 +357,8 @@ public class FMRadio extends Activity mBackButton.setOnClickListener(mBackClickListener); } + mFmSeeker = (ImageView)findViewById(R.id.fm_seeker); + /* 6 Preset Buttons */ mPresetButtons[0] = (Button)findViewById(R.id.presets_button_1); mPresetButtons[1] = (Button)findViewById(R.id.presets_button_2); @@ -1875,6 +1879,7 @@ public class FMRadio extends Activity setMuteModeButtonImage(false); } if (bEnable) { + mFmSeeker.setVisibility(View.VISIBLE); if (mRadioTextScroller != null) { mRadioTextScroller.startScroll(); } @@ -1899,6 +1904,7 @@ public class FMRadio extends Activity } } }else { + mFmSeeker.setVisibility(View.INVISIBLE); if (mRadioTextScroller != null) { mRadioTextScroller.stopScroll(); } @@ -1907,7 +1913,7 @@ public class FMRadio extends Activity } for (int nButton = 0; nButton < MAX_PRESETS_PER_PAGE; nButton++) { if (mPresetButtons[nButton] != null) { - mPresetButtons[nButton].setTextColor(Color.BLACK); + mPresetButtons[nButton].setTextColor(Color.WHITE); } } } @@ -1943,10 +1949,6 @@ public class FMRadio extends Activity mRecordingMsgTV.setVisibility(((bEnable == true) ? View.VISIBLE : View.GONE)); } - if (mRadioTextTV != null) { - mRadioTextTV.setVisibility(((bEnable == true) ? View.VISIBLE - : View.GONE)); - } if(mERadioTextTV != null) { mERadioTextTV.setVisibility(((bEnable == true) ? View.VISIBLE : View.GONE)); @@ -1967,8 +1969,8 @@ public class FMRadio extends Activity } }else if (isCallActive()) { if (mRadioTextTV != null) { - mRadioTextTV.setText(""); - mRadioTextScroller.mOriginalString = ""; + mRadioTextTV.setText(getString(R.string.fm_call)); + mRadioTextScroller.mOriginalString = getString(R.string.fm_call); } if (mERadioTextTV != null) { mERadioTextTV.setText(""); @@ -1980,7 +1982,7 @@ public class FMRadio extends Activity } }else { if (mRadioTextTV != null) { - mRadioTextTV.setText(""); + mRadioTextTV.setText(getString(R.string.fm_off)); mRadioTextScroller.mOriginalString = ""; } if (mERadioTextTV != null) { @@ -2115,7 +2117,6 @@ public class FMRadio extends Activity mRadioTextTV.setText(""); mERadioTextTV.setText(""); mERadioTextTV.setVisibility(View.GONE); - mRadioTextTV.setVisibility(View.GONE); mRadioTextScroller.mOriginalString = ""; mRadioTextScroller.mStringlength = 0; mRadioTextScroller.mIteration = 0; @@ -2611,7 +2612,7 @@ public class FMRadio extends Activity mTunedStation.setPI(0); mTunedStation.setRDSSupported(false); mTunedStation.setPty(0); - mRadioTextTV.setText(""); + mRadioTextTV.setText(getString(R.string.fm_off)); mERadioTextTV.setText(""); mRadioTextScroller.mOriginalString = ""; mProgramServiceTV.setText(""); @@ -2717,7 +2718,7 @@ public class FMRadio extends Activity mRadioTextScroller.mOriginalString = str; }else if(TextUtils.isEmpty(str)) { /* Rest the string to empty*/ mRadioTextTV.setText(""); - mRadioTextScroller.mOriginalString = ""; + mRadioTextScroller.mOriginalString = getString(R.string.fm_off); }else { //Log.d(LOGTAG, "mUpdateRadioText: Leaving old string " + mRadioTextTV.getText()); } diff --git a/fmapp2/src/com/caf/fmradio/FMTransmitterActivity.java b/fmapp2/src/com/caf/fmradio/FMTransmitterActivity.java index 9222eea..a26339e 100644 --- a/fmapp2/src/com/caf/fmradio/FMTransmitterActivity.java +++ b/fmapp2/src/com/caf/fmradio/FMTransmitterActivity.java @@ -231,10 +231,6 @@ public class FMTransmitterActivity extends Activity { } mRadioTextTV = (TextView)findViewById(R.id.radio_text_tv); - if((mRadioTextScroller == null) && (mRadioTextTV != null)) { - mRadioTextScroller = new ScrollerText(mRadioTextTV); - } - enableRadioOnOffUI(false); if(false == bindToService(this, osc)) { @@ -937,10 +933,6 @@ public class FMTransmitterActivity extends Activity { mTuneStationFrequencyTV.setVisibility(((bEnable == true) ? View.VISIBLE : View.INVISIBLE)); } - if(mRadioTextTV != null) { - mRadioTextTV.setVisibility(((bEnable == true) ? View.VISIBLE - : View.INVISIBLE)); - } if(mPicker != null) { mPicker.setVisibility( bEnable ? View.VISIBLE : View.INVISIBLE ); @@ -960,7 +952,7 @@ public class FMTransmitterActivity extends Activity { Log.d(LOGTAG,"call active"); if(mRadioTextTV != null) { mRadioTextTV.setVisibility(View.VISIBLE); - mRadioTextTV.setText(getString(R.string.msg_callactive)); + mRadioTextTV.setText(getString(R.string.fm_call)); } if(mOnOffButton != null) { mOnOffButton.setEnabled(false); @@ -976,7 +968,8 @@ public class FMTransmitterActivity extends Activity { }else { Log.d(LOGTAG,"Service null"); if(mRadioTextTV != null) { - mRadioTextTV.setText(""); + mRadioTextTV.setVisibility(View.VISIBLE); + mRadioTextTV.setText(getString(R.string.fm_off)); } if(mOnOffButton != null) { mOnOffButton.setEnabled(true); diff --git a/fmapp2/src/com/caf/fmradio/HorizontalNumberPicker.java b/fmapp2/src/com/caf/fmradio/HorizontalNumberPicker.java index 53ff9ce..d93fb50 100644 --- a/fmapp2/src/com/caf/fmradio/HorizontalNumberPicker.java +++ b/fmapp2/src/com/caf/fmradio/HorizontalNumberPicker.java @@ -138,35 +138,6 @@ public class HorizontalNumberPicker extends LinearLayout { */ private static final int SELECTOR_WHEEL_STATE_LARGE = 2; - /** - * The alpha of the selector wheel when it is bright. - */ - private static final int SELECTOR_WHEEL_BRIGHT_ALPHA = 255; - - /** - * The alpha of the selector wheel when it is dimmed. - */ - private static final int SELECTOR_WHEEL_DIM_ALPHA = 60; - - /** - * The alpha for the increment/decrement button when it is transparent. - */ - private static final int BUTTON_ALPHA_TRANSPARENT = 0; - - /** - * The alpha for the increment/decrement button when it is opaque. - */ - private static final int BUTTON_ALPHA_OPAQUE = 1; - - /** - * The property for setting the selector paint. - */ - private static final String PROPERTY_SELECTOR_PAINT_ALPHA = "selectorPaintAlpha"; - - /** - * The property for setting the increment/decrement button alpha. - */ - private static final String PROPERTY_BUTTON_ALPHA = "alpha"; /** * The numbers accepted by the input text's {@link Filter} @@ -344,10 +315,6 @@ public class HorizontalNumberPicker extends LinearLayout { * The offset to middle of selector. */ private static final int SELECTOR_OFFSET_ZERO = 0; - /** - * The colors alpha of selector text. - */ - private static final int SELECTOR_TEXT_ALPHA_TRANSPARENT_NONE = 76; private static float mDensity = 1.0f; private static final float LDPI = 0.75f; @@ -810,7 +777,6 @@ public class HorizontalNumberPicker extends LinearLayout { mBeginEditOnUpEvent = false; mAdjustScrollerOnUpEvent = true; if (mSelectorWheelState == SELECTOR_WHEEL_STATE_LARGE) { - mSelectorWheelPaint.setAlpha(SELECTOR_WHEEL_BRIGHT_ALPHA); boolean scrollersFinished = mFlingScroller.isFinished() && mAdjustScroller.isFinished(); if (!scrollersFinished) { @@ -1493,13 +1459,10 @@ public class HorizontalNumberPicker extends LinearLayout { .get(selectorIndex); if(i - mSelectorMiddleItemIndex > 0 ){ mSelectorWheelPaint.setColor(Color.WHITE); - mSelectorWheelPaint.setAlpha(SELECTOR_TEXT_ALPHA_TRANSPARENT_NONE); }else if(i - mSelectorMiddleItemIndex < 0 ){ mSelectorWheelPaint.setColor(Color.WHITE); - mSelectorWheelPaint.setAlpha(SELECTOR_TEXT_ALPHA_TRANSPARENT_NONE); }else{ mSelectorWheelPaint.setColor(Color.WHITE); - mSelectorWheelPaint.setAlpha(0); } try { fNumber = Float.valueOf(scrollSelectorValue).floatValue(); @@ -1522,15 +1485,12 @@ public class HorizontalNumberPicker extends LinearLayout { } if(bShowNumber){ float originalWidth = mSelectorWheelPaint.getStrokeWidth(); - int originalAlpha = mSelectorWheelPaint.getAlpha(); mSelectorWheelPaint.setTypeface(Typeface.DEFAULT_BOLD); mSelectorWheelPaint.setStrokeWidth(2); mSelectorWheelPaint.setStyle(Paint.Style.FILL_AND_STROKE); - mSelectorWheelPaint.setAlpha(SELECTOR_TEXT_ALPHA_TRANSPARENT_NONE); canvas.drawText(scrollSelectorValue, x, mTextSize * 2, mSelectorWheelPaint); mSelectorWheelPaint.setStyle(Paint.Style.FILL); mSelectorWheelPaint.setStrokeWidth(originalWidth); - mSelectorWheelPaint.setAlpha(originalAlpha); } float left = x; @@ -1661,7 +1621,6 @@ public class HorizontalNumberPicker extends LinearLayout { */ private void changeCurrentByOne(boolean increment) { if (mFlingable) { - mSelectorWheelPaint.setAlpha(SELECTOR_WHEEL_BRIGHT_ALPHA); mPreviousScrollerY = 0; mPreviousScrollerX = 0; forceCompleteChangeCurrentByOneViaScroll(); @@ -1717,16 +1676,6 @@ public class HorizontalNumberPicker extends LinearLayout { } } - /** - * Sets the <code>alpha</code> of the {@link Paint} for drawing the selector - * wheel. - */ - @SuppressWarnings("unused") - // Called via reflection - private void setSelectorPaintAlpha(int alpha) { - mSelectorWheelPaint.setAlpha(alpha); - invalidate(); - } /** * @return If the <code>event</code> is in the visible <code>view</code>. @@ -1745,7 +1694,6 @@ public class HorizontalNumberPicker extends LinearLayout { private void setSelectorWheelState(int selectorWheelState) { mSelectorWheelState = selectorWheelState; if (selectorWheelState == SELECTOR_WHEEL_STATE_LARGE) { - mSelectorWheelPaint.setAlpha(SELECTOR_WHEEL_BRIGHT_ALPHA); } if (mFlingable && selectorWheelState == SELECTOR_WHEEL_STATE_LARGE |