-1
我希望两个不同的文本应出现在单个EditText中。如何在单个EditText中显示两个文本
我试过这样
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:textSize="25dp"
android:editable="false"
android:textColor="@color/white"
android:text="+91"
android:layout_marginTop="20dp"
android:theme="@style/Regestration_edit_text"
android:id="@+id/rhs_country_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<EditText
android:textColorHint="@color/white"
android:textSize="25dp"
android:hint="Mobile Number"
android:layout_marginTop="20dp"
android:theme="@style/Regestration_edit_text"
android:id="@+id/rhs_mobile_number"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
谁能帮助我在这?
可以Concat的两个字符串,并显示它。 –
'editText.setText(“+ 91”+ mobileNumber);' –
谢谢@MuhammadBabar –