summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormariagpuyol <mariagpuyol@google.com>2016-03-25 16:15:50 -0700
committermariagpuyol <mariagpuyol@google.com>2016-03-25 16:19:44 -0700
commit954679b1b42695d0d101c1e5001ad9b6d561287d (patch)
treed930129098bc3e2d60f415511d841e6c1406aac3 /src
parentdcccd67a72288f3f663678d981bde30b3e8bdecb (diff)
downloadandroid_packages_apps_EmergencyInfo-954679b1b42695d0d101c1e5001ad9b6d561287d.tar.gz
android_packages_apps_EmergencyInfo-954679b1b42695d0d101c1e5001ad9b6d561287d.tar.bz2
android_packages_apps_EmergencyInfo-954679b1b42695d0d101c1e5001ad9b6d561287d.zip
Small UI changes from UX feedback
These include: -Make date of birth have 70% opactity -Change tab color to teal Bug:27533454 Change-Id: I4ba21783770923d499c577dbc1e62f406fde1cd1
Diffstat (limited to 'src')
-rw-r--r--src/com/android/emergency/view/ViewInfoActivity.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/com/android/emergency/view/ViewInfoActivity.java b/src/com/android/emergency/view/ViewInfoActivity.java
index 2f34c9d..de06be8 100644
--- a/src/com/android/emergency/view/ViewInfoActivity.java
+++ b/src/com/android/emergency/view/ViewInfoActivity.java
@@ -21,7 +21,10 @@ import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.design.widget.TabLayout;
+import android.text.Spannable;
+import android.text.SpannableString;
import android.text.TextUtils;
+import android.text.style.ForegroundColorSpan;
import android.util.Pair;
import android.view.Menu;
import android.view.MenuInflater;
@@ -91,17 +94,21 @@ public class ViewInfoActivity extends EmergencyTabActivity {
if (!dateOfBirthNotSet) {
mPersonalCardSmallItem.setVisibility(View.VISIBLE);
int age = computeAge(dateOfBirthTimeMillis);
- String localizedDob = mDateFormat.format(new Date(dateOfBirthTimeMillis));
+ String localizedDob = String.format(getString(R.string.dob),
+ mDateFormat.format(new Date(dateOfBirthTimeMillis)));
+ Spannable spannableDob = new SpannableString(localizedDob);
+ spannableDob.setSpan(new ForegroundColorSpan(
+ getResources().getColor(R.color.white_with_alpha)), 0,
+ localizedDob.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
if (nameEmpty) {
// Display date of birth info in two lines: age and then date of birth
- mPersonalCardLargeItem.setText(String.format(getString(R.string.age),
- age));
- mPersonalCardSmallItem.setText(localizedDob);
+ mPersonalCardLargeItem.setText(String.format(getString(R.string.age), age));
+ mPersonalCardSmallItem.setText(spannableDob);
} else {
mPersonalCardLargeItem.setText(name);
- mPersonalCardSmallItem.setText(String.format(getString(R.string.dob_and_age),
- age,
- localizedDob));
+ mPersonalCardSmallItem.setText(String.format(getString(R.string.age), age));
+ mPersonalCardSmallItem.append(" ");
+ mPersonalCardSmallItem.append(spannableDob);
}
} else {
mPersonalCardSmallItem.setVisibility(View.GONE);