Ben android stüdyosunda sormak istiyorum Benim EditText for Telefon numarası 0 ile başlayamıyor otomatik olarak "0" kaldırmak ve diğer numaraları ile başlayın.neden edittext "0" android stüdyosu ile başlayamıyor?
Örnek için: i yazın: herhangi bir sorun ile çalışır 123123, ama i yazarken: 08512359 otomatik olarak "0" kaldırmak ve diğer numaralar (8512359) ile ileriye gidin.
Sorum, 0 ile çalışmasını nasıl yapacağım sorusudur. EditText'in özelliklerinde herhangi bir seçenek var mı, yok mu?
biçim phonenumbers için
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:weightSum="10">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Name"
android:id="@+id/textView"
android:layout_weight="3" />
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/nameEditText"
android:layout_weight="7" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:weightSum="10">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Phone number"
android:id="@+id/textView2"
android:layout_weight="5" />
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:inputType="phone"
android:ems="10"
android:id="@+id/numberEditText"
android:layout_weight="5"
android:editable="false"
android:maxLength="11"
android:phoneNumber="false" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:weightSum="10">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="City"
android:id="@+id/textView3"
android:layout_weight="3" />
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/cityEditText"
android:layout_weight="7" />
</LinearLayout>
<RadioGroup
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="2"
android:weightSum="10"
android:id="@+id/sexRadioGroup">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Sex:"
android:id="@+id/textView4"
android:layout_weight="2" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="M"
android:id="@+id/maleRadioButton"
android:layout_weight="3"
android:checked="false" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="F"
android:id="@+id/femaleRadioButton"
android:layout_weight="3"
android:checked="false" />
</RadioGroup>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:weightSum="10">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Save"
android:id="@+id/okButton"
android:layout_weight="5" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Cancel"
android:id="@+id/cancelButton"
android:layout_weight="5" />
</LinearLayout>
XML – SANAT
** Yabani tahminim ** ekle Lütfen bir 'sayı' için. –
nasıl dönüştürmeliyim? – LuXuS