가능합니까? 그렇게 할 EditText 속성은 무엇입니까?HINT 중력을 중심으로 EditText에서 커서를 오른쪽으로 설정
감사합니다. 당신이 글고 치기가
첫 번째 줄 오른쪽과 중앙에 힌트를 이동하는 두 번째로 커서를 이동하는 것입니다 선언 할 때
가능합니까? 그렇게 할 EditText 속성은 무엇입니까?HINT 중력을 중심으로 EditText에서 커서를 오른쪽으로 설정
감사합니다. 당신이 글고 치기가
첫 번째 줄 오른쪽과 중앙에 힌트를 이동하는 두 번째로 커서를 이동하는 것입니다 선언 할 때
당신은 당신의 XML에
android:ellipsize="end"
android:gravity="center"
를 사용할 수 있습니다. 예 :
<EditText
android:id="@+id/txt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:hint="@string/your_hint_id"
/>
이 더 나은 해결책이 될 수 있어야하고 나를 위해 일했다.
<EditText
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="1234"
android:layout_weight="1"
android:id="@+id/editText1"
android:gravity="center_horizontal"></EditText>
@Lal, 편집 해 주셔서 감사합니다. –
나를 위해 작동하지 않았습니다. 이건 내 글고 코드 : <글고 안드로이드 : ID = "@ + ID/이름" 안드로이드 : layout_width = "wrap_content는" 안드로이드 : layout_height = "wrap_content" 안드로이드 : ellipsize는 = 안드로이드 "종료"중력 = " 센터 " 안드로이드 : 힌트 ="@ 문자열/register_name_hint " 안드로이드 : 대해서는 imeOptions ="flagNoExtractUi | actionDone " 안드로이드 : textCursorDrawable ="@ 널 (null) "> 내가 함께 두 가지 옵션을 테스트하지 않았습니다 –
KinGPinG
. 첫번째와 다른 것을 사용해보십시오. 힌트를 위해 나는 android : gravity = "center"가 작동 할 것이라고 확신한다. 아마 그들은 함께 작동하지 않습니다 ... – gior91