xmlで特定の値の定義済み入力を入力するにはどうすればよいですか?たとえば、私は120/80になることができる血圧を入力するユーザーを入力したいので、私は入力スラッシュが既に配置されている入力フィールドに入力するユーザーにしたいと思います。お知らせ下さい。 これは、あなたがこれもテキストウォッチャーを使用する必要があり、あなたは簡単なようにそれを行うにしたい場合は、私はそれに持っている最も近いが、このAndroid定義済み入力
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="3"
android:gravity="start"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<android.support.design.widget.TextInputLayout
android:layout_weight="0.8"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/patientBloodPressure1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:imeOptions="actionNext"
android:maxLines="1"
android:textSize="14sp" />
</android.support.design.widget.TextInputLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1.45"
android:layout_gravity="center_horizontal|center_vertical"
android:gravity="center"
android:padding="2dp"
android:text="@string/slash"
android:textSize="14sp"
android:textStyle="bold" />
<android.support.design.widget.TextInputLayout
android:layout_weight="0.75"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/patientBloodPressure2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:imeOptions="actionNext"
android:maxLines="1"
android:textSize="14sp" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
私はそれを正しくしてください:スラッシュで区切られた2つの別々のフィールドに、ヒントではなくデフォルト値が入りたいとします。右? – gonczor
正確ではないが、ヒントも機能することができます。私はちょうど上記がほしいと思う、より簡単な方法があるかどうか疑問に思う。 – sammyukavi