Now in today’s tutorial I am going to show how to place controls like buttons inside the widget and listen to their events and respond to it.
I am proceeding the same as the previous tutorials.
First I will create a new project named “ControlsInWidget” and name the activity “MyActivity.java”.
Now we will create a layout for this main activity. settings.xml
These are the contents of settings.xml
| 
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 | <TableLayoutandroid:id="@+id/TableLayout01"android:layout_width="fill_parent"android:layout_height="fill_parent"<TextViewandroid:layout_width="wrap_content"    android:layout_height="wrap_content"    android:id="@+id/tv1"    android:text="CoderzHeaven Widget Settings Activity"    android:textColor="@android:color/white"    android:textSize="15dip"    android:textStyle="bold"    android:layout_marginTop="5dip"/></TableLayout>Read the complete post from here. | 
 
 
No comments:
Post a Comment