TextView に背景を与えたい。この背景 (classement_background.xml) は、res/drawable にあるドローアブルです。
そのコードは次のとおりです。
<?xml version="1.0" encoding="utf-8"?>
<shape
android:shape="ring"
xmlns:android="http://schemas.android.com/apk/res/android" >
<gradient
android:startColor="#ff648add"
android:endColor="#ff3656dd"
android:type="linear"
/>
</shape>
レイアウト ファイルのレンダリング ウィンドウで、背景を設定します。(アンドロイドスタジオ)
しかし、何らかの理由で、このドローアブルは、genymotion エミュレーターにも実際のデバイスにもありません。
私はかなりのことを試してきました (drawable フォルダーの最初の要素ではないことを確認するなど) が、何が起こっているのかわかりません。何かご意見は ?
テキストビュー自体のコードは次のとおりです。
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="E2"
android:id="@+id/classement"
android:layout_below="@+id/firstname"
android:layout_centerHorizontal="true"
android:textSize="85dp"
android:layout_marginTop="15dp"
android:padding="30dp"
android:background="@drawable/classement_background"
android:textColor="@android:color/white"/>`