summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaj Yengisetty <rajesh@cyngn.com>2015-03-10 19:47:08 (GMT)
committerRaj Yengisetty <rajesh@cyngn.com>2015-03-10 19:47:08 (GMT)
commite08c5f0bf8335f3536f345a96951286d73c4dd44 (patch)
tree1b12c8dca88131a5ee95f0180e3f937a0274089c
parent861d111c8bd4efa55b676452e5a04feedc276527 (diff)
downloadandroid_packages_apps_Trebuchet-e08c5f0bf8335f3536f345a96951286d73c4dd44.zip
android_packages_apps_Trebuchet-e08c5f0bf8335f3536f345a96951286d73c4dd44.tar.gz
android_packages_apps_Trebuchet-e08c5f0bf8335f3536f345a96951286d73c4dd44.tar.bz2
App Drawer: respect drawer show/hide icon lables
Change-Id: Id1d2b152dde3d1e3d89fca2e9e16bc2472f661bc
-rw-r--r--src/com/android/launcher3/AppDrawerListAdapter.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/launcher3/AppDrawerListAdapter.java b/src/com/android/launcher3/AppDrawerListAdapter.java
index 634ef3b..a169373 100644
--- a/src/com/android/launcher3/AppDrawerListAdapter.java
+++ b/src/com/android/launcher3/AppDrawerListAdapter.java
@@ -30,6 +30,7 @@ import android.widget.LinearLayout;
import android.widget.SectionIndexer;
import com.android.launcher3.locale.LocaleSetManager;
import com.android.launcher3.locale.LocaleUtils;
+import com.android.launcher3.settings.SettingsProvider;
import java.text.Collator;
import java.util.ArrayList;
@@ -58,6 +59,8 @@ public class AppDrawerListAdapter extends RecyclerView.Adapter<AppDrawerListAdap
private ArrayList<ComponentName> mProtectedApps;
+ private boolean mHideIconLabels;
+
public enum DrawerType {
Drawer(0),
Pager(1);
@@ -111,6 +114,10 @@ public class AppDrawerListAdapter extends RecyclerView.Adapter<AppDrawerListAdap
LinearLayout.LayoutParams(width, ViewGroup.LayoutParams.WRAP_CONTENT);
mIconRect = new Rect(0, 0, mDeviceProfile.allAppsIconSizePx,
mDeviceProfile.allAppsIconSizePx);
+
+ mHideIconLabels = SettingsProvider.getBoolean(mLauncher,
+ SettingsProvider.SETTINGS_UI_DRAWER_HIDE_ICON_LABELS,
+ R.bool.preferences_interface_drawer_hide_icon_labels_default);
}
/**
@@ -387,6 +394,7 @@ public class AppDrawerListAdapter extends RecyclerView.Adapter<AppDrawerListAdap
d.setBounds(mIconRect);
icon.mIcon.setImageDrawable(d);
icon.mLabel.setText(info.title);
+ icon.mLabel.setVisibility(mHideIconLabels ? View.INVISIBLE : View.VISIBLE);
}
}
holder.itemView.setTag(indexedInfo);