mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-25 19:29:27 +00:00
use percentage-based inset drawable only on android 8+
for older versions it's now a fixed dp inset, which sometimes looks a little weird fixes #94
This commit is contained in:
parent
2ae736db08
commit
d33650586b
2 changed files with 15 additions and 18 deletions
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:insetTop="25%p" android:insetBottom="25%p">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="@color/key_background_lxx_base" />
|
||||||
|
<corners android:radius="5dp" />
|
||||||
|
</shape>
|
||||||
|
</inset>
|
|
@ -1,19 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
<item android:state_pressed="true">
|
android:insetTop="9.5dp" android:insetBottom="9.5dp">
|
||||||
<inset android:insetTop="25%p" android:insetBottom="25%p">
|
<shape android:shape="rectangle">
|
||||||
<shape android:shape="rectangle">
|
<solid android:color="@color/key_background_lxx_base" />
|
||||||
<solid android:color="@color/key_background_lxx_base" />
|
<corners android:radius="5dp" />
|
||||||
<corners android:radius="5dp" />
|
</shape>
|
||||||
</shape>
|
</inset>
|
||||||
</inset>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<inset android:insetTop="25%p" android:insetBottom="25%p">
|
|
||||||
<shape android:shape="rectangle">
|
|
||||||
<solid android:color="@color/key_background_lxx_base" />
|
|
||||||
<corners android:radius="5dp" />
|
|
||||||
</shape>
|
|
||||||
</inset>
|
|
||||||
</item>
|
|
||||||
</selector>
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue