diff options
author | Clark Scheff <clark@cyngn.com> | 2014-08-13 11:47:37 -0700 |
---|---|---|
committer | Clark Scheff <clark@cyngn.com> | 2014-08-14 01:29:14 +0000 |
commit | 5f33a11ad2882b8943e8dc843bee11c6f9052c2a (patch) | |
tree | b207746740463a86950255d8af6e46f26a33cb79 /src | |
parent | 0a5e0339b1fd85c6a58ddf5c05f06ba4af5d3b16 (diff) | |
download | packages_apps_ThemeChooser-5f33a11ad2882b8943e8dc843bee11c6f9052c2a.zip packages_apps_ThemeChooser-5f33a11ad2882b8943e8dc843bee11c6f9052c2a.tar.gz packages_apps_ThemeChooser-5f33a11ad2882b8943e8dc843bee11c6f9052c2a.tar.bz2 |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/com/cyngn/theme/chooser/ComponentSelector.java | 8 |
1 files changed, 7 insertions, 1 deletions
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)); |