アプリに暗い背景を使用しています。edittextのテキストの色は白に設定されています。最新バージョンでは正常に動作しています。しかし、古いバージョンでは、エディットテキスト自体が白色で表示されているため、エディットテキストに入力されたテキストを表示できません。どうすればこれを処理できますか?
rounded_edit_textという名前の新しいxml
ファイルを作成し、次のように貼り付けます。res/drawable
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<solid android:color="#F9966B" />
<corners
android:bottomRightRadius="15dp"
android:bottomLeftRadius="15dp"
android:topLeftRadius="15dp"
android:topRightRadius="15dp" />
</shape>
res/layout
コピーし、過去、次のコード(のコードEditText
):
<EditText
android:id="@+id/txtdoctor"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:background="@drawable/rounded_edit_text"
android:ems="10" >
<requestFocus />
</EditText>
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加