0
Я хочу показать TextView над кнопкой, но в API 21, Button выше TextView.TextView не отображается над кнопкой больше, чем API 21
Я стараюсь android:elevation
но сделать тень для TextView, это не хорошо.
Я стараюсь android:translationZ="100dip"
но, не работает.
мои XML коды:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:layout_margin="10dp">
<Button
android:id="@+id/custom_listview_food"
android:text="@string/main_matrial1"
android:layout_width="fill_parent"
android:layout_height="60dp"
android:padding="10dp"
android:gravity="center_horizontal"
android:textSize="16sp"
android:background="@color/listview_matrial"
android:layout_marginBottom="5dp"
/>
<TextView
android:id="@+id/custom_listview_material1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="material 1"
android:textColor="@color/white"
android:textSize="20sp"
android:layout_alignRight="@id/custom_listview_food"
android:layout_marginTop="50dp"
android:layout_marginRight="10dp"
/>
</RelativeLayout>
спасибо, но с этим кодом, просто они изменили их position.I хотят кнопка идет под TextView. см. изображение – Arash