From 5f33a11ad2882b8943e8dc843bee11c6f9052c2a Mon Sep 17 00:00:00 2001 From: Clark Scheff Date: Wed, 13 Aug 2014 11:47:37 -0700 Subject: Indicate default component by showing "Default" in bold If a component is from the "default" theme then the text will be displayed as "DEFAULT" rather than the name of the theme. The text style should also be made bold per UX. Change-Id: I44d8049d561664106f50d62ea6e726bc67744fe5 --- src/com/cyngn/theme/chooser/ComponentSelector.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/com/cyngn/theme/chooser/ComponentSelector.java b/src/com/cyngn/theme/chooser/ComponentSelector.java index ecd9785..f8ef136 100644 --- a/src/com/cyngn/theme/chooser/ComponentSelector.java +++ b/src/com/cyngn/theme/chooser/ComponentSelector.java @@ -5,6 +5,7 @@ package com.cyngn.theme.chooser; import android.content.Context; import android.content.pm.PackageManager; +import android.content.pm.ThemeUtils; import android.content.res.Resources; import android.content.res.TypedArray; import android.database.Cursor; @@ -740,7 +741,12 @@ public class ComponentSelector extends LinearLayout private void setTitle(TextView titleView, Cursor cursor) { String pkgName = cursor.getString(cursor.getColumnIndex(ThemesColumns.PKG_NAME)); - titleView.setText(cursor.getString(cursor.getColumnIndex(ThemesColumns.TITLE))); + if (ThemeUtils.getDefaultThemePackageName(mContext).equals(pkgName)) { + titleView.setText(mContext.getString(R.string.default_tag_text)); + titleView.setTypeface(null, Typeface.BOLD); + } else { + titleView.setText(cursor.getString(cursor.getColumnIndex(ThemesColumns.TITLE))); + } if (pkgName.equals(mAppliedComponentPkgName)) { titleView.setTextColor(getResources().getColor( R.color.component_selection_current_text_color)); -- cgit v1.1