summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fmapp2/res/drawable-hdpi/recorder_stop.pngbin4930 -> 696 bytes
-rw-r--r--fmapp2/res/drawable-mdpi/recorder_stop.pngbin4930 -> 696 bytes
-rw-r--r--fmapp2/res/drawable/btn_recorder.xml2
-rw-r--r--fmapp2/res/drawable/recorder_stop.pngbin4172 -> 696 bytes
-rw-r--r--fmapp2/res/layout/fmradio.xml35
-rw-r--r--fmapp2/res/layout/station_info.xml65
-rw-r--r--fmapp2/src/com/caf/fmradio/FMRadio.java34
7 files changed, 64 insertions, 72 deletions
diff --git a/fmapp2/res/drawable-hdpi/recorder_stop.png b/fmapp2/res/drawable-hdpi/recorder_stop.png
index bb8b32b..ff9839b 100644
--- a/fmapp2/res/drawable-hdpi/recorder_stop.png
+++ b/fmapp2/res/drawable-hdpi/recorder_stop.png
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/recorder_stop.png b/fmapp2/res/drawable-mdpi/recorder_stop.png
index bb8b32b..ff9839b 100644
--- a/fmapp2/res/drawable-mdpi/recorder_stop.png
+++ b/fmapp2/res/drawable-mdpi/recorder_stop.png
Binary files differ
diff --git a/fmapp2/res/drawable/btn_recorder.xml b/fmapp2/res/drawable/btn_recorder.xml
index 88a5302..2161ba1 100644
--- a/fmapp2/res/drawable/btn_recorder.xml
+++ b/fmapp2/res/drawable/btn_recorder.xml
@@ -30,8 +30,6 @@
*/
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
- android:drawable="@drawable/recorder_selected" />
<item android:state_enabled="true"
android:drawable="@drawable/recorder_stop" />
<item android:state_enabled="false"
diff --git a/fmapp2/res/drawable/recorder_stop.png b/fmapp2/res/drawable/recorder_stop.png
index 6017be9..ff9839b 100644
--- a/fmapp2/res/drawable/recorder_stop.png
+++ b/fmapp2/res/drawable/recorder_stop.png
Binary files differ
diff --git a/fmapp2/res/layout/fmradio.xml b/fmapp2/res/layout/fmradio.xml
index c78f563..3d13e76 100644
--- a/fmapp2/res/layout/fmradio.xml
+++ b/fmapp2/res/layout/fmradio.xml
@@ -33,41 +33,6 @@
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">
-
- <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: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:visibility="gone"
- 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:singleLine="true"
- android:textStyle="bold"
- android:text="@string/prog_service_string"/>
-
- </RelativeLayout>
-
<LinearLayout android:id="@+id/stationinfo_layout"
android:layout_width="fill_parent"
android:layout_height="match_parent"
diff --git a/fmapp2/res/layout/station_info.xml b/fmapp2/res/layout/station_info.xml
index 4d75816..aee2068 100644
--- a/fmapp2/res/layout/station_info.xml
+++ b/fmapp2/res/layout/station_info.xml
@@ -29,6 +29,7 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:id="@+id/station_info"
+ android:animateLayoutChanges="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
@@ -77,7 +78,7 @@
android:textColor="@android:color/white"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textSize="56sp"
+ android:textSize="46sp"
android:textStyle="bold"
android:gravity="center"
android:clickable="true"
@@ -111,15 +112,15 @@
<LinearLayout android:id="@+id/station_frequency_row"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:gravity="center">
+ android:gravity="center_horizontal"
+ android:orientation="vertical">
<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:textSize="40sp"
android:alpha="0.5"
android:paddingRight="2dp"
android:paddingLeft="2dp"
@@ -129,7 +130,7 @@
android:textColor="@android:color/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textSize="32sp"
+ android:textSize="22sp"
android:textAllCaps="true"
android:paddingRight="2dp"
android:paddingLeft="2dp"
@@ -139,43 +140,67 @@
<!-- Station Radio Text information display -->
<TextView android:id="@+id/radio_text_tv"
- android:layout_width="fill_parent"
+ android:textColor="@android:color/white"
+ android:layout_width="wrap_content"
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:paddingTop="20dp"
- android:gravity="center_horizontal"
+ android:paddingLeft="10dp"
+ android:paddingRight="10dp"
+ android:paddingTop="10dp"
+ android:layout_gravity="center_horizontal"
android:text="@string/radio_text_string"/>
<TextView android:id="@+id/eradio_text_tv"
- android:layout_width="fill_parent"
+ android:textColor="@android:color/white"
+ android:layout_width="wrap_content"
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/prog_service_tv"
+ android:textColor="@android:color/white"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:textSize="16sp"
+ android:singleLine="true"
+ android:textStyle="bold"
+ android:text="@string/prog_service_string"/>
+
+ <TextView android:id="@+id/sleep_msg_tv"
+ android:textColor="@android:color/white"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:drawableLeft="@drawable/count_down"
+ android:layout_toRightOf="@+id/btn_onoff"
+ android:textSize="15sp"
+ android:drawablePadding="5dip"
+ android:paddingTop="5dp"
+ android:paddingBottom="5dp"
+ android:textStyle="bold"
+ android:visibility="invisible"
+ android:layout_gravity="center_horizontal"
+ android:text="@string/default_sleep" />
+
<TextView android:id="@+id/record_msg_tv"
- android:layout_width="fill_parent"
+ android:textColor="@android:color/white"
+ android:visibility="invisible"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="15sp"
android:singleLine="true"
android:textStyle="bold"
- android:paddingLeft="2dp"
- android:paddingRight="2dp"
+ android:paddingTop="5dp"
android:paddingBottom="5dp"
- android:gravity="center_horizontal"
+ android:drawablePadding="5dip"
+ android:layout_gravity="center_horizontal"
android:text="@string/eradio_text_string"/>
</LinearLayout>
diff --git a/fmapp2/src/com/caf/fmradio/FMRadio.java b/fmapp2/src/com/caf/fmradio/FMRadio.java
index d054b86..4afe77c 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadio.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadio.java
@@ -1761,8 +1761,7 @@ public class FMRadio extends Activity
private void setRecordingStartImage() {
if(null != mRecordingMsgTV) {
- mRecordingMsgTV.setCompoundDrawablesWithIntrinsicBounds
- (R.drawable.recorder_start, 0, 0, 0);
+ mRecordingMsgTV.setCompoundDrawables(null, null, null, null);
}
}
@@ -1771,7 +1770,7 @@ public class FMRadio extends Activity
int durationInMins = FmSharedPreferences.getRecordDuration();
Log.e(LOGTAG, " Fected duration:" + durationInMins );
initiateRecordDurationTimer( durationInMins );
- //setRecordingStopImage();
+ setRecordingStopImage();
invalidateOptionsMenu();
}
@@ -1783,7 +1782,7 @@ public class FMRadio extends Activity
}
if(null != mRecordingMsgTV) {
mRecordingMsgTV.setText("");
- //setRecordingStartImage();
+ setRecordingStartImage();
}
if (mService != null) {
try {
@@ -1867,9 +1866,9 @@ public class FMRadio extends Activity
mRecordingMsgTV.setText("");
}
if(isRecording()) {
- //setRecordingStopImage();
+ setRecordingStopImage();
}else {
- //setRecordingStartImage();
+ setRecordingStartImage();
}
}else {
if (mRadioTextScroller != null) {
@@ -1905,23 +1904,23 @@ public class FMRadio extends Activity
}
if (mSleepMsgTV != null) {
mSleepMsgTV.setVisibility(((bEnable && isSleepTimerActive()) ? View.VISIBLE
- : View.INVISIBLE));
+ : View.GONE));
}
if (mRecordingMsgTV != null) {
mRecordingMsgTV.setVisibility(((bEnable == true) ? View.VISIBLE
- : View.INVISIBLE));
+ : View.GONE));
}
if (mRadioTextTV != null) {
mRadioTextTV.setVisibility(((bEnable == true) ? View.VISIBLE
- : View.INVISIBLE));
+ : View.GONE));
}
if(mERadioTextTV != null) {
mERadioTextTV.setVisibility(((bEnable == true) ? View.VISIBLE
: View.GONE));
}
if (mProgramServiceTV != null) {
-// mProgramServiceTV.setVisibility(((bEnable == true) ? View.VISIBLE
-// : View.INVISIBLE));
+ mProgramServiceTV.setVisibility(((bEnable == true) ? View.VISIBLE
+ : View.GONE));
}
if (!isAntennaAvailable()) {
@@ -1940,6 +1939,7 @@ public class FMRadio extends Activity
}
if (mERadioTextTV != null) {
mERadioTextTV.setText("");
+ mERadioTextTV.setVisibility(View.GONE);
mERadioTextScroller.mOriginalString = "";
}
if (mOnOffButton != null) {
@@ -1952,6 +1952,7 @@ public class FMRadio extends Activity
}
if (mERadioTextTV != null) {
mERadioTextTV.setText("");
+ mERadioTextTV.setVisibility(View.GONE);
mERadioTextScroller.mOriginalString = "";
}
if (mOnOffButton != null) {
@@ -2059,6 +2060,8 @@ public class FMRadio extends Activity
mProgramTypeTV.setText(mTunedStation.getPtyString());
mRadioTextTV.setText("");
mERadioTextTV.setText("");
+ mERadioTextTV.setVisibility(View.GONE);
+ mRadioTextTV.setVisibility(View.GONE);
mRadioTextScroller.mOriginalString = "";
mRadioTextScroller.mStringlength = 0;
mRadioTextScroller.mIteration = 0;
@@ -2332,7 +2335,7 @@ public class FMRadio extends Activity
mSleepUpdateHandlerThread.interrupt();
}
if(null != mSleepMsgTV) {
- mSleepMsgTV.setVisibility(View.INVISIBLE);
+ mSleepMsgTV.setVisibility(View.GONE);
}
}
@@ -2364,7 +2367,7 @@ public class FMRadio extends Activity
}
private void updateExpiredSleepTime() {
- int vis = View.INVISIBLE;
+ int vis = View.GONE;
if (isSleepTimerActive()) {
long timeNow = ((SystemClock.elapsedRealtime()));
if (mSleepAtPhoneTime >= timeNow) {
@@ -2373,8 +2376,8 @@ public class FMRadio extends Activity
mSleepMsgTV.setText(sleepMsg);
if (seconds < SLEEP_TOGGLE_SECONDS) {
int nowVis = mSleepMsgTV.getVisibility();
- vis = (nowVis == View.INVISIBLE) ? View.VISIBLE
- : View.INVISIBLE;
+ vis = (nowVis == View.GONE) ? View.VISIBLE
+ : View.GONE;
}else {
vis = View.VISIBLE;
}
@@ -2697,6 +2700,7 @@ public class FMRadio extends Activity
mERadioTextTV.setText("");
mERadioTextScroller.mOriginalString = "";
}else {
+ mERadioTextTV.setVisibility(View.GONE);
mERadioTextTV.setText(str);
mERadioTextScroller.mOriginalString = str;
}