summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2012-11-06 21:08:31 -0800
committerMichael Jurka <mikejurka@google.com>2012-11-07 00:00:11 -0800
commita487bca4700a9dbd5d5d72913d0265ae86815edf (patch)
treef4dc5740e9a4438b495e67689b97104cb6bb8dd2 /src/com
parentc0fb8a399be0b3e4b365682c681ff24264bbef14 (diff)
downloadpackages_apps_settings-a487bca4700a9dbd5d5d72913d0265ae86815edf.zip
packages_apps_settings-a487bca4700a9dbd5d5d72913d0265ae86815edf.tar.gz
packages_apps_settings-a487bca4700a9dbd5d5d72913d0265ae86815edf.tar.bz2
Updated layouts for keyguard widget picker
Bug: 7381803 Change-Id: I9a6a8fe3216002b486e7b6ddf7544d9fc4e73de8
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/settings/KeyguardAppWidgetPickActivity.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/settings/KeyguardAppWidgetPickActivity.java b/src/com/android/settings/KeyguardAppWidgetPickActivity.java
index 878176d..5b29720 100644
--- a/src/com/android/settings/KeyguardAppWidgetPickActivity.java
+++ b/src/com/android/settings/KeyguardAppWidgetPickActivity.java
@@ -89,7 +89,7 @@ public class KeyguardAppWidgetPickActivity extends Activity
@Override
protected void onCreate(Bundle savedInstanceState) {
- setContentView(R.layout.keyguard_appwidget_pick_layout);
+ setContentView(R.layout.keyguard_appwidget_picker_layout);
super.onCreate(savedInstanceState);
// Set default return data
@@ -106,6 +106,14 @@ public class KeyguardAppWidgetPickActivity extends Activity
mExtraConfigureOptions = intent.getBundleExtra(AppWidgetManager.EXTRA_APPWIDGET_OPTIONS);
mGridView = (GridView) findViewById(R.id.widget_list);
+ DisplayMetrics dm = new DisplayMetrics();
+ getWindowManager().getDefaultDisplay().getMetrics(dm);
+ int maxGridWidth = getResources().getDimensionPixelSize(
+ R.dimen.keyguard_appwidget_picker_max_width);
+
+ if (maxGridWidth < dm.widthPixels) {
+ mGridView.getLayoutParams().width = maxGridWidth;
+ }
mAppWidgetManager = AppWidgetManager.getInstance(this);
mAppWidgetLoader = new AppWidgetLoader<Item>(this, mAppWidgetManager, this);
mItems = mAppWidgetLoader.getItems(getIntent());