fix(rings): make widget rings fill available space + higher render res
Build APK / build (pull_request) Successful in 1m42s
Build APK / build (pull_request) Successful in 1m42s
Rings were capped at a fixed 86dp; now each gauge fills its half of the widget (weighted ImageView) so they grow with the placed widget size. Bumped RingRenderer default bitmap to 360px/36 stroke to stay crisp at the larger display size.
This commit is contained in:
@@ -65,7 +65,8 @@
|
||||
android:layout_marginBottom="6dp"
|
||||
android:background="#2A2A2A" />
|
||||
|
||||
<!-- Two ring gauges side by side -->
|
||||
<!-- Two ring gauges side by side — each fills its half so the ring grows as large as the
|
||||
placed widget allows (limited by the available height), instead of a fixed 86dp. -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
@@ -76,24 +77,25 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ring_session"
|
||||
android:layout_width="86dp"
|
||||
android:layout_height="86dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="fitCenter"
|
||||
android:adjustViewBounds="false"
|
||||
android:contentDescription="Session usage ring" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_session_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="center"
|
||||
android:text=""
|
||||
android:textColor="#999999"
|
||||
@@ -104,24 +106,25 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ring_weekly"
|
||||
android:layout_width="86dp"
|
||||
android:layout_height="86dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="fitCenter"
|
||||
android:adjustViewBounds="false"
|
||||
android:contentDescription="Weekly usage ring" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_weekly_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="center"
|
||||
android:text=""
|
||||
android:textColor="#999999"
|
||||
|
||||
Reference in New Issue
Block a user