Android widget similar to Launcher icon

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:

enter image description here

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?

+7
android android-layout android-widget widget android-launcher
source share

No one has answered this question yet.

See similar questions:

55
Android creates shortcuts on the home screen

or similar:

391
Android app settings icon
274
Android - Launcher Icon Size
167
How to display the number of notifications in the application launcher icon
3
Android: how to make a widget not appear in the list of launch widgets
3
Adding a default widget to the android launcher
one
Is it possible to get a Launcher shortcut layout and use it in our own widget?
one
Android widget menu icon
0
Startup icon displayed on a square background of Android Android tablets.
0
Android custom launcher with widgets
0
setOnclilcklistener for footer images

All Articles