summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanesh M <daneshm90@gmail.com>2014-11-14 11:05:18 -0800
committerEthan Chen <intervigil@gmail.com>2015-01-08 12:33:10 -0800
commitbb69b5eb714d978ed6ec248a39aeb150191d27a5 (patch)
tree2db60a282bc5a62042c54c6dd778577accdb498c
parentf1580820043d36fef9c56ee96acc00e9460b8a77 (diff)
downloadandroid_hardware_qcom_fm-bb69b5eb714d978ed6ec248a39aeb150191d27a5.tar.gz
android_hardware_qcom_fm-bb69b5eb714d978ed6ec248a39aeb150191d27a5.tar.bz2
android_hardware_qcom_fm-bb69b5eb714d978ed6ec248a39aeb150191d27a5.zip
FMRadio : Re-vamp UI
Change-Id: Ib9cb3d5663f9eec92922a3eea7d605a2bf3b538c
-rw-r--r--fmapp/res/layout-normal/fmradio.xml91
-rw-r--r--fmapp/res/layout-normal/station_info.xml182
-rw-r--r--fmapp/res/layout-small/station_info.xml176
-rw-r--r--fmapp2/AndroidManifest.xml1
-rw-r--r--fmapp2/res/drawable-hdpi/bg.pngbin103618 -> 0 bytes
-rw-r--r--fmapp2/res/drawable-hdpi/ic_btn_earphone_default.pngbin4612 -> 977 bytes
-rw-r--r--fmapp2/res/drawable-hdpi/ic_btn_earphone_diable.pngbin4589 -> 977 bytes
-rw-r--r--fmapp2/res/drawable-hdpi/ic_btn_earphone_select.pngbin4651 -> 995 bytes
-rw-r--r--fmapp2/res/drawable-hdpi/ic_btn_onoff_default.pngbin5218 -> 1304 bytes
-rw-r--r--fmapp2/res/drawable-hdpi/ic_btn_onoff_disable.pngbin5184 -> 1241 bytes
-rw-r--r--fmapp2/res/drawable-hdpi/ic_btn_onoff_press.pngbin5289 -> 1299 bytes
-rw-r--r--fmapp2/res/drawable-hdpi/ic_btn_spaker.pngbin5699 -> 1255 bytes
-rw-r--r--fmapp2/res/drawable-hdpi/ic_btn_spaker_select.pngbin5798 -> 1328 bytes
-rw-r--r--fmapp2/res/drawable-hdpi/ic_silent_mode.pngbin0 -> 1480 bytes
-rw-r--r--fmapp2/res/drawable-hdpi/ic_silent_mode_off.pngbin0 -> 1229 bytes
-rw-r--r--fmapp2/res/drawable-mdpi/bg.pngbin103618 -> 0 bytes
-rw-r--r--fmapp2/res/drawable-mdpi/ic_btn_earphone_default.pngbin4317 -> 686 bytes
-rw-r--r--fmapp2/res/drawable-mdpi/ic_btn_earphone_diable.pngbin4220 -> 686 bytes
-rw-r--r--fmapp2/res/drawable-mdpi/ic_btn_earphone_select.pngbin4254 -> 686 bytes
-rw-r--r--fmapp2/res/drawable-mdpi/ic_btn_onoff_default.pngbin4775 -> 836 bytes
-rw-r--r--fmapp2/res/drawable-mdpi/ic_btn_onoff_disable.pngbin4663 -> 804 bytes
-rw-r--r--fmapp2/res/drawable-mdpi/ic_btn_onoff_press.pngbin4696 -> 826 bytes
-rw-r--r--fmapp2/res/drawable-mdpi/ic_btn_spaker.pngbin4879 -> 754 bytes
-rw-r--r--fmapp2/res/drawable-mdpi/ic_btn_spaker_select.pngbin4809 -> 774 bytes
-rw-r--r--fmapp2/res/drawable-mdpi/ic_silent_mode.pngbin0 -> 886 bytes
-rw-r--r--fmapp2/res/drawable-mdpi/ic_silent_mode_off.pngbin0 -> 750 bytes
-rw-r--r--fmapp2/res/drawable-xhdpi/ic_btn_earphone_default.pngbin0 -> 1493 bytes
-rw-r--r--fmapp2/res/drawable-xhdpi/ic_btn_earphone_diable.pngbin0 -> 1493 bytes
-rw-r--r--fmapp2/res/drawable-xhdpi/ic_btn_earphone_select.pngbin0 -> 1480 bytes
-rw-r--r--fmapp2/res/drawable-xhdpi/ic_btn_onoff_default.pngbin0 -> 1668 bytes
-rw-r--r--fmapp2/res/drawable-xhdpi/ic_btn_onoff_disable.pngbin0 -> 1615 bytes
-rw-r--r--fmapp2/res/drawable-xhdpi/ic_btn_onoff_press.pngbin0 -> 1648 bytes
-rw-r--r--fmapp2/res/drawable-xhdpi/ic_btn_spaker.pngbin0 -> 1752 bytes
-rw-r--r--fmapp2/res/drawable-xhdpi/ic_btn_spaker_select.pngbin0 -> 1720 bytes
-rw-r--r--fmapp2/res/drawable-xhdpi/ic_silent_mode.pngbin0 -> 2190 bytes
-rw-r--r--fmapp2/res/drawable-xhdpi/ic_silent_mode_off.pngbin0 -> 1843 bytes
-rw-r--r--fmapp2/res/drawable-xxhdpi/ic_btn_earphone_default.pngbin0 -> 2689 bytes
-rw-r--r--fmapp2/res/drawable-xxhdpi/ic_btn_earphone_diable.pngbin0 -> 2689 bytes
-rw-r--r--fmapp2/res/drawable-xxhdpi/ic_btn_earphone_select.pngbin0 -> 2636 bytes
-rw-r--r--fmapp2/res/drawable-xxhdpi/ic_btn_onoff_default.pngbin0 -> 3002 bytes
-rw-r--r--fmapp2/res/drawable-xxhdpi/ic_btn_onoff_disable.pngbin0 -> 2790 bytes
-rw-r--r--fmapp2/res/drawable-xxhdpi/ic_btn_onoff_press.pngbin0 -> 2971 bytes
-rw-r--r--fmapp2/res/drawable-xxhdpi/ic_btn_spaker.pngbin0 -> 3174 bytes
-rw-r--r--fmapp2/res/drawable-xxhdpi/ic_btn_spaker_select.pngbin0 -> 3090 bytes
-rw-r--r--fmapp2/res/drawable-xxhdpi/ic_silent_mode.pngbin0 -> 4021 bytes
-rw-r--r--fmapp2/res/drawable-xxhdpi/ic_silent_mode_off.pngbin0 -> 3326 bytes
-rw-r--r--fmapp2/res/drawable/bg.pngbin103618 -> 10316 bytes
-rw-r--r--fmapp2/res/drawable/preset_button_background.xml43
-rw-r--r--fmapp2/res/drawable/seeker.pngbin0 -> 3560 bytes
-rw-r--r--fmapp2/res/layout-800x480/fmradio.xml204
-rw-r--r--fmapp2/res/layout-800x480/station_info.xml192
-rw-r--r--fmapp2/res/layout/action_bar.xml48
-rw-r--r--fmapp2/res/layout/fmradio.xml129
-rw-r--r--fmapp2/res/layout/station_info.xml143
-rw-r--r--fmapp2/res/values/colors.xml7
-rw-r--r--fmapp2/res/values/styles.xml29
-rw-r--r--fmapp2/src/com/caf/fmradio/FMRadio.java45
-rw-r--r--fmapp2/src/com/caf/fmradio/HorizontalNumberPicker.java67
58 files changed, 292 insertions, 1065 deletions
diff --git a/fmapp/res/layout-normal/fmradio.xml b/fmapp/res/layout-normal/fmradio.xml
deleted file mode 100644
index 5b9197c..0000000
--- a/fmapp/res/layout-normal/fmradio.xml
+++ /dev/null
@@ -1,91 +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/application_border"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
-
- <!-- This LinearLayout contains Station Information display and the function buttons -->
-
- <RelativeLayout android:id="@+id/stationinfo_layout"
- android:background="@drawable/station_border"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="5dp"
- android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true" >
-
- <!-- This included layout contains Station Information to display -->
- <include layout="@layout/station_info" />
- </RelativeLayout>
-
- <RelativeLayout android:id="@+id/preset_full_layout"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/stationinfo_layout"
- android:layout_alignParentLeft="true">
-
- <!-- Layout contains the Next/Previous Presets and Tune buttons and status msg text-->
- <include layout="@layout/navigate" />
- </RelativeLayout>
-
- <RelativeLayout android:id="@+id/on_off_separator_layout"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="20dp"
- android:layout_below="@id/preset_full_layout">
-
- <View android:id="@+id/on_off_separator"
- android:layout_width="fill_parent"
- android:layout_height="1dp"
- android:background="#ffffffff"/>
-
- </RelativeLayout>
-
- <RelativeLayout android:id="@+id/layout_on_off"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="1dp"
- android:layout_centerInParent="true"
- android:layout_below="@id/on_off_separator_layout">
-
- <ImageButton android:id="@+id/btn_silent"
- android:src="@drawable/ic_silent_mode_off"
- android:layout_width="120dp"
- android:layout_height="65dp" />
-
- <ImageButton android:id="@+id/btn_onoff"
- android:src="@drawable/ic_btn_onoff"
- android:layout_toRightOf="@id/btn_silent"
- android:layout_width="120dp"
- android:layout_height="65dp" />
- </RelativeLayout>
-
-</RelativeLayout>
diff --git a/fmapp/res/layout-normal/station_info.xml b/fmapp/res/layout-normal/station_info.xml
deleted file mode 100644
index e47f823..0000000
--- a/fmapp/res/layout-normal/station_info.xml
+++ /dev/null
@@ -1,182 +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">
-
-<RelativeLayout android:id="@+id/station_info"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:gravity="top">
-
- <RelativeLayout android:id="@+id/top_most"
- android:layout_width="fill_parent"
- android:gravity="top"
- 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"/>
-
- <TextView android:id="@+id/prog_service_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_centerHorizontal="true"
- android:layout_alignBaseline="@id/signal_level"
- android:textSize="16dp"
- android:singleLine="true"
- android:textStyle="bold"
- android:text="@string/prog_service_string" />
-
- <TextView android:id="@+id/stereo_text_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingRight="5dp"
- android:layout_alignParentTop="true"
- android:layout_alignParentRight="true"
- android:layout_alignBaseline="@id/signal_level"
- android:textSize="16dp"
- android:text="@string/default_audio" />
-
- </RelativeLayout>
-
- <RelativeLayout android:id="@+id/station_id_row"
- android:layout_width="fill_parent"
- android:layout_below="@id/top_most"
- android:layout_height="wrap_content">
-
- <TextView android:id="@+id/call_sign_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="16dp"
- android:layout_centerInParent="true"
- android:text="@string/station_id_string" />
-
- </RelativeLayout>
-
- <RelativeLayout android:id="@+id/station_frequency_row"
- android:layout_width="fill_parent"
- android:layout_below="@id/station_id_row"
- android:layout_height="wrap_content"
- android:gravity="center" >
-
- <TextView android:id="@+id/prog_frequency_tv"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="50dp"
- android:layout_centerHorizontal="true"
- android:layout_centerVertical="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="100dp"
- android:paddingLeft="2dp"
- 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="100dp"
- android:paddingRight="2dp"
- android:layout_alignParentRight="true"
- android:visibility="visible"
- android:layout_alignWithParentIfMissing="true"
- android:src="@drawable/btn_arrow_right" />
- </RelativeLayout>
-
- <RelativeLayout android:id="@+id/second_layout"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@id/station_frequency_row"
- android:layout_alignRight="@id/station_frequency_row"
- android:layout_below="@id/station_frequency_row" >
-
- <TextView android:id="@+id/pty_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="16dp"
- android:layout_centerInParent="true"
- android:text="@string/pty_string" />
- </RelativeLayout>
-
- <RelativeLayout android:id="@+id/third_layout"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:gravity="center_vertical"
- android:layout_alignLeft="@id/second_layout"
- android:layout_alignRight="@id/second_layout"
- android:layout_below="@id/second_layout" >
-
- <TextView android:id="@+id/radio_text_tv"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="16dp"
- android:singleLine="true"
- android:textStyle="bold"
- android:paddingLeft="2dp"
- android:paddingRight="2dp"
- android:paddingBottom="5dp"
- android:gravity="center"
- 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="16dp"
- android:singleLine="true"
- android:textStyle="bold"
- android:paddingLeft="2dp"
- android:paddingRight="2dp"
- android:paddingBottom="5dp"
- android:layout_below="@id/radio_text_tv"
- android:gravity="center_horizontal"
- android:text="@string/eradio_text_string"/>
- </RelativeLayout>
- <!-- Station Radio Text information display -->
- </RelativeLayout>
-</merge>
diff --git a/fmapp/res/layout-small/station_info.xml b/fmapp/res/layout-small/station_info.xml
deleted file mode 100644
index 0f3fce4..0000000
--- a/fmapp/res/layout-small/station_info.xml
+++ /dev/null
@@ -1,176 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (c) 2009-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 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"/>
-
- <TextView android:id="@+id/prog_service_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_centerHorizontal="true"
- android:layout_alignBaseline="@id/signal_level"
- android:textSize="20dp"
- android:singleLine="true"
- android:textStyle="bold"
- android:text="@string/prog_service_string"/>
-
- <TextView android:id="@+id/stereo_text_tv"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingRight="5dp"
- android:layout_alignParentTop="true"
- android:layout_alignParentRight="true"
- android:layout_alignBaseline="@id/signal_level"
- android:textSize="14dp"
- 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="14dp"
- android:paddingTop="2dp"
- android:paddingRight="2dp"
- android:paddingBottom="2dp"
- android:paddingLeft="2dp"
- android:text="@string/station_id_string" />
-
- <RelativeLayout android:id="@+id/second_layout"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="2dp"
- android:layout_marginBottom="2dp"
- 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="64dp"
- android:layout_centerHorizontal="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="100dp"
- android:paddingLeft="2dp"
- 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="100dp"
- android:paddingRight="2dp"
- android:layout_alignParentRight="true"
- android:visibility="visible"
- android:layout_alignWithParentIfMissing="true"
- android:src="@drawable/btn_arrow_right"/>
-
- </RelativeLayout>
-
- <TextView android:id="@+id/pty_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="14dp"
- android:paddingTop="2dp"
- android:paddingRight="2dp"
- android:paddingBottom="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="20dp"
- android:singleLine="true"
- android:textStyle="bold"
- android:paddingLeft="2dp"
- android:paddingRight="2dp"
- android:paddingBottom="5dp"
- 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="20dp"
- 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/AndroidManifest.xml b/fmapp2/AndroidManifest.xml
index 385350a..5004842 100644
--- a/fmapp2/AndroidManifest.xml
+++ b/fmapp2/AndroidManifest.xml
@@ -59,6 +59,7 @@
android:name=".FMRadio"
android:label="@string/app_name"
android:clearTaskOnLaunch="true"
+ android:screenOrientation="portrait"
android:allowTaskReparenting="true"
android:launchMode="singleTask"
android:configChanges="orientation|keyboardHidden|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>
+ <RelativeLayout android:id="@+id/second_layout"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:gravity="center"
+ android:layout_marginLeft="2dp"
+ android:layout_marginRight="2dp">
+
+ <TextView android:id="@+id/prog_frequency_tv"
+ 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="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="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: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:textColor="@android:color/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textSize="14sp"
- android:paddingTop="2dp"
+ android:textStyle="bold"
+ android:textSize="50sp"
+ android:alpha="0.5"
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:textColor="@android:color/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textSize="14sp"
- android:paddingTop="2dp"
+ android:textSize="32sp"
+ android:textAllCaps="true"
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="2dp"
- android:layout_marginBottom="2dp"
- 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"/>
-
- <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: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 0acbc63..2e59c1a 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;
@@ -85,9 +86,9 @@ import java.util.ArrayList;
import com.caf.utils.FrequencyPicker;
import com.caf.utils.FrequencyPickerDialog;
+
import android.content.ServiceConnection;
import android.media.MediaRecorder;
-
import qcom.fmradio.FmConfig;
import android.os.ServiceManager;
@@ -97,6 +98,7 @@ import com.caf.fmradio.HorizontalNumberPicker.Scale;
import android.content.SharedPreferences;
import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
public class FMRadio extends Activity
{
@@ -286,6 +288,17 @@ public class FMRadio extends Activity
mCommandActive = CMD_NONE;
mCommandFailed = CMD_NONE;
+ 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);
+
Log.d(LOGTAG, "onCreate - Height : "+ getWindowManager().getDefaultDisplay().getHeight()
+ " - Width : "+ getWindowManager().getDefaultDisplay().getWidth());
@@ -1476,7 +1489,7 @@ public class FMRadio extends Activity
showDialog(DIALOG_PRESET_OPTIONS);
}else {
addToPresets();
- view.startAnimation(mAnimation);
+ //view.startAnimation(mAnimation);
}
return true;
}
@@ -1795,7 +1808,7 @@ public class FMRadio extends Activity
int durationInMins = FmSharedPreferences.getRecordDuration();
Log.e(LOGTAG, " Fected duration:" + durationInMins );
initiateRecordDurationTimer( durationInMins );
- setRecordingStopImage();
+ //setRecordingStopImage();
invalidateOptionsMenu();
}
@@ -1807,7 +1820,7 @@ public class FMRadio extends Activity
}
if(null != mRecordingMsgTV) {
mRecordingMsgTV.setText("");
- setRecordingStartImage();
+ //setRecordingStartImage();
}
if (mService != null) {
try {
@@ -1891,9 +1904,9 @@ public class FMRadio extends Activity
mRecordingMsgTV.setText("");
}
if(isRecording()) {
- setRecordingStopImage();
+ //setRecordingStopImage();
}else {
- setRecordingStartImage();
+ //setRecordingStartImage();
}
for (int nButton = 0; nButton < MAX_PRESETS_PER_PAGE; nButton++) {
if (mPresetButtons[nButton] != null) {
@@ -1914,12 +1927,12 @@ public class FMRadio extends Activity
}
}
if (mForwardButton != null) {
- mForwardButton.setVisibility(((bEnable == true) ? View.VISIBLE
- : View.INVISIBLE));
+ //mForwardButton.setVisibility(((bEnable == true) ? View.VISIBLE
+ // : View.INVISIBLE));
}
if (mBackButton != null) {
- mBackButton.setVisibility(((bEnable == true) ? View.VISIBLE
- : View.INVISIBLE));
+ //mBackButton.setVisibility(((bEnable == true) ? View.VISIBLE
+ // : View.INVISIBLE));
}
if (mTuneStationFrequencyTV != null) {
mTuneStationFrequencyTV.setVisibility(((bEnable == true) ? View.VISIBLE
@@ -1951,11 +1964,11 @@ public class FMRadio extends Activity
}
if(mERadioTextTV != null) {
mERadioTextTV.setVisibility(((bEnable == true) ? View.VISIBLE
- : View.INVISIBLE));
+ : View.GONE));
}
if (mProgramServiceTV != null) {
- mProgramServiceTV.setVisibility(((bEnable == true) ? View.VISIBLE
- : View.INVISIBLE));
+// mProgramServiceTV.setVisibility(((bEnable == true) ? View.VISIBLE
+// : View.INVISIBLE));
}
if (!isAntennaAvailable()) {
@@ -1994,8 +2007,8 @@ public class FMRadio extends Activity
}
if (mStereoTV != null) {
- mStereoTV.setVisibility(((bEnable == true) ? View.VISIBLE
- : View.INVISIBLE));
+ //mStereoTV.setVisibility(((bEnable == true) ? View.VISIBLE
+ // : View.INVISIBLE));
}
for (int nButton = 0; nButton < MAX_PRESETS_PER_PAGE; nButton++) {
if (mPresetButtons[nButton] != null) {
@@ -2088,7 +2101,7 @@ public class FMRadio extends Activity
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.content.res.TypedArray;
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 @@ public class HorizontalNumberPicker extends LinearLayout {
/**
* 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 @@ public class HorizontalNumberPicker extends LinearLayout {
/**
* 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 @@ public class HorizontalNumberPicker extends LinearLayout {
/**
* 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 @@ public class HorizontalNumberPicker extends LinearLayout {
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 @@ public class HorizontalNumberPicker extends LinearLayout {
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 @@ public class HorizontalNumberPicker extends LinearLayout {
} else {
postAdjustScrollerCommand(SHOW_INPUT_CONTROLS_DELAY_MILLIS);
}
-// }
+ }
mVelocityTracker.recycle();
mVelocityTracker = null;
break;
@@ -1492,13 +1493,13 @@ public class HorizontalNumberPicker extends LinearLayout {
.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 @@ public class HorizontalNumberPicker extends LinearLayout {
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 {