Fix vectors for drawableStart in API 17

This commit is contained in:
Mikel 2017-08-07 20:44:35 +01:00
parent 04ff70fa5b
commit 7754c7c7c4
5 changed files with 94 additions and 21 deletions

View file

@ -1,20 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
<fr.free.nrw.commons.ui.widget.CompatTextView
android:id="@+id/mediaDetailCategoryItemText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/subBackground"
android:foreground="?attr/selectableItemBackground"
android:gravity="center_vertical"
android:minHeight="48dp"
android:padding="12dp"
android:gravity="center_vertical"
android:id="@+id/mediaDetailCategoryItemText"
android:textSize="14sp"
android:textColor="@android:color/white"
android:background="?attr/subBackground"
android:textSize="14sp"
app:drawablePadding="6dp"
app:drawableStart="@drawable/ic_info_outline_white_24dp"
/>
<fr.free.nrw.commons.media.MediaDetailSpacer

View file

@ -132,21 +132,20 @@
android:textSize="16sp"
android:textStyle="bold" />
<TextView
<fr.free.nrw.commons.ui.widget.CompatTextView
android:id="@+id/mediaDetailLicense"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:background="?attr/subBackground"
android:foreground="?attr/selectableItemBackground"
android:drawableLeft="@drawable/ic_info_outline_white_24dp"
android:drawablePadding="6dp"
android:drawableStart="@drawable/ic_info_outline_white_24dp"
android:gravity="center_vertical"
android:padding="12dp"
android:text="@string/media_detail_license"
android:textColor="@android:color/white"
android:textSize="14sp"
app:drawablePadding="6dp"
app:drawableStart="@drawable/ic_info_outline_white_24dp"
tools:text="License link" />
</LinearLayout>
@ -166,21 +165,20 @@
android:textSize="16sp"
android:textStyle="bold" />
<TextView
<fr.free.nrw.commons.ui.widget.CompatTextView
android:id="@+id/mediaDetailCoordinates"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:background="?attr/subBackground"
android:drawableLeft="@drawable/ic_map_white_24dp"
android:drawablePadding="6dp"
android:drawableStart="@drawable/ic_map_white_24dp"
android:foreground="?attr/selectableItemBackground"
android:gravity="center_vertical"
android:padding="12dp"
android:text="@string/media_detail_coordinates"
android:textColor="@android:color/white"
android:textSize="14sp"
app:drawablePadding="6dp"
app:drawableStart="@drawable/ic_map_white_24dp"
tools:text="Coordinates link" />
</LinearLayout>

View file

@ -13,4 +13,12 @@
<attr name="iconCamera" format="reference"/>
<attr name="iconPhoto" format="reference"/>
<attr name="iconUndo" format="reference"/>
<declare-styleable name="CompatTextView">
<attr name="drawablePadding" format="dimension"/>
<attr name="drawableStart" format="reference"/>
<attr name="drawableTop" format="reference"/>
<attr name="drawableEnd" format="reference"/>
<attr name="drawableBottom" format="reference"/>
</declare-styleable>
</resources>