Load default value in text field in android? -


i have text field user enters numeric value converted inches feet.

<edittext     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:id="@+id/text1"     android:layout_below="@+id/textview"     android:layout_alignstart="@+id/textview"     android:inputtype="numberdecimal"     android:ems="10"     android:layout_alignparentend="true" /> 

is there way load default 0 in value here or in java section if radio button clicked empty string not load error?

for 1st part of question can use following code in edit text xml:

android:text="0" 

Comments