Permalink
Browse files

rename "loading" to time and add place for date to go

  • Loading branch information...
1 parent fd953dd commit 2dfe193b18666390abae54f4be27b5708292e62e @gregkh committed Jun 10, 2010
View
@@ -8,14 +8,22 @@
style="@style/WidgetBackground">
<TextView
- android:id="@+id/loading"
+ android:id="@+id/time"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:includeFontPadding="false"
android:gravity="center_horizontal"
- android:text="@string/widget_loading"
+ android:text="@string/widget_time"
android:padding="4dip"
- style="@style/Text.Loading" />
-
+ style="@style/Text.Time" />
+ <TextView
+ android:id="@+id/date"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:includeFontPadding="false"
+ android:gravity="center_horizontal"
+ android:text="@string/widget_date"
+ android:padding="4dip"
+ style="@style/Text.Date"/>
</LinearLayout>
View
@@ -7,5 +7,7 @@
<string name="about">This is a tiny widget to figure out what the time is in different parts of the world.</string>
<string name="about_title">About World Clock</string>
<string name="widget_loading">loading...</string>
+ <string name="widget_date">date</string>
+ <string name="widget_time">time</string>
</resources>
View
@@ -9,7 +9,12 @@
<style name="Text">
</style>
- <style name="Text.Loading">
+ <style name="Text.Time">
+ <item name="android:textSize">10sp</item>
+ <item name="android:textColor">@color/white</item>
+ </style>
+
+ <style name="Text.Date">
<item name="android:textSize">10sp</item>
<item name="android:textColor">@color/white</item>
</style>
@@ -37,7 +37,7 @@ public static RemoteViews buildUpdate(Context context) {
// Tie clicking on the button to bring up our configure screen
Intent intent = new Intent(context, Configure.class);
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);
- views.setOnClickPendingIntent(R.id.loading, pendingIntent);
+ views.setOnClickPendingIntent(R.id.widget, pendingIntent);
return views;
}
@@ -36,7 +36,7 @@ public void onStart(Intent intent, int startId) {
Date date = new Date();
DateFormat format = SimpleDateFormat.getTimeInstance(SimpleDateFormat.MEDIUM, Locale.getDefault());
- updateViews.setTextViewText(R.id.loading, format.format(date));
+ updateViews.setTextViewText(R.id.time, format.format(date));
ComponentName thisWidget = new ComponentName(this, MedAppWidget.class);
AppWidgetManager manager = AppWidgetManager.getInstance(this);
@@ -65,7 +65,7 @@ public void run() {
Date date = new Date();
DateFormat format = SimpleDateFormat.getTimeInstance(SimpleDateFormat.MEDIUM, Locale.getDefault());
- updateViews.setTextViewText(R.id.loading, format.format(date));
+ updateViews.setTextViewText(R.id.time, format.format(date));
ComponentName thisWidget = new ComponentName(this, MedAppWidget.class);

0 comments on commit 2dfe193

Please sign in to comment.