FM: Re-vamp UI
Change-Id: Ib9cb3d5663f9eec92922a3eea7d605a2bf3b538c
diff --git a/fmapp2/AndroidManifest.xml b/fmapp2/AndroidManifest.xml
index a8af822..cdebacb 100644
--- a/fmapp2/AndroidManifest.xml
+++ b/fmapp2/AndroidManifest.xml
@@ -69,6 +69,7 @@
android:name=".FMRadio"
android:label="@string/app_name"
android:clearTaskOnLaunch="true"
+ android:screenOrientation="portrait"
android:allowTaskReparenting="true"
android:launchMode="singleTask"
android:configChanges="keyboardHidden|orientation|screenSize"
diff --git a/fmapp2/res/drawable-hdpi/bg.png b/fmapp2/res/drawable-hdpi/bg.png
deleted file mode 100644
index fd10f0b..0000000
--- a/fmapp2/res/drawable-hdpi/bg.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_btn_earphone_default.png b/fmapp2/res/drawable-hdpi/ic_btn_earphone_default.png
index 6a5b8db..2f45a17 100644
--- a/fmapp2/res/drawable-hdpi/ic_btn_earphone_default.png
+++ b/fmapp2/res/drawable-hdpi/ic_btn_earphone_default.png
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_btn_earphone_diable.png b/fmapp2/res/drawable-hdpi/ic_btn_earphone_diable.png
index f32b96e..2f45a17 100644
--- a/fmapp2/res/drawable-hdpi/ic_btn_earphone_diable.png
+++ b/fmapp2/res/drawable-hdpi/ic_btn_earphone_diable.png
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_btn_earphone_select.png b/fmapp2/res/drawable-hdpi/ic_btn_earphone_select.png
index 67afd3e..66ac5c1 100644
--- a/fmapp2/res/drawable-hdpi/ic_btn_earphone_select.png
+++ b/fmapp2/res/drawable-hdpi/ic_btn_earphone_select.png
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_btn_onoff_default.png b/fmapp2/res/drawable-hdpi/ic_btn_onoff_default.png
index 1c0f511..456c77f 100644
--- a/fmapp2/res/drawable-hdpi/ic_btn_onoff_default.png
+++ b/fmapp2/res/drawable-hdpi/ic_btn_onoff_default.png
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_btn_onoff_disable.png b/fmapp2/res/drawable-hdpi/ic_btn_onoff_disable.png
index 12b2d28..6fac84e 100644
--- a/fmapp2/res/drawable-hdpi/ic_btn_onoff_disable.png
+++ b/fmapp2/res/drawable-hdpi/ic_btn_onoff_disable.png
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_btn_onoff_press.png b/fmapp2/res/drawable-hdpi/ic_btn_onoff_press.png
index efeebd3..94893c2 100644
--- a/fmapp2/res/drawable-hdpi/ic_btn_onoff_press.png
+++ b/fmapp2/res/drawable-hdpi/ic_btn_onoff_press.png
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_btn_spaker.png b/fmapp2/res/drawable-hdpi/ic_btn_spaker.png
index f439e2e..07614df 100644
--- a/fmapp2/res/drawable-hdpi/ic_btn_spaker.png
+++ b/fmapp2/res/drawable-hdpi/ic_btn_spaker.png
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_btn_spaker_select.png b/fmapp2/res/drawable-hdpi/ic_btn_spaker_select.png
index bd5d57b..1b14993 100644
--- a/fmapp2/res/drawable-hdpi/ic_btn_spaker_select.png
+++ b/fmapp2/res/drawable-hdpi/ic_btn_spaker_select.png
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_silent_mode.png b/fmapp2/res/drawable-hdpi/ic_silent_mode.png
new file mode 100644
index 0000000..1bb2631
--- /dev/null
+++ b/fmapp2/res/drawable-hdpi/ic_silent_mode.png
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_silent_mode_off.png b/fmapp2/res/drawable-hdpi/ic_silent_mode_off.png
new file mode 100644
index 0000000..76a7498
--- /dev/null
+++ b/fmapp2/res/drawable-hdpi/ic_silent_mode_off.png
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/bg.png b/fmapp2/res/drawable-mdpi/bg.png
deleted file mode 100644
index fd10f0b..0000000
--- a/fmapp2/res/drawable-mdpi/bg.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_btn_earphone_default.png b/fmapp2/res/drawable-mdpi/ic_btn_earphone_default.png
index c729ed0..384a6bd 100644
--- a/fmapp2/res/drawable-mdpi/ic_btn_earphone_default.png
+++ b/fmapp2/res/drawable-mdpi/ic_btn_earphone_default.png
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_btn_earphone_diable.png b/fmapp2/res/drawable-mdpi/ic_btn_earphone_diable.png
index c0929ba..384a6bd 100644
--- a/fmapp2/res/drawable-mdpi/ic_btn_earphone_diable.png
+++ b/fmapp2/res/drawable-mdpi/ic_btn_earphone_diable.png
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_btn_earphone_select.png b/fmapp2/res/drawable-mdpi/ic_btn_earphone_select.png
index fb51ce1..543dc81 100644
--- a/fmapp2/res/drawable-mdpi/ic_btn_earphone_select.png
+++ b/fmapp2/res/drawable-mdpi/ic_btn_earphone_select.png
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_btn_onoff_default.png b/fmapp2/res/drawable-mdpi/ic_btn_onoff_default.png
index 9303cfb..0f21a6c 100644
--- a/fmapp2/res/drawable-mdpi/ic_btn_onoff_default.png
+++ b/fmapp2/res/drawable-mdpi/ic_btn_onoff_default.png
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_btn_onoff_disable.png b/fmapp2/res/drawable-mdpi/ic_btn_onoff_disable.png
index 57e060a..9835514 100644
--- a/fmapp2/res/drawable-mdpi/ic_btn_onoff_disable.png
+++ b/fmapp2/res/drawable-mdpi/ic_btn_onoff_disable.png
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_btn_onoff_press.png b/fmapp2/res/drawable-mdpi/ic_btn_onoff_press.png
index 1228a66..524a101 100644
--- a/fmapp2/res/drawable-mdpi/ic_btn_onoff_press.png
+++ b/fmapp2/res/drawable-mdpi/ic_btn_onoff_press.png
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_btn_spaker.png b/fmapp2/res/drawable-mdpi/ic_btn_spaker.png
index b72fab9..82a6d91 100644
--- a/fmapp2/res/drawable-mdpi/ic_btn_spaker.png
+++ b/fmapp2/res/drawable-mdpi/ic_btn_spaker.png
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_btn_spaker_select.png b/fmapp2/res/drawable-mdpi/ic_btn_spaker_select.png
index 250baea..da74c11 100644
--- a/fmapp2/res/drawable-mdpi/ic_btn_spaker_select.png
+++ b/fmapp2/res/drawable-mdpi/ic_btn_spaker_select.png
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_silent_mode.png b/fmapp2/res/drawable-mdpi/ic_silent_mode.png
new file mode 100644
index 0000000..fb64fc7
--- /dev/null
+++ b/fmapp2/res/drawable-mdpi/ic_silent_mode.png
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_silent_mode_off.png b/fmapp2/res/drawable-mdpi/ic_silent_mode_off.png
new file mode 100644
index 0000000..5e1a972
--- /dev/null
+++ b/fmapp2/res/drawable-mdpi/ic_silent_mode_off.png
Binary files differ
diff --git a/fmapp2/res/drawable-xhdpi/ic_btn_earphone_default.png b/fmapp2/res/drawable-xhdpi/ic_btn_earphone_default.png
new file mode 100644
index 0000000..70e0193
--- /dev/null
+++ b/fmapp2/res/drawable-xhdpi/ic_btn_earphone_default.png
Binary files differ
diff --git a/fmapp2/res/drawable-xhdpi/ic_btn_earphone_diable.png b/fmapp2/res/drawable-xhdpi/ic_btn_earphone_diable.png
new file mode 100644
index 0000000..70e0193
--- /dev/null
+++ b/fmapp2/res/drawable-xhdpi/ic_btn_earphone_diable.png
Binary files differ
diff --git a/fmapp2/res/drawable-xhdpi/ic_btn_earphone_select.png b/fmapp2/res/drawable-xhdpi/ic_btn_earphone_select.png
new file mode 100644
index 0000000..4cbbee1
--- /dev/null
+++ b/fmapp2/res/drawable-xhdpi/ic_btn_earphone_select.png
Binary files differ
diff --git a/fmapp2/res/drawable-xhdpi/ic_btn_onoff_default.png b/fmapp2/res/drawable-xhdpi/ic_btn_onoff_default.png
new file mode 100644
index 0000000..87e7444
--- /dev/null
+++ b/fmapp2/res/drawable-xhdpi/ic_btn_onoff_default.png
Binary files differ
diff --git a/fmapp2/res/drawable-xhdpi/ic_btn_onoff_disable.png b/fmapp2/res/drawable-xhdpi/ic_btn_onoff_disable.png
new file mode 100644
index 0000000..ca13752
--- /dev/null
+++ b/fmapp2/res/drawable-xhdpi/ic_btn_onoff_disable.png
Binary files differ
diff --git a/fmapp2/res/drawable-xhdpi/ic_btn_onoff_press.png b/fmapp2/res/drawable-xhdpi/ic_btn_onoff_press.png
new file mode 100644
index 0000000..9256e04
--- /dev/null
+++ b/fmapp2/res/drawable-xhdpi/ic_btn_onoff_press.png
Binary files differ
diff --git a/fmapp2/res/drawable-xhdpi/ic_btn_spaker.png b/fmapp2/res/drawable-xhdpi/ic_btn_spaker.png
new file mode 100644
index 0000000..e51c03d
--- /dev/null
+++ b/fmapp2/res/drawable-xhdpi/ic_btn_spaker.png
Binary files differ
diff --git a/fmapp2/res/drawable-xhdpi/ic_btn_spaker_select.png b/fmapp2/res/drawable-xhdpi/ic_btn_spaker_select.png
new file mode 100644
index 0000000..be19ec0
--- /dev/null
+++ b/fmapp2/res/drawable-xhdpi/ic_btn_spaker_select.png
Binary files differ
diff --git a/fmapp2/res/drawable-xhdpi/ic_silent_mode.png b/fmapp2/res/drawable-xhdpi/ic_silent_mode.png
new file mode 100644
index 0000000..38b2097
--- /dev/null
+++ b/fmapp2/res/drawable-xhdpi/ic_silent_mode.png
Binary files differ
diff --git a/fmapp2/res/drawable-xhdpi/ic_silent_mode_off.png b/fmapp2/res/drawable-xhdpi/ic_silent_mode_off.png
new file mode 100644
index 0000000..cd253f5
--- /dev/null
+++ b/fmapp2/res/drawable-xhdpi/ic_silent_mode_off.png
Binary files differ
diff --git a/fmapp2/res/drawable-xxhdpi/ic_btn_earphone_default.png b/fmapp2/res/drawable-xxhdpi/ic_btn_earphone_default.png
new file mode 100644
index 0000000..ec3c9b8
--- /dev/null
+++ b/fmapp2/res/drawable-xxhdpi/ic_btn_earphone_default.png
Binary files differ
diff --git a/fmapp2/res/drawable-xxhdpi/ic_btn_earphone_diable.png b/fmapp2/res/drawable-xxhdpi/ic_btn_earphone_diable.png
new file mode 100644
index 0000000..ec3c9b8
--- /dev/null
+++ b/fmapp2/res/drawable-xxhdpi/ic_btn_earphone_diable.png
Binary files differ
diff --git a/fmapp2/res/drawable-xxhdpi/ic_btn_earphone_select.png b/fmapp2/res/drawable-xxhdpi/ic_btn_earphone_select.png
new file mode 100644
index 0000000..08544f3
--- /dev/null
+++ b/fmapp2/res/drawable-xxhdpi/ic_btn_earphone_select.png
Binary files differ
diff --git a/fmapp2/res/drawable-xxhdpi/ic_btn_onoff_default.png b/fmapp2/res/drawable-xxhdpi/ic_btn_onoff_default.png
new file mode 100644
index 0000000..57e34e0
--- /dev/null
+++ b/fmapp2/res/drawable-xxhdpi/ic_btn_onoff_default.png
Binary files differ
diff --git a/fmapp2/res/drawable-xxhdpi/ic_btn_onoff_disable.png b/fmapp2/res/drawable-xxhdpi/ic_btn_onoff_disable.png
new file mode 100644
index 0000000..a345efc
--- /dev/null
+++ b/fmapp2/res/drawable-xxhdpi/ic_btn_onoff_disable.png
Binary files differ
diff --git a/fmapp2/res/drawable-xxhdpi/ic_btn_onoff_press.png b/fmapp2/res/drawable-xxhdpi/ic_btn_onoff_press.png
new file mode 100644
index 0000000..c5ed5af
--- /dev/null
+++ b/fmapp2/res/drawable-xxhdpi/ic_btn_onoff_press.png
Binary files differ
diff --git a/fmapp2/res/drawable-xxhdpi/ic_btn_spaker.png b/fmapp2/res/drawable-xxhdpi/ic_btn_spaker.png
new file mode 100644
index 0000000..870da4d
--- /dev/null
+++ b/fmapp2/res/drawable-xxhdpi/ic_btn_spaker.png
Binary files differ
diff --git a/fmapp2/res/drawable-xxhdpi/ic_btn_spaker_select.png b/fmapp2/res/drawable-xxhdpi/ic_btn_spaker_select.png
new file mode 100644
index 0000000..52b4585
--- /dev/null
+++ b/fmapp2/res/drawable-xxhdpi/ic_btn_spaker_select.png
Binary files differ
diff --git a/fmapp2/res/drawable-xxhdpi/ic_silent_mode.png b/fmapp2/res/drawable-xxhdpi/ic_silent_mode.png
new file mode 100644
index 0000000..7414f33
--- /dev/null
+++ b/fmapp2/res/drawable-xxhdpi/ic_silent_mode.png
Binary files differ
diff --git a/fmapp2/res/drawable-xxhdpi/ic_silent_mode_off.png b/fmapp2/res/drawable-xxhdpi/ic_silent_mode_off.png
new file mode 100644
index 0000000..200ef39
--- /dev/null
+++ b/fmapp2/res/drawable-xxhdpi/ic_silent_mode_off.png
Binary files differ
diff --git a/fmapp2/res/drawable/bg.png b/fmapp2/res/drawable/bg.png
index fd10f0b..ebd97fd 100644
--- a/fmapp2/res/drawable/bg.png
+++ b/fmapp2/res/drawable/bg.png
Binary files differ
diff --git a/fmapp2/res/drawable/preset_button_background.xml b/fmapp2/res/drawable/preset_button_background.xml
new file mode 100644
index 0000000..d6acfa5
--- /dev/null
+++ b/fmapp2/res/drawable/preset_button_background.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2012-2013, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:state_pressed="true"
+ android:drawable="@color/favorite_button_active" />
+
+ <item android:state_focused="true"
+ android:drawable="@color/favorite_button_active" />
+
+ <item android:state_enabled="true"
+ android:drawable="@color/favorite_button_normal" />
+
+</selector>
diff --git a/fmapp2/res/drawable/seeker.png b/fmapp2/res/drawable/seeker.png
new file mode 100644
index 0000000..7ad3927
--- /dev/null
+++ b/fmapp2/res/drawable/seeker.png
Binary files differ
diff --git a/fmapp2/res/layout-800x480/fmradio.xml b/fmapp2/res/layout-800x480/fmradio.xml
deleted file mode 100644
index 0b96bc5..0000000
--- a/fmapp2/res/layout-800x480/fmradio.xml
+++ /dev/null
@@ -1,204 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (c) 2009, 2012, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of The Linux Foundation nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/fmradio"
- android:background="@drawable/bg"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical">
-
- <RelativeLayout android:id="@+id/layout_on_off"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:layout_marginTop="3dp"
- android:layout_alignParentTop="true">
-
- <ImageView android:id="@+id/btn_onoff"
- android:src="@drawable/btn_onoff"
- android:layout_alignParentLeft="true"
- android:layout_marginLeft="15dp"
- android:clickable="true"
- android:focusable="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-
- <TextView android:id="@+id/sleep_msg_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:drawableLeft="@drawable/count_down"
- android:layout_toRightOf="@+id/btn_onoff"
- android:textSize="14sp"
- android:textColor="@android:color/white"
- android:layout_marginLeft="5dp"
- android:textStyle="bold"
- android:visibility="invisible"
- android:text="@string/default_sleep" />
-
- <TextView android:id="@+id/prog_service_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:layout_marginLeft="2dp"
- android:layout_marginRight="2dp"
- android:layout_toLeftOf="@+id/btn_silent"
- android:layout_toRightOf="@+id/sleep_msg_tv"
- android:textSize="16sp"
- android:textColor="@android:color/white"
- android:singleLine="true"
- android:textStyle="bold"
- android:text="@string/prog_service_string"/>
-
- <ImageView android:id="@+id/btn_silent"
- android:src="@drawable/ic_silent_mode_off"
- android:layout_toLeftOf="@+id/btn_speaker_earphone"
- android:layout_width="wrap_content"
- android:layout_marginRight="10dp"
- android:clickable="true"
- android:focusable="true"
- android:layout_height="wrap_content" />
-
- <ImageView android:id="@+id/btn_speaker_earphone"
- android:src="@drawable/btn_earphone"
- android:layout_alignParentRight="true"
- android:layout_marginRight="15dp"
- android:clickable="true"
- android:focusable="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-
- </RelativeLayout>
-
- <LinearLayout android:id="@+id/stationinfo_layout"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:layout_marginTop="5dp"
- android:layout_below="@+id/layout_on_off">
-
- <!-- This included layout contains Station Information to display -->
- <include layout="@layout/station_info" />
-
- </LinearLayout>
-
- <com.caf.fmradio.HorizontalNumberPicker
- android:id="@+id/fm_picker"
- android:layout_width="fill_parent"
- android:layout_height="200dp"
- android:layout_marginBottom="50dp"
- android:layout_below="@+id/stationinfo_layout"/>
-
- <HorizontalScrollView
- android:layout_width="fill_parent"
- android:layout_height="60dp"
- android:layout_alignParentBottom="true"
- android:scrollbars="none">
-
- <LinearLayout android:id="@+id/favorite_list"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="horizontal">
-
- <Button android:id="@+id/presets_button_1"
- style="@style/ButtonStripLeft"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="16sp"
- android:singleLine="true"
- android:layout_width="96dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
-
- <Button android:id="@+id/presets_button_2"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="16sp"
- android:singleLine="true"
- android:layout_width="96dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
-
- <Button android:id="@+id/presets_button_3"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="16sp"
- android:singleLine="true"
- android:layout_width="96dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
-
- <Button android:id="@+id/presets_button_4"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="16sp"
- android:singleLine="true"
- android:layout_width="96dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
-
- <Button android:id="@+id/presets_button_5"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="16sp"
- android:singleLine="true"
- android:layout_width="96dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
-
- <Button android:id="@+id/presets_button_6"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="16sp"
- android:singleLine="true"
- android:layout_width="96dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
-
- <Button android:id="@+id/presets_button_7"
- style="@style/ButtonStripRight"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="16sp"
- android:singleLine="true"
- android:layout_width="96dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
-
- </LinearLayout>
-
- </HorizontalScrollView>
-
-</RelativeLayout>
diff --git a/fmapp2/res/layout-800x480/station_info.xml b/fmapp2/res/layout-800x480/station_info.xml
deleted file mode 100644
index c96775a..0000000
--- a/fmapp2/res/layout-800x480/station_info.xml
+++ /dev/null
@@ -1,192 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (c) 2009, 2012, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of The Linux Foundation nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
-
- <LinearLayout android:id="@+id/station_info"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:orientation="vertical"
- android:gravity="top">
-
- <RelativeLayout android:id="@+id/top_most"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
-
- <ImageView android:id="@+id/signal_level"
- android:src="@drawable/ic_signal_2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="5dp"
- android:layout_alignParentTop="true"
- android:layout_alignParentLeft="true"
- android:visibility="gone" />
-
- <TextView android:id="@+id/record_msg_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:drawableLeft="@drawable/recorder_start"
- android:layout_marginLeft="20dp"
- android:textSize="14sp"
- android:textStyle="bold"
- android:textColor="@android:color/white"
- android:clickable="true"
- android:visibility="invisible"
- android:text="@string/default_record"/>
-
-
- <TextView android:id="@+id/stereo_text_tv"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingRight="16dp"
- android:layout_alignParentTop="true"
- android:layout_alignParentRight="true"
- android:layout_alignBaseline="@id/signal_level"
- android:textSize="13sp"
- android:textColor="@android:color/white"
- android:text="@string/default_audio"/>
-
- </RelativeLayout>
-
- <LinearLayout android:id="@+id/station_frequency_row"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingTop="5dp"
- android:paddingBottom="5dp"
- android:layout_alignWithParentIfMissing="true"
- android:gravity="center">
-
- <TextView android:id="@+id/call_sign_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="14sp"
- android:textColor="@android:color/white"
- android:paddingTop="2dp"
- android:paddingRight="2dp"
- android:paddingBottom="2dp"
- android:paddingLeft="2dp"
- android:text="@string/station_id_string" />
-
- <TextView android:id="@+id/pty_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="14sp"
- android:textColor="@android:color/white"
- android:paddingTop="2dp"
- android:paddingRight="2dp"
- android:paddingBottom="2dp"
- android:paddingLeft="2dp"
- android:text="@string/pty_string" />
-
- </LinearLayout>
-
- <RelativeLayout android:id="@+id/second_layout"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="1dp"
- android:layout_marginBottom="1dp"
- android:layout_marginLeft="2dp"
- android:layout_marginRight="2dp">
-
- <TextView android:id="@+id/prog_frequency_tv"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="25dp"
- android:textColor="@android:color/white"
- android:gravity="center"
- android:clickable="true"
- android:focusable="true"
- android:layout_toLeftOf="@+id/btn_forward"
- android:layout_toRightOf="@+id/btn_back"
- android:text="@string/frequency_string"/>
-
- <ImageView android:id="@+id/btn_back"
- android:clickable="true"
- android:focusable="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="15dp"
- android:layout_alignParentLeft="true"
- android:visibility="visible"
- android:layout_alignWithParentIfMissing="true"
- android:src="@drawable/btn_arrow_left"/>
-
- <ImageView android:id="@+id/btn_forward"
- android:clickable="true"
- android:focusable="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingRight="15dp"
- android:layout_alignParentRight="true"
- android:visibility="visible"
- android:layout_alignWithParentIfMissing="true"
- android:src="@drawable/btn_arrow_right"/>
-
- </RelativeLayout>
-
-
- <!-- Station Radio Text information display -->
- <TextView android:id="@+id/radio_text_tv"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
- android:singleLine="true"
- android:textStyle="bold"
- android:textColor="@android:color/white"
- android:paddingLeft="2dp"
- android:paddingRight="2dp"
- android:paddingBottom="5dp"
- android:paddingTop="20dp"
- android:gravity="center_horizontal"
- android:text="@string/radio_text_string"/>
-
- <TextView android:id="@+id/eradio_text_tv"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
- android:textColor="@android:color/white"
- android:singleLine="true"
- android:textStyle="bold"
- android:paddingLeft="2dp"
- android:paddingRight="2dp"
- android:paddingBottom="5dp"
- android:gravity="center_horizontal"
- android:text="@string/eradio_text_string"/>
-
- </LinearLayout>
-
-</merge>
diff --git a/fmapp2/res/layout/action_bar.xml b/fmapp2/res/layout/action_bar.xml
new file mode 100644
index 0000000..b4915ef
--- /dev/null
+++ b/fmapp2/res/layout/action_bar.xml
@@ -0,0 +1,48 @@
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:enabled="false"
+ android:gravity="center_vertical"
+ android:orientation="horizontal" >
+
+ <ImageView android:id="@+id/btn_onoff"
+ android:src="@drawable/btn_onoff"
+ android:layout_alignParentLeft="true"
+ android:layout_marginLeft="15dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+
+ <TextView android:id="@+id/title"
+ android:paddingLeft="10dp"
+ android:textSize="18sp"
+ android:textColor="#FFFFFF"
+ android:textAllCaps="true"
+ android:textStyle="bold"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+
+ <Space
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"/>
+
+ <ImageView android:id="@+id/btn_silent"
+ android:src="@drawable/ic_silent_mode_off"
+ android:layout_toLeftOf="@+id/btn_speaker_earphone"
+ android:layout_width="wrap_content"
+ android:layout_marginRight="10dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:layout_height="wrap_content" />
+
+ <ImageView android:id="@+id/btn_speaker_earphone"
+ android:src="@drawable/btn_earphone"
+ android:layout_alignParentRight="true"
+ android:clickable="true"
+ android:focusable="true"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+
+</LinearLayout>
diff --git a/fmapp2/res/layout/fmradio.xml b/fmapp2/res/layout/fmradio.xml
index 4aef544..c78f563 100644
--- a/fmapp2/res/layout/fmradio.xml
+++ b/fmapp2/res/layout/fmradio.xml
@@ -26,9 +26,9 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fmradio"
- android:background="@drawable/bg"
+ android:background="@color/background_color"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
@@ -37,17 +37,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
- android:layout_marginTop="3dp"
- android:layout_alignParentTop="true">
-
- <ImageView android:id="@+id/btn_onoff"
- android:src="@drawable/btn_onoff"
- android:layout_alignParentLeft="true"
- android:layout_marginLeft="15dp"
- android:clickable="true"
- android:focusable="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
+ android:layout_marginTop="3dp">
<TextView android:id="@+id/sleep_msg_tv"
android:textAppearance="?android:attr/textAppearanceMedium"
@@ -66,6 +56,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
+ android:visibility="gone"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_toLeftOf="@+id/btn_silent"
@@ -75,49 +66,40 @@
android:textStyle="bold"
android:text="@string/prog_service_string"/>
- <ImageView android:id="@+id/btn_silent"
- android:src="@drawable/ic_silent_mode_off"
- android:layout_toLeftOf="@+id/btn_speaker_earphone"
- android:layout_width="wrap_content"
- android:layout_marginRight="10dp"
- android:clickable="true"
- android:focusable="true"
- android:layout_height="wrap_content" />
-
- <ImageView android:id="@+id/btn_speaker_earphone"
- android:src="@drawable/btn_earphone"
- android:layout_alignParentRight="true"
- android:layout_marginRight="15dp"
- android:clickable="true"
- android:focusable="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-
</RelativeLayout>
<LinearLayout android:id="@+id/stationinfo_layout"
android:layout_width="fill_parent"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:orientation="horizontal"
- android:layout_marginTop="5dp"
- android:layout_below="@+id/layout_on_off">
+ android:layout_weight="1">
<!-- This included layout contains Station Information to display -->
<include layout="@layout/station_info" />
</LinearLayout>
- <com.caf.fmradio.HorizontalNumberPicker
- android:id="@+id/fm_picker"
- android:layout_width="fill_parent"
- android:layout_height="200dp"
- android:layout_marginBottom="50dp"
- android:layout_below="@+id/stationinfo_layout"/>
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="155dp">
+
+ <com.caf.fmradio.HorizontalNumberPicker
+ android:id="@+id/fm_picker"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@color/picker_background_color"/>
+
+ <ImageView
+ android:src="@drawable/seeker"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"/>
+
+ </RelativeLayout>
+
<HorizontalScrollView
android:layout_width="fill_parent"
android:layout_height="60dp"
- android:layout_alignParentBottom="true"
android:scrollbars="none">
<LinearLayout android:id="@+id/favorite_list"
@@ -126,77 +108,28 @@
android:orientation="horizontal">
<Button android:id="@+id/presets_button_1"
- style="@style/ButtonStripLeft"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
- android:singleLine="true"
- android:layout_width="80dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
+ style="@style/ButtonStripButtons"/>
<Button android:id="@+id/presets_button_2"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
- android:singleLine="true"
- android:layout_width="80dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
+ style="@style/ButtonStripButtons"/>
<Button android:id="@+id/presets_button_3"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
- android:singleLine="true"
- android:layout_width="80dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
+ style="@style/ButtonStripButtons"/>
<Button android:id="@+id/presets_button_4"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
- android:singleLine="true"
- android:layout_width="80dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
+ style="@style/ButtonStripButtons"/>
<Button android:id="@+id/presets_button_5"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
- android:singleLine="true"
- android:layout_width="80dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
+ style="@style/ButtonStripButtons"/>
<Button android:id="@+id/presets_button_6"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
- android:singleLine="true"
- android:layout_width="80dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
+ style="@style/ButtonStripButtons"/>
<Button android:id="@+id/presets_button_7"
- style="@style/ButtonStripRight"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
- android:singleLine="true"
- android:layout_width="80dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
+ style="@style/ButtonStripButtons"/>
</LinearLayout>
</HorizontalScrollView>
-</RelativeLayout>
+</LinearLayout>
diff --git a/fmapp2/res/layout/station_info.xml b/fmapp2/res/layout/station_info.xml
index fc7d62e..404c6c8 100644
--- a/fmapp2/res/layout/station_info.xml
+++ b/fmapp2/res/layout/station_info.xml
@@ -33,9 +33,11 @@
android:layout_height="wrap_content"
android:layout_weight="0"
android:orientation="vertical"
+ android:layout_gravity="center"
android:gravity="top">
<RelativeLayout android:id="@+id/top_most"
+ android:visibility="gone"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
@@ -48,34 +50,13 @@
android:layout_alignParentLeft="true"
android:visibility="gone" />
- <TextView android:id="@+id/sleep_msg_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:drawableLeft="@drawable/count_down"
- android:textSize="14sp"
- android:layout_marginLeft="25dp"
- android:textStyle="bold"
- android:visibility="invisible"
- android:text="@string/default_sleep" />
-
- <TextView android:id="@+id/record_msg_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:drawableLeft="@drawable/recorder_start"
- android:layout_marginLeft="20dp"
- android:textSize="14sp"
- android:textStyle="bold"
- android:clickable="true"
- android:visibility="invisible"
- android:text="@string/default_record"/>
<TextView android:id="@+id/stereo_text_tv"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="16dp"
+ android:visibility="invisible"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignBaseline="@id/signal_level"
@@ -84,87 +65,84 @@
</RelativeLayout>
- <LinearLayout android:id="@+id/station_frequency_row"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingTop="5dp"
- android:paddingBottom="5dp"
- android:layout_alignWithParentIfMissing="true"
- android:gravity="center">
-
- <TextView android:id="@+id/call_sign_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="14sp"
- android:paddingTop="2dp"
- android:paddingRight="2dp"
- android:paddingBottom="2dp"
- android:paddingLeft="2dp"
- android:text="@string/station_id_string" />
-
- <TextView android:id="@+id/pty_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="14sp"
- android:paddingTop="2dp"
- android:paddingRight="2dp"
- android:paddingBottom="2dp"
- android:paddingLeft="2dp"
- android:text="@string/pty_string" />
-
- </LinearLayout>
-
<RelativeLayout android:id="@+id/second_layout"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="2dp"
- android:layout_marginBottom="2dp"
+ android:layout_gravity="center"
+ android:gravity="center"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp">
<TextView android:id="@+id/prog_frequency_tv"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="25dp"
- android:gravity="center"
- android:layout_toLeftOf="@+id/btn_forward"
- android:layout_toRightOf="@+id/btn_back"
- android:text="@string/frequency_string"/>
+ android:textColor="@android:color/white"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textSize="56sp"
+ android:textStyle="bold"
+ android:gravity="center"
+ android:clickable="true"
+ android:focusable="true"
+ android:text="@string/frequency_string"/>
<ImageView android:id="@+id/btn_back"
- android:clickable="true"
- android:focusable="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="15dp"
- android:layout_alignParentLeft="true"
- android:visibility="visible"
- android:layout_alignWithParentIfMissing="true"
- android:src="@drawable/btn_arrow_left"/>
+ android:clickable="true"
+ android:focusable="true"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingLeft="15dp"
+ android:layout_alignParentLeft="true"
+ android:visibility="gone"
+ android:layout_alignWithParentIfMissing="true"
+ android:src="@drawable/btn_arrow_left"/>
<ImageView android:id="@+id/btn_forward"
- android:clickable="true"
- android:focusable="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingRight="15dp"
- android:layout_alignParentRight="true"
- android:visibility="visible"
- android:layout_alignWithParentIfMissing="true"
- android:src="@drawable/btn_arrow_right"/>
+ android:clickable="true"
+ android:focusable="true"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingRight="15dp"
+ android:layout_alignParentRight="true"
+ android:visibility="gone"
+ android:layout_alignWithParentIfMissing="true"
+ android:src="@drawable/btn_arrow_right"/>
</RelativeLayout>
+ <LinearLayout android:id="@+id/station_frequency_row"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:gravity="center">
+
+ <TextView android:id="@+id/call_sign_tv"
+ android:textColor="@android:color/white"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textStyle="bold"
+ android:textSize="50sp"
+ android:alpha="0.5"
+ android:paddingRight="2dp"
+ android:paddingLeft="2dp"
+ android:text="@string/station_id_string" />
+
+ <TextView android:id="@+id/pty_tv"
+ android:textColor="@android:color/white"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="32sp"
+ android:textAllCaps="true"
+ android:paddingRight="2dp"
+ android:paddingLeft="2dp"
+ android:text="@string/pty_string" />
+
+ </LinearLayout>
+
<!-- Station Radio Text information display -->
<TextView android:id="@+id/radio_text_tv"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
+ android:textSize="16sp"
android:singleLine="true"
android:textStyle="bold"
android:paddingLeft="2dp"
@@ -178,6 +156,19 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textSize="16sp"
+ android:singleLine="true"
+ android:textStyle="bold"
+ android:paddingLeft="2dp"
+ android:paddingRight="2dp"
+ android:paddingBottom="5dp"
+ android:gravity="center_horizontal"
+ android:text="@string/eradio_text_string"/>
+
+ <TextView android:id="@+id/record_msg_tv"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="15sp"
android:singleLine="true"
android:textStyle="bold"
diff --git a/fmapp2/res/values/colors.xml b/fmapp2/res/values/colors.xml
new file mode 100644
index 0000000..f143df1
--- /dev/null
+++ b/fmapp2/res/values/colors.xml
@@ -0,0 +1,7 @@
+<?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>
+</resources>
diff --git a/fmapp2/res/values/styles.xml b/fmapp2/res/values/styles.xml
index e9c9bcf..120c187 100644
--- a/fmapp2/res/values/styles.xml
+++ b/fmapp2/res/values/styles.xml
@@ -37,25 +37,46 @@
<item name="android:focusable">true</item>
</style>
+ <style name="ButtonStripButtons">
+ <item name="android:gravity">center</item>
+ <item name="android:layout_weight">1</item>
+ <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:background">@drawable/preset_button_background</item>
+ <item name="android:singleLine">true</item>
+ <item name="android:text">@string/add_station</item>
+ <item name="android:textStyle">bold</item>
+ </style>
+
<style name="ButtonStripLeft">
<item name="android:gravity">center</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
- <item name="android:background">@drawable/btn_strip_trans_left</item>
- </style>
+ <item name="android:textSize">18sp</item>
+ <item name="android:textColor">#9DFFFFFF</item>
+ <item name="android:background">@drawable/preset_button_background</item>
+ <item name="android:singleLine">true</item> </style>
<style name="ButtonStripMiddle">
<item name="android:gravity">center</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
- <item name="android:background">@drawable/btn_strip_trans_middle</item>
+ <item name="android:textSize">18sp</item>
+ <item name="android:textColor">#9DFFFFFF</item>
+ <item name="android:background">@drawable/preset_button_background</item>
+ <item name="android:singleLine">true</item>
</style>
<style name="ButtonStripRight">
<item name="android:gravity">center</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
- <item name="android:background">@drawable/btn_strip_trans_right</item>
+ <item name="android:textSize">18sp</item>
+ <item name="android:textColor">#9DFFFFFF</item>
+ <item name="android:background">@drawable/preset_button_background</item>
+ <item name="android:singleLine">true</item>
</style>
</resources>
diff --git a/fmapp2/src/com/caf/fmradio/FMRadio.java b/fmapp2/src/com/caf/fmradio/FMRadio.java
index d078126..ac0ba6c 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadio.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadio.java
@@ -28,6 +28,7 @@
package com.caf.fmradio;
+import android.app.ActionBar;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
@@ -98,6 +99,7 @@
import android.content.SharedPreferences;
import android.graphics.Color;
import android.graphics.Point;
+import android.graphics.drawable.ColorDrawable;
import android.Manifest;
import android.content.pm.PackageManager;
@@ -336,6 +338,17 @@
DisplayMetrics outMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(outMetrics );
+ getWindow().setBackgroundDrawableResource(R.color.background_color);
+
+ // Set up your ActionBar
+ final ActionBar actionBar = getActionBar();
+ actionBar.setDisplayShowHomeEnabled(false);
+ actionBar.setDisplayShowTitleEnabled(false);
+ actionBar.setDisplayShowCustomEnabled(true);
+ actionBar.setCustomView(R.layout.action_bar);
+
+ ((TextView) findViewById(R.id.title)).setText(R.string.app_name);
+
setContentView(R.layout.fmradio);
SavedDataAndState = (LoadedDataAndState)getLastNonConfigurationInstance();
@@ -1442,7 +1455,7 @@
displayDialog(DIALOG_PRESET_OPTIONS);
}else {
addToPresets();
- view.startAnimation(mAnimation);
+ //view.startAnimation(mAnimation);
}
return true;
}
@@ -1772,7 +1785,7 @@
int durationInMins = FmSharedPreferences.getRecordDuration();
Log.e(LOGTAG, " Fected duration:" + durationInMins );
initiateRecordDurationTimer( durationInMins );
- setRecordingStopImage();
+ //setRecordingStopImage();
invalidateOptionsMenu();
}
@@ -1884,9 +1897,9 @@
mRecordingMsgTV.setText("");
}
if(isRecording()) {
- setRecordingStopImage();
+ //setRecordingStopImage();
}else {
- setRecordingStartImage();
+ //setRecordingStartImage();
}
for (int nButton = 0; nButton < MAX_PRESETS_PER_PAGE; nButton++) {
if (mPresetButtons[nButton] != null) {
@@ -1906,11 +1919,11 @@
}
}
}
- if (mForwardButton != null) {
+ if (false && mForwardButton != null) {
mForwardButton.setVisibility(((bEnable == true) ? View.VISIBLE
: View.INVISIBLE));
}
- if (mBackButton != null) {
+ if (false && mBackButton != null) {
mBackButton.setVisibility(((bEnable == true) ? View.VISIBLE
: View.INVISIBLE));
}
@@ -1944,9 +1957,9 @@
}
if(mERadioTextTV != null) {
mERadioTextTV.setVisibility(((bEnable == true) ? View.VISIBLE
- : View.INVISIBLE));
+ : View.GONE));
}
- if (mProgramServiceTV != null) {
+ if (false && mProgramServiceTV != null) {
mProgramServiceTV.setVisibility(((bEnable == true) ? View.VISIBLE
: View.INVISIBLE));
}
@@ -1986,7 +1999,7 @@
}
}
- if (mStereoTV != null) {
+ if (false && mStereoTV != null) {
mStereoTV.setVisibility(((bEnable == true) ? View.VISIBLE
: View.INVISIBLE));
}
@@ -2081,7 +2094,7 @@
private void updateStationInfoToUI() {
double frequency = mTunedStation.getFrequency() / 1000.0;
- mTuneStationFrequencyTV.setText("" + frequency + "MHz");
+ mTuneStationFrequencyTV.setText("" + frequency);
if ((mPicker != null) && mUpdatePickerValue) {
mPicker.setValue(((mTunedStation.getFrequency() - mPrefs.getLowerLimit())
/ mPrefs.getFrequencyStepSize()));
diff --git a/fmapp2/src/com/caf/fmradio/HorizontalNumberPicker.java b/fmapp2/src/com/caf/fmradio/HorizontalNumberPicker.java
index 505097f..53ff9ce 100644
--- a/fmapp2/src/com/caf/fmradio/HorizontalNumberPicker.java
+++ b/fmapp2/src/com/caf/fmradio/HorizontalNumberPicker.java
@@ -30,6 +30,7 @@
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
+import android.graphics.Typeface;
import android.graphics.Paint.Align;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
@@ -92,7 +93,7 @@
/**
* The coefficient by which to adjust (divide) the max fling velocity.
*/
- private static final int SELECTOR_MAX_FLING_VELOCITY_ADJUSTMENT = 8;
+ private static final int SELECTOR_MAX_FLING_VELOCITY_ADJUSTMENT = 4;
/**
* The the duration for adjusting the selector wheel.
@@ -247,7 +248,7 @@
/**
* The height of the text.
*/
- private int mTextSize = 20;
+ private int mTextSize = 60;
/**
* The height of the gap between text elements if the selector wheel.
*/
@@ -346,7 +347,7 @@
/**
* The colors alpha of selector text.
*/
- private static final int SELECTOR_TEXT_ALPHA_TRANSPARENT_NONE = 255;
+ private static final int SELECTOR_TEXT_ALPHA_TRANSPARENT_NONE = 76;
private static float mDensity = 1.0f;
private static final float LDPI = 0.75f;
@@ -354,9 +355,9 @@
private static final float HDPI = 1.5f;
private static final float XHDPI = 2.0f;
- private float mScaleWidth = 2;
+ private float mScaleWidth = 5;
private float mScaleLengthShort = 10;
- private float mScaleLengthLong = 20;
+ private float mScaleLengthLong = 40;
private float mGapBetweenNumAndScale = 18;
private float mHdpiPositionAdjust = 18;
@@ -899,19 +900,19 @@
setSelectorWheelState(SELECTOR_WHEEL_STATE_SMALL);
return true;
}
-// VelocityTracker velocityTracker = mVelocityTracker;
-// velocityTracker.computeCurrentVelocity(1000, mMaximumFlingVelocity);
-// int initialVelocity=0;
-// if(!mHorizontal){
-// initialVelocity = (int) velocityTracker.getYVelocity();
-// }else{
-// initialVelocity = (int)velocityTracker.getXVelocity();
-// }
-// if (Math.abs(initialVelocity) > mMinimumFlingVelocity) {
-// // fling after up
-// fling(initialVelocity);
-// onScrollStateChange(OnScrollListener.SCROLL_STATE_FLING);
-// } else {
+ VelocityTracker velocityTracker = mVelocityTracker;
+ velocityTracker.computeCurrentVelocity(1000, mMaximumFlingVelocity);
+ int initialVelocity=0;
+ if(!mHorizontal){
+ initialVelocity = (int) velocityTracker.getYVelocity();
+ }else{
+ initialVelocity = (int)velocityTracker.getXVelocity();
+ }
+ if (Math.abs(initialVelocity) > mMinimumFlingVelocity) {
+ // fling after up
+ fling(initialVelocity);
+ onScrollStateChange(OnScrollListener.SCROLL_STATE_FLING);
+ } else {
if (mAdjustScrollerOnUpEvent) {
if (mFlingScroller.isFinished()
&& mAdjustScroller.isFinished()) {
@@ -920,7 +921,7 @@
} else {
postAdjustScrollerCommand(SHOW_INPUT_CONTROLS_DELAY_MILLIS);
}
-// }
+ }
mVelocityTracker.recycle();
mVelocityTracker = null;
break;
@@ -1492,13 +1493,13 @@
.get(selectorIndex);
if(i - mSelectorMiddleItemIndex > 0 ){
mSelectorWheelPaint.setColor(Color.WHITE);
- mSelectorWheelPaint.setAlpha((2*mSelectorMiddleItemIndex - i) * SELECTOR_TEXT_ALPHA_TRANSPARENT_NONE / mSelectorMiddleItemIndex);
+ mSelectorWheelPaint.setAlpha(SELECTOR_TEXT_ALPHA_TRANSPARENT_NONE);
}else if(i - mSelectorMiddleItemIndex < 0 ){
mSelectorWheelPaint.setColor(Color.WHITE);
- mSelectorWheelPaint.setAlpha(i * SELECTOR_TEXT_ALPHA_TRANSPARENT_NONE / mSelectorMiddleItemIndex);
- }else{
- mSelectorWheelPaint.setColor(Color.RED);
mSelectorWheelPaint.setAlpha(SELECTOR_TEXT_ALPHA_TRANSPARENT_NONE);
+ }else{
+ mSelectorWheelPaint.setColor(Color.WHITE);
+ mSelectorWheelPaint.setAlpha(0);
}
try {
fNumber = Float.valueOf(scrollSelectorValue).floatValue();
@@ -1516,13 +1517,27 @@
bShowNumber = true;
fScaleLength = mScaleLengthLong * mDensity;
}
+ } else {
+ fWidthOfScale-=2;
}
if(bShowNumber){
- canvas.drawText(scrollSelectorValue, x, y, mSelectorWheelPaint);
+ 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);
}
- canvas.drawRect(x, y+fGapBetweenNumAndScale, x+fWidthOfScale, y + fGapBetweenNumAndScale + fScaleLength , mSelectorWheelPaint);
-// }
+ float left = x;
+ float top = (mBottom - mTop) - fGapBetweenNumAndScale - fScaleLength;
+ float right = x+fWidthOfScale;
+ float bottom = (mBottom - mTop);
+ canvas.drawRect(left, top, right, bottom, mSelectorWheelPaint);
if (mHorizontal) {
x += mSelectorElementWidth;
} else {