mirror of
https://github.com/tateisu/SubwayTooter
synced 2025-01-28 01:29:23 +01:00
アカウント追加ダイアログにヒントと検証を追加
This commit is contained in:
parent
c553c59d69
commit
4f3effe3d8
@ -53,10 +53,16 @@ public class LoginForm {
|
||||
if( TextUtils.isEmpty( instance ) ){
|
||||
Utils.showToast( activity, true, R.string.instance_not_specified );
|
||||
return;
|
||||
}else if( instance.contains( "/" )){
|
||||
Utils.showToast( activity, true, R.string.instance_not_need_slash );
|
||||
return;
|
||||
}
|
||||
if( TextUtils.isEmpty( user_mail ) ){
|
||||
Utils.showToast(activity, true, R.string.mail_not_specified );
|
||||
return;
|
||||
}else if( ! user_mail.contains( "@" ) || ! user_mail.contains( "." )){
|
||||
Utils.showToast( activity, true, R.string.mail_address_not_contains_at_mark );
|
||||
return;
|
||||
}
|
||||
if( TextUtils.isEmpty( password ) ){
|
||||
Utils.showToast( activity, true, R.string.password_not_specified );
|
||||
|
@ -27,6 +27,7 @@
|
||||
android:layout_marginRight="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:inputType="textUri"
|
||||
android:hint="@string/instance_hint"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@ -50,6 +51,7 @@
|
||||
android:layout_marginRight="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:inputType="textEmailAddress"
|
||||
android:hint="@string/mail_hint"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
@ -128,4 +128,8 @@
|
||||
<string name="conversation_view">conversation view</string>
|
||||
<string name="conversation">status:%1$d</string>
|
||||
<string name="conversation_around">conversation around status:%1$d</string>
|
||||
<string name="instance_not_need_slash">please input just host name of instance, without \'/\'.</string>
|
||||
<string name="mail_address_not_contains_at_mark">please input user mail address that contains \'@\' and \'.\'</string>
|
||||
<string name="instance_hint">ex) mastodon.social</string>
|
||||
<string name="mail_hint">ex) your@e-mail.address</string>
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user