added progressbar to layout

This commit is contained in:
Ronald Schaten 2011-06-05 01:04:42 +02:00
parent e67f622cca
commit 3ce2889b00
3 changed files with 6 additions and 1 deletions

View File

@ -15,7 +15,6 @@
<meta-data android:name="android.appwidget.provider" <meta-data android:name="android.appwidget.provider"
android:resource="@xml/waldemar_info" /> android:resource="@xml/waldemar_info" />
</receiver> </receiver>
<!-- <activity android:name=".WaldemarConfig" android:label="Waldemar Config"> -->
<activity android:name=".WaldemarPreferences" android:label="@string/preferences"> <activity android:name=".WaldemarPreferences" android:label="@string/preferences">
<intent-filter> <intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" /> <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />

View File

@ -19,8 +19,12 @@
android:textColor="@android:color/white" android:text="@string/days" android:textColor="@android:color/white" android:text="@string/days"
android:paddingTop="0dp" android:textSize="4pt" /> android:paddingTop="0dp" android:textSize="4pt" />
<ProgressBar style="@android:style/Widget.ProgressBar.Horizontal"
android:id="@+id/progress" android:layout_width="wrap_content" android:layout_height="7dp"></ProgressBar>
<TextView android:id="@+id/debug" android:layout_width="fill_parent" <TextView android:id="@+id/debug" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:gravity="center" android:layout_height="wrap_content" android:gravity="center"
android:textColor="@android:color/white" android:text="debug" android:textColor="@android:color/white" android:text="debug"
android:textSize="4pt" /> android:textSize="4pt" />
</LinearLayout> </LinearLayout>

View File

@ -100,6 +100,8 @@ public class WaldemarWidget extends AppWidgetProvider {
SimpleDateFormat.MEDIUM, Locale.getDefault()); SimpleDateFormat.MEDIUM, Locale.getDefault());
remoteViews.setTextViewText(R.id.debug, format.format(new Date())); remoteViews.setTextViewText(R.id.debug, format.format(new Date()));
remoteViews.setProgressBar(R.id.progress, 267, 166, false);
appWidgetManager.updateAppWidget(appWidgetId, remoteViews); appWidgetManager.updateAppWidget(appWidgetId, remoteViews);
} }