summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVenkateshwarlu Domakonda <vdomak@codeaurora.org>2014-07-26 15:00:08 +0530
committerVenkateshwarlu Domakonda <vdomak@codeaurora.org>2014-07-28 18:42:19 +0530
commit91c6b0118687284d050548da8601b1e73e960588 (patch)
treea764921190d32a813ccedcea508f1f6ba1a0bcff
parentef9dc16ae6068a830a55b366b00ba91a11cf6b67 (diff)
downloadandroid_hardware_qcom_fm-91c6b0118687284d050548da8601b1e73e960588.tar.gz
android_hardware_qcom_fm-91c6b0118687284d050548da8601b1e73e960588.tar.bz2
android_hardware_qcom_fm-91c6b0118687284d050548da8601b1e73e960588.zip
FM: Fix the issue with color of text
Default color of text changed in the recent android version. Set the text color as white. Change-Id: I545cbf5824e7436e8fdb6e0cf70bbc5d6e13a5f3
-rw-r--r--fmapp2/res/layout-800x480/fmradio.xml2
-rw-r--r--fmapp2/res/layout-800x480/station_info.xml7
-rw-r--r--fmapp2/res/layout/statusbar.xml2
-rw-r--r--fmapp2/src/com/caf/fmradio/FMRadio.java11
-rw-r--r--fmapp2/src/com/caf/hc_utils/FrequencyPicker.java4
5 files changed, 24 insertions, 2 deletions
diff --git a/fmapp2/res/layout-800x480/fmradio.xml b/fmapp2/res/layout-800x480/fmradio.xml
index e209769..0b96bc5 100644
--- a/fmapp2/res/layout-800x480/fmradio.xml
+++ b/fmapp2/res/layout-800x480/fmradio.xml
@@ -56,6 +56,7 @@
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"
@@ -71,6 +72,7 @@
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"/>
diff --git a/fmapp2/res/layout-800x480/station_info.xml b/fmapp2/res/layout-800x480/station_info.xml
index 87a8f7e..c96775a 100644
--- a/fmapp2/res/layout-800x480/station_info.xml
+++ b/fmapp2/res/layout-800x480/station_info.xml
@@ -56,6 +56,7 @@
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"/>
@@ -70,6 +71,7 @@
android:layout_alignParentRight="true"
android:layout_alignBaseline="@id/signal_level"
android:textSize="13sp"
+ android:textColor="@android:color/white"
android:text="@string/default_audio"/>
</RelativeLayout>
@@ -88,6 +90,7 @@
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"
@@ -99,6 +102,7 @@
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"
@@ -120,6 +124,7 @@
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"
@@ -160,6 +165,7 @@
android:textSize="15sp"
android:singleLine="true"
android:textStyle="bold"
+ android:textColor="@android:color/white"
android:paddingLeft="2dp"
android:paddingRight="2dp"
android:paddingBottom="5dp"
@@ -172,6 +178,7 @@
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"
diff --git a/fmapp2/res/layout/statusbar.xml b/fmapp2/res/layout/statusbar.xml
index 677ed74..47e1a91 100644
--- a/fmapp2/res/layout/statusbar.xml
+++ b/fmapp2/res/layout/statusbar.xml
@@ -45,7 +45,7 @@
<TextView android:id="@+id/frequency"
android:textAppearance="?android:attr/textAppearanceMediumInverse"
- android:textColor="#FFFFFFFF"
+ android:textColor="@android:color/black"
android:focusable="true"
android:ellipsize="marquee"
android:singleLine="true"
diff --git a/fmapp2/src/com/caf/fmradio/FMRadio.java b/fmapp2/src/com/caf/fmradio/FMRadio.java
index f4ed775..15f16ce 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadio.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadio.java
@@ -96,6 +96,7 @@ import com.caf.fmradio.HorizontalNumberPicker.OnValueChangeListener;
import com.caf.fmradio.HorizontalNumberPicker.Scale;
import android.content.SharedPreferences;
+import android.graphics.Color;
public class FMRadio extends Activity
{
@@ -1870,6 +1871,11 @@ public class FMRadio extends Activity
}else {
setRecordingStartImage();
}
+ for (int nButton = 0; nButton < MAX_PRESETS_PER_PAGE; nButton++) {
+ if (mPresetButtons[nButton] != null) {
+ mPresetButtons[nButton].setTextColor(Color.WHITE);
+ }
+ }
}else {
if (mRadioTextScroller != null) {
mRadioTextScroller.stopScroll();
@@ -1877,6 +1883,11 @@ public class FMRadio extends Activity
if (mERadioTextScroller != null) {
mERadioTextScroller.stopScroll();
}
+ for (int nButton = 0; nButton < MAX_PRESETS_PER_PAGE; nButton++) {
+ if (mPresetButtons[nButton] != null) {
+ mPresetButtons[nButton].setTextColor(Color.BLACK);
+ }
+ }
}
if (mForwardButton != null) {
mForwardButton.setVisibility(((bEnable == true) ? View.VISIBLE
diff --git a/fmapp2/src/com/caf/hc_utils/FrequencyPicker.java b/fmapp2/src/com/caf/hc_utils/FrequencyPicker.java
index c88bb0a..466cc0e 100644
--- a/fmapp2/src/com/caf/hc_utils/FrequencyPicker.java
+++ b/fmapp2/src/com/caf/hc_utils/FrequencyPicker.java
@@ -32,7 +32,7 @@ import android.widget.FrameLayout;
import com.caf.fmradio.R;
import android.widget.NumberPicker;
import android.widget.NumberPicker.OnValueChangeListener;
-
+import android.graphics.Color;
/**
* A view for selecting the frequency
*
@@ -86,6 +86,7 @@ public class FrequencyPicker extends FrameLayout {
mMHzPicker = (NumberPicker) findViewById(R.id.mhz);
if (mMHzPicker != null) {
mMHzPicker.setOnLongPressUpdateInterval(100);
+ mMHzPicker.setBackgroundColor(Color.WHITE);
mMHzPicker.setOnValueChangedListener(new OnValueChangeListener() {
public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
@@ -101,6 +102,7 @@ public class FrequencyPicker extends FrameLayout {
mKHzPicker = (NumberPicker) findViewById(R.id.khz);
if (mKHzPicker != null) {
mKHzPicker.setOnLongPressUpdateInterval(100);
+ mKHzPicker.setBackgroundColor(Color.WHITE);
mKHzPicker.setOnValueChangedListener(new OnValueChangeListener() {
public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
mKhz = newVal;