mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-21 16:02:04 +02:00
Adjust widget layout to make all info fit
This commit is contained in:
@@ -133,8 +133,8 @@ public class WidgetProvider extends AppWidgetProvider {
|
|||||||
views.setTextViewTextSize(R.id.widget_delta, TypedValue.COMPLEX_UNIT_DIP, 15);
|
views.setTextViewTextSize(R.id.widget_delta, TypedValue.COMPLEX_UNIT_DIP, 15);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
views.setTextViewTextSize(R.id.widget_value, TypedValue.COMPLEX_UNIT_DIP, 14);
|
views.setTextViewTextSize(R.id.widget_value, TypedValue.COMPLEX_UNIT_DIP, 12);
|
||||||
views.setTextViewTextSize(R.id.widget_delta, TypedValue.COMPLEX_UNIT_DIP, 13);
|
views.setTextViewTextSize(R.id.widget_delta, TypedValue.COMPLEX_UNIT_DIP, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start main activity when widget is clicked
|
// Start main activity when widget is clicked
|
||||||
|
@@ -4,8 +4,6 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingBottom="8dp"
|
android:paddingBottom="8dp"
|
||||||
android:paddingEnd="0dp"
|
|
||||||
android:paddingStart="0dp"
|
|
||||||
android:paddingTop="8dp">
|
android:paddingTop="8dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -21,8 +19,7 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:maxWidth="40dp"
|
android:maxWidth="40dp"
|
||||||
android:paddingEnd="8dp"
|
android:padding="6dp" />
|
||||||
android:paddingStart="8dp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/widget_name_date_layout"
|
android:id="@+id/widget_name_date_layout"
|
||||||
@@ -41,6 +38,7 @@
|
|||||||
android:textColor="@color/widgetTextColor"
|
android:textColor="@color/widgetTextColor"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/widget_date"
|
android:id="@+id/widget_date"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -57,8 +55,7 @@
|
|||||||
android:layout_weight="2"
|
android:layout_weight="2"
|
||||||
android:minWidth="40dp"
|
android:minWidth="40dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingEnd="8dp"
|
android:padding="1dp">
|
||||||
android:paddingStart="4dp">
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/widget_icon_vertical"
|
android:id="@+id/widget_icon_vertical"
|
||||||
@@ -82,14 +79,14 @@
|
|||||||
android:gravity="right"
|
android:gravity="right"
|
||||||
android:lines="1"
|
android:lines="1"
|
||||||
android:textColor="@color/widgetTextColor" />
|
android:textColor="@color/widgetTextColor" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/indicator_view"
|
android:id="@+id/indicator_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="0.2" />
|
android:layout_weight="0.2"
|
||||||
|
android:layout_marginStart="1dp"
|
||||||
|
android:layout_marginEnd="-1px" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
Reference in New Issue
Block a user