summaryrefslogtreecommitdiffstats
path: root/src/com/android/deskclock/worldclock
diff options
context:
space:
mode:
authorrachelzhang <rachelzhang@google.com>2014-08-16 18:15:11 -0700
committerrachelzhang <rachelzhang@google.com>2014-08-18 16:25:13 -0700
commit80eafdf26fc496ffa112b9eb1b44d7b80333c80a (patch)
treef3e9a3489f2c0ea88e6b9f1bae6ac78fa5090d2f /src/com/android/deskclock/worldclock
parent3a0d1abed1d8ab54343d6a760c76ee43b789b623 (diff)
downloadandroid_packages_apps_DeskClock-80eafdf26fc496ffa112b9eb1b44d7b80333c80a.tar.gz
android_packages_apps_DeskClock-80eafdf26fc496ffa112b9eb1b44d7b80333c80a.tar.bz2
android_packages_apps_DeskClock-80eafdf26fc496ffa112b9eb1b44d7b80333c80a.zip
Massive polish of clock UI
Bug: 15757778 * Change theme color from pink to green * Change world clock single row layout * Update to quantum assets / fonts * Fix few bugs Change-Id: I796decb8469b7d3c1e944f77c41b7c5af5d81a36
Diffstat (limited to 'src/com/android/deskclock/worldclock')
-rw-r--r--src/com/android/deskclock/worldclock/WorldClockAdapter.java33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/com/android/deskclock/worldclock/WorldClockAdapter.java b/src/com/android/deskclock/worldclock/WorldClockAdapter.java
index 37e7f9c22..a4d244718 100644
--- a/src/com/android/deskclock/worldclock/WorldClockAdapter.java
+++ b/src/com/android/deskclock/worldclock/WorldClockAdapter.java
@@ -211,37 +211,7 @@ public class WorldClockAdapter extends BaseAdapter {
if (view == null) {
view = mInflater.inflate(R.layout.world_clock_list_item, parent, false);
}
- // The world clock list item can hold two world clocks
- View rightClock = view.findViewById(R.id.city_right);
updateView(view.findViewById(R.id.city_left), (CityObj)mCitiesList[index]);
- if (rightClock != null) {
- // rightClock may be null (landscape phone layout has only one clock per row) so only
- // process it if it exists.
- if (index + 1 < mCitiesList.length) {
- rightClock.setVisibility(View.VISIBLE);
- updateView(rightClock, (CityObj)mCitiesList[index + 1]);
- } else {
- // To make sure the spacing is right , make sure that the right clock style is
- // selected even if the clock is invisible.
- View dclock = rightClock.findViewById(R.id.digital_clock);
- View aclock = rightClock.findViewById(R.id.analog_clock);
- if (mClockStyle.equals("analog")) {
- dclock.setVisibility(View.GONE);
- aclock.setVisibility(View.INVISIBLE);
- } else {
- dclock.setVisibility(View.INVISIBLE);
- aclock.setVisibility(View.GONE);
- }
- // If there's only the one item, center it. If there are other items in the list,
- // keep it side-aligned.
- if (getCount() == 1) {
- rightClock.setVisibility(View.GONE);
- } else {
- rightClock.setVisibility(View.INVISIBLE);
- }
- }
- }
-
return view;
}
@@ -251,17 +221,14 @@ public class WorldClockAdapter extends BaseAdapter {
TextView dayOfWeek = (TextView)(nameLayout.findViewById(R.id.city_day));
TextClock dclock = (TextClock)(clock.findViewById(R.id.digital_clock));
AnalogClock aclock = (AnalogClock)(clock.findViewById(R.id.analog_clock));
- View separator = clock.findViewById(R.id.separator);
if (mClockStyle.equals("analog")) {
dclock.setVisibility(View.GONE);
- separator.setVisibility(View.GONE);
aclock.setVisibility(View.VISIBLE);
aclock.setTimeZone(cityObj.mTimeZone);
aclock.enableSeconds(false);
} else {
dclock.setVisibility(View.VISIBLE);
- separator.setVisibility(View.VISIBLE);
aclock.setVisibility(View.GONE);
dclock.setTimeZone(cityObj.mTimeZone);
Utils.setTimeFormat(dclock,