[Sound Panel] Set inset for button background

add inset for button of Sound panel, to prevent truncated when set
Display/Font size to biggest.
attached screenshots in bug.

Test: Verified on device
Bug: 252952472
Change-Id: I407d4d6cdac47cfcc63470aa8b5d4e5817e1705b
This commit is contained in:
shaoweishen
2022-10-26 07:28:36 +00:00
parent 02cf722b24
commit c860f87861
3 changed files with 35 additions and 29 deletions

View File

@@ -14,18 +14,21 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
<shape xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
android:shape="rectangle"> android:insetTop="6dp"
<stroke android:insetBottom="6dp">
android:color="?androidprv:attr/colorAccentPrimaryVariant" <shape
android:width="1dp"/> android:shape="rectangle">
<corners android:radius="24dp"/> <stroke
<padding android:color="?androidprv:attr/colorAccentPrimaryVariant"
android:left="16dp" android:width="1dp"/>
android:right="16dp" <corners android:radius="24dp"/>
android:top="8dp" <padding
android:bottom="8dp" /> android:left="16dp"
<solid android:color="@android:color/transparent" /> android:right="16dp"
</shape> android:top="8dp"
android:bottom="8dp" />
<solid android:color="@android:color/transparent" />
</shape>
</inset>

View File

@@ -15,17 +15,20 @@
limitations under the License. limitations under the License.
--> -->
<shape xmlns:android="http://schemas.android.com/apk/res/android" <inset xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
android:shape="rectangle"> android:insetTop="6dp"
<stroke android:insetBottom="6dp">
android:color="@android:color/transparent" <shape android:shape="rectangle">
android:width="1dp"/> <stroke
<corners android:radius="20dp"/> android:color="@android:color/transparent"
<padding android:width="1dp"/>
android:left="16dp" <corners android:radius="20dp"/>
android:right="16dp" <padding
android:top="8dp" android:left="16dp"
android:bottom="8dp" /> android:right="16dp"
<solid android:color="?androidprv:attr/colorAccentPrimary" /> android:top="8dp"
</shape> android:bottom="8dp" />
<solid android:color="?androidprv:attr/colorAccentPrimary" />
</shape>
</inset>

View File

@@ -117,7 +117,7 @@
android:id="@+id/see_more" android:id="@+id/see_more"
style="@style/PanelOptionRoundedOutlinedButton" style="@style/PanelOptionRoundedOutlinedButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="36dp" android:layout_height="wrap_content"
android:minWidth="0dp" android:minWidth="0dp"
android:text="@string/settings_button"/> android:text="@string/settings_button"/>
@@ -130,7 +130,7 @@
android:id="@+id/done" android:id="@+id/done"
style="@style/PanelOptionRoundedSolidButton" style="@style/PanelOptionRoundedSolidButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="36dp" android:layout_height="wrap_content"
android:minWidth="0dp" android:minWidth="0dp"
android:text="@string/done"/> android:text="@string/done"/>
</LinearLayout> </LinearLayout>