diff options
author | nebkat <nebkat@teamhacksung.org> | 2012-12-23 14:25:45 +0000 |
---|---|---|
committer | nebkat <nebkat@teamhacksung.org> | 2012-12-24 10:04:49 +0000 |
commit | fff81cad6963dfa977fa8063efa3d29797d9d8c2 (patch) | |
tree | e43abf973d2bdbccf2778df871a554464f5aabc2 /src/com/cyanogenmod/trebuchet/PagedViewWidget.java | |
parent | 10a908a32cab20d5fc0ee944a3b34b98a9648f68 (diff) | |
download | packages_apps_trebuchet-fff81cad6963dfa977fa8063efa3d29797d9d8c2.zip packages_apps_trebuchet-fff81cad6963dfa977fa8063efa3d29797d9d8c2.tar.gz packages_apps_trebuchet-fff81cad6963dfa977fa8063efa3d29797d9d8c2.tar.bz2 |
Launcher actions
Change-Id: Ica0699f99d68b9f89d6f103eaadc56e632d87101
Diffstat (limited to 'src/com/cyanogenmod/trebuchet/PagedViewWidget.java')
-rw-r--r-- | src/com/cyanogenmod/trebuchet/PagedViewWidget.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/cyanogenmod/trebuchet/PagedViewWidget.java b/src/com/cyanogenmod/trebuchet/PagedViewWidget.java index 5f2b800..b821b6f 100644 --- a/src/com/cyanogenmod/trebuchet/PagedViewWidget.java +++ b/src/com/cyanogenmod/trebuchet/PagedViewWidget.java @@ -127,6 +127,18 @@ public class PagedViewWidget extends LinearLayout { } } + public void applyFromLauncherActionInfo(LauncherActionInfo info) { + mIsAppWidget = false; + final ImageView image = (ImageView) findViewById(R.id.widget_preview); + image.setContentDescription(getContext().getResources().getString(info.action.getString())); + final TextView name = (TextView) findViewById(R.id.widget_name); + name.setText(info.title); + final TextView dims = (TextView) findViewById(R.id.widget_dims); + if (dims != null) { + dims.setText(String.format(mDimensionsFormatString, 1, 1)); + } + } + public int[] getPreviewSize() { final ImageView i = (ImageView) findViewById(R.id.widget_preview); int[] maxSize = new int[2]; |