Browse Source

Nicer layout

Thomas Chef 2 years ago
parent
commit
97fe52efea

+ 1 - 1
.idea/misc.xml

@@ -12,7 +12,7 @@
         <entry key="app/src/main/res/layout/fragment_home.xml" value="0.3098958333333333" />
         <entry key="app/src/main/res/layout/fragment_map.xml" value="0.3098958333333333" />
         <entry key="app/src/main/res/layout/fragment_settings.xml" value="0.29583333333333334" />
-        <entry key="app/src/main/res/layout/home_temp_app_widget.xml" value="0.25" />
+        <entry key="app/src/main/res/layout/home_temp_app_widget.xml" value="0.71875" />
         <entry key="app/src/main/res/layout/widget_layout.xml" value="0.1890625" />
         <entry key="app/src/main/res/menu/bottom_nav_menu.xml" value="0.25" />
       </map>

+ 1 - 1
app/src/main/java/com/flacksta/chef/journeygpstracker/UpdateWidgetService.kt

@@ -33,7 +33,7 @@ class UpdateWidgetService : Service() {
             Response.Listener<String> { response ->
                 Log.i("SERVICE", "Response is: $response")
                 for (widgetId in allWidgetIds!!) {
-                    remoteViews.setTextViewText(R.id.appwidget_text,"$response")
+                    remoteViews.setTextViewText(R.id.appwidget_text,"$response \u2103")
                     appWidgetManager.updateAppWidget(widgetId, remoteViews)
                 }
             },

+ 11 - 11
app/src/main/res/drawable/my_backgrnd_shape.xml

@@ -2,19 +2,19 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
     android:shape="rectangle" >
 
-    <stroke
-        android:width="4dp"
-        android:color="#FF88FFFF" />
+    <solid
+        android:color="#FFDDDDDD"
+        android:height="30dp"
+        />
 
-    <gradient
-        android:angle="225"
-        android:endColor="#DD2ECCFA"
-        android:startColor="#DD000000" />
+    <stroke
+        android:width="30dp"
+        android:color="#00CCAACC" />
 
     <corners
-        android:bottomLeftRadius="7dp"
-        android:bottomRightRadius="8dp"
-        android:topLeftRadius="8dp"
-        android:topRightRadius="7dp" />
+        android:bottomLeftRadius="10dp"
+        android:bottomRightRadius="10dp"
+        android:topLeftRadius="10dp"
+        android:topRightRadius="10dp" />
 
 </shape>

+ 3 - 3
app/src/main/res/layout/home_temp_app_widget.xml

@@ -2,8 +2,8 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/layout"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:layout_margin="8dip"
+    android:layout_height="90dp"
+    android:layout_margin="20dip"
     android:background="@drawable/my_backgrnd_shape">
 
     <TextView
@@ -15,7 +15,7 @@
         android:layout_margin="4dip"
         android:gravity="center_horizontal|center_vertical"
         android:text="Text"
-        android:textSize="36dp"
+        android:textSize="28dp"
         android:textStyle="bold"></TextView>
 
 </LinearLayout>

+ 2 - 2
app/src/main/res/xml/home_temp_app_widget_info.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
     android:initialLayout="@layout/home_temp_app_widget"
-    android:minWidth="144dp"
-    android:minHeight="50dp"
+    android:minWidth="130dp"
+    android:minHeight="62dp"
     android:updatePeriodMillis="1800000"