mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Added Title to the Pic of the Day App Widget (#2758)
This commit is contained in:
parent
f7f88d52b6
commit
e14a9c17b2
2 changed files with 14 additions and 1 deletions
|
|
@ -61,6 +61,7 @@ public class PicOfDayAppWidget extends AppWidgetProvider {
|
||||||
.subscribe(
|
.subscribe(
|
||||||
response -> {
|
response -> {
|
||||||
if (response != null) {
|
if (response != null) {
|
||||||
|
views.setTextViewText(R.id.appwidget_title, response.getDisplayTitle());
|
||||||
loadImageFromUrl(response.getImageUrl(), context, views, appWidgetManager, appWidgetId);
|
loadImageFromUrl(response.getImageUrl(), context, views, appWidgetManager, appWidgetId);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,23 @@
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:text="@string/app_widget_heading"/>
|
android:text="@string/app_widget_heading"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/appwidget_title"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:textSize="12sp"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:padding="15dp"
|
android:padding="15dp"
|
||||||
android:id="@+id/appwidget_image"
|
android:id="@+id/appwidget_image"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="@string/appwidget_img" />
|
android:contentDescription="@string/appwidget_img" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue