gpt4 book ai didi

android - 交替编辑文本提示对阿拉伯语不可见

转载 作者:行者123 更新时间:2023-11-30 03:24:00 25 4
gpt4 key购买 nike

这有点奇怪,在我有 6 个编辑文本字段的页面中,只有替代编辑文本显示提示,而其余的则没有。这仅发生在 Android 4.0 及更高版本中。我找不到任何理由。任何建议都会有所帮助。

代码如下:

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE); // Removes title bar
setContentView(R.layout.register);

mLang = mPreference.getString("lang", "");

bBlood = (EditText) findViewById(R.id.editText8);
bDOB = (EditText) findViewById(R.id.editText5);
bAdd = (EditText) findViewById(R.id.editText6);
bPhone = (EditText) findViewById(R.id.editText7);
mProfile = (TextView) findViewById(R.id.textView1);


if(mLang.equalsIgnoreCase("English")){
}
else{
mProfile.setText(R.string.sign_up_arabic);
bName.setHint(R.string.name_arabic);
bDOB.setHint(R.string.name_arabic);
bAdd.setHint(R.string.address_arabic);
bPhone.setHint(R.string.name_arabic);
bBlood.setHint(R.string.blood_arabic);
mSignUp.setText(R.string.sign_arabic);
}

这是上面代码的布局:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#D5D2D2"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
tools:context=".MainActivity" >

<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:text="@string/sign_up"
android:textSize="20sp" />

<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/textView1" >

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<LinearLayout
android:id="@+id/l1border"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="@+id/textView1"
android:background="#000000" >
</LinearLayout>

<LinearLayout
android:id="@+id/lin1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/l1border"
android:layout_marginTop="10dp" >

<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10"
android:hint="@string/name" >
</EditText>
</LinearLayout>

<LinearLayout
android:id="@+id/lin5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/lin1"
android:layout_marginTop="10dp" >

<EditText
android:id="@+id/editText5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ems="10"
android:hint="@string/age"
android:inputType="number" />
</LinearLayout>

<LinearLayout
android:id="@+id/lin6"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/lin5"
android:layout_marginTop="10dp" >

<EditText
android:id="@+id/editText6"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ems="10"
android:hint="@string/address" />
</LinearLayout>

<LinearLayout
android:id="@+id/lin7"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/lin6"
android:layout_marginTop="10dp" >

<EditText
android:id="@+id/editText7"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ems="10"
android:hint="@string/phone"
android:inputType="numberDecimal" />
</LinearLayout>

<LinearLayout
android:id="@+id/lin8"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/lin7"
android:layout_marginTop="10dp" >

<EditText
android:id="@+id/editText8"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ems="10"
android:hint="@string/blood" />
</LinearLayout>

<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/lin8"
android:layout_below="@+id/lin8"
android:layout_marginTop="10dp"
android:text="@string/sign" />
</RelativeLayout>
</ScrollView>

</RelativeLayout>

屏幕截图看起来像这样:

Arabic

最佳答案

我看到这两个没有显示提示的 EditText 是 inputType 设置为“number”和“numberDecimal”。所以请检查一次删除输入类型。,这可能会产生问题。

关于android - 交替编辑文本提示对阿拉伯语不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18572800/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com