私はユーザー名とパスワードのフィールドを持つログインウィンドウを作成しています。それぞれのアイコンを入れたいと思います。 EditTextフィールドにアイコンを追加すると、アイコンのサイズを変更できません。EditText内のアイコンのサイズを変更することは可能ですか?
EditTextの背景にフォーカスがあるときに背景を変更したいので、アイコンはEditTextフィールドの内側にあります。
LinearLayout内にアイコンとEditTextビューを配置しようとしましたが、EditTextがフォーカスされているときにレイアウトの背景を変更できませんでした。
私のEditTextコード:視覚的
<EditText
android:id="@+id/user_name_edit_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="35dp"
android:layout_marginRight="35dp"
android:layout_marginTop="35dp"
android:background="@drawable/custom_border_selector"
android:drawablePadding="5dp"
android:hint="@string/username"
android:singleLine="true"
android:textColor="#757575"
android:textSize="15sp"
android:drawableLeft="@drawable/ic_person_grey_24dp"
/>
のEditText:
このリンクをチェックします。http://stackoverflow.com/questions/20250638/how-to-create-edittext-hint-as-text-with-image-in-android – Mrunal
@ Rohit5k2それは愚かな音が鳴りますしかし、私はそれを考えなかった。ありがとう。もう1つ質問がありますが、イメージの余白や余白を追加する方法が見つかりませんでしたか?私はそれをGoogleにしようと、数時間と有用な情報はありません。 – JonasSeputis
@JonasSeputis:確認してください。 – Rohit5k2