Changes content warning show more/less button to use a drawable with built-in shadow for compatibility with API levels below 21.

main
Vavassor 7 years ago
parent bc15722070
commit d3e7126ff0
  1. BIN
      app/src/main/res/drawable/toggle_small.9.png
  2. 6
      app/src/main/res/drawable/toggle_small.xml
  3. BIN
      app/src/main/res/drawable/toggle_small_light.9.png
  4. 6
      app/src/main/res/drawable/toggle_small_light.xml
  5. 27
      app/src/main/res/layout/item_status.xml

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 B

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/color_background_dark" />
<corners android:radius="3dp" />
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#ffefefef" />
<corners android:radius="2dp" />
</shape>

@ -119,35 +119,34 @@
</RelativeLayout> </RelativeLayout>
<com.keylesspalace.tusky.view.FlowLayout <com.keylesspalace.tusky.view.FlowLayout
android:id="@+id/status_content_warning_bar"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/status_content_warning_bar"
android:visibility="gone"
android:layout_toRightOf="@+id/status_avatar"
android:layout_toEndOf="@+id/status_avatar"
android:layout_below="@+id/status_name_bar" android:layout_below="@+id/status_name_bar"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
app:paddingHorizontal="4dp" android:layout_toEndOf="@+id/status_avatar"
android:focusable="true"> android:layout_toRightOf="@+id/status_avatar"
android:focusable="true"
android:visibility="gone"
app:paddingHorizontal="4dp">
<TextView <TextView
android:id="@+id/status_content_warning_description"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/status_content_warning_description"
android:textColor="?android:textColorPrimary" /> android:textColor="?android:textColorPrimary" />
<ToggleButton <ToggleButton
android:id="@+id/status_content_warning_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minWidth="0dp" android:background="?attr/content_warning_button"
android:minHeight="0dp" android:minHeight="0dp"
android:id="@+id/status_content_warning_button" android:minWidth="0dp"
android:textOn="@string/status_content_warning_show_less"
android:textOff="@string/status_content_warning_show_more"
android:padding="3dp"
android:textSize="12sp"
android:textAllCaps="true" android:textAllCaps="true"
android:background="?attr/content_warning_button" /> android:textOff="@string/status_content_warning_show_more"
android:textOn="@string/status_content_warning_show_less"
android:textSize="12sp" />
</com.keylesspalace.tusky.view.FlowLayout> </com.keylesspalace.tusky.view.FlowLayout>

Loading…
Cancel
Save