It's hard for me with widgets. Reading from http://developer.android.com/guide/practices/ui_guidelines/widget_design.html#cellstable contains the following table:
- 1 cell - 40dp
- 2 cell - 110dp
- ...
- n cell - 70 Γ n - 30 dp
So my widget that wants to look like a launcher will have minHeigth and minWidth as 40dp. So far I have used the icons as a trigger, 192px, 144px, 96px, 72px and 48px.
But I canβt get the exact feeling as a means of launching icons (text style touching style ...). I can try to guess, but ... Is there somewhere source code for the launcher layout? I can not find him. See how it looks like a widget compared to other icons:

Another thing I wanted to try is to make this green icon to fill the whole cell (as a background), and then another image and text inside. I can't look so good, and I wonder if the only way to use 9patch images is here ...
So far, my widget layout code is:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <ImageView android:id="@+id/appwidget_button" android:layout_width="wrap_content" android:layout_height="0dp" android:layout_gravity="center_horizontal" android:layout_weight="1" android:src="@drawable/widget_1_background"/> <TextView android:id="@+id/appwidget_text" android:typeface="sans" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:textColor="@android:color/white" android:textSize="12sp" android:singleLine="true"/> </LinearLayout>
Suggestions?
android android-layout android-widget widget android-launcher
Ferran negre
source share