Skip to content

Commit 9b5b641

Browse files
committed
Update widget example
1 parent 823ae43 commit 9b5b641

5 files changed

Lines changed: 21 additions & 9 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:shape="rectangle">
4+
<stroke android:width="2dp" android:color="#FFFFFFFF" />
5+
<gradient android:startColor="#DD000000" android:endColor="#DD2ECCFA"
6+
android:angle="225"/>
7+
8+
<corners android:bottomRightRadius="7dp" android:bottomLeftRadius="7dp"
9+
android:topLeftRadius="7dp" android:topRightRadius="7dp"/>
10+
</shape>
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:layout_width="fill_parent" android:layout_height="fill_parent"
4-
android:background="@color/black">
5-
<TextView android:text="Static Text" android:id="@+id/TextView01"
6-
android:layout_width="fill_parent" android:layout_height="fill_parent"></TextView>
3+
android:layout_width="match_parent" android:layout_height="match_parent"
4+
android:background="@drawable/myshape" android:layout_margin="8dip">
5+
<TextView android:layout_margin="4dip" android:text="Static Text"
6+
android:id="@+id/TextView01" android:layout_width="match_parent"
7+
android:layout_height="match_parent" style="@android:style/TextAppearance.Medium"
8+
android:layout_gravity="center"></TextView>
79
</LinearLayout>
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:updatePeriodMillis="30000" android:initialLayout="@layout/widget_layout"
4-
android:minHeight="72dp" android:minWidth="300dp">
3+
android:updatePeriodMillis="180000"
4+
android:initialLayout="@layout/widget_layout"
5+
android:minHeight="72dp" android:minWidth="146dp">
56
</appwidget-provider>

‎de.vogella.android.widget.example/src/de/vogella/android/widget/example/MyWidgetProvider.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class MyWidgetProvider extends AppWidgetProvider {
1212
public void onUpdate(Context context, AppWidgetManager appWidgetManager,
1313
int[] appWidgetIds) {
1414
// Get some useful info from the web
15-
String fakeUpdate = "Updating the text...";
15+
String fakeUpdate = "Random: ";
1616
Random random = new Random();
1717
int nextInt = random.nextInt(100);
1818
fakeUpdate += String.valueOf(nextInt);

‎de.vogella.jpa.eclipselink/test/de/vogella/jpa/eclipselink/main/JpaTest.java‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ public void setUp() throws Exception {
4444
person.setFirstName("Jim_" + i);
4545
person.setLastName("Knopf_" + i);
4646
em.persist(person);
47-
// First we have to persists the job
48-
// Now persists the new person
47+
// Now persists the family person relationship
4948
family.getMembers().add(person);
5049
em.persist(person);
5150
em.persist(family);

0 commit comments

Comments
 (0)