Tôi gặp sự cố với con trỏ nhập Android trong ngôn ngữ RTL. Khi tôi đang ở trong bố trí hỗ trợ RTL, tôi có hai con trỏ đầu vào và nó thực sự buồn cười. Liệu nó có giải pháp thực sự, để loại bỏ điều này?Con trỏ Android bằng ngôn ngữ RTL
tôi sử dụng mã này để làm cho Android UI RTL của tôi:
getWindow().getDecorView().setLayoutDirection(View.LAYOUT_DIRECTION_RTL);
Và đây xml của tôi cho xem văn bản:
<android.support.design.widget.TextInputLayout
android:id="@+id/input_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:id="@+id/myID"
android:maxLines="1"
android:focusableInTouchMode="true"
android:layout_weight="0.25"
android:layout_gravity="center_horizontal"
android:hint="phone Number"
android:maxLength="20"
android:gravity="center" />
</android.support.design.widget.TextInputLayout>
Tôi có thể do bạn đã đặt trọng tâm edittext thành tâm và con trỏ bị nhầm lẫn. Điều này không nên xảy ra nhưng cố gắng trái trọng lực phải sau đó có thể là vấn đề không đến. tốt hơn bạn cung cấp cho giá trị hấp dẫn bắt đầu –
@CreativeAndroid Tôi đã làm tất cả mọi thứ bạn nói và vẫn còn cùng một vấn đề. –
đăng edittext xml của bạn –