我们可以为EditText指定一个值为0,当应用程序启动时,它应该显示提示而不是值,但应该将其分配给该EditText
//XML file
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:id="@+id/amt"
android:layout_below="@+id/amt_view"
android:inputType="number"
android:hint="Whole Amt"
android:text="0"
android:padding="10dp" /