1
0
mirror of https://github.com/etesync/android synced 2024-11-15 20:38:58 +00:00

Fix login/change password forms to have a consistent design.

This commit is contained in:
Tom Hacohen 2020-09-07 19:13:50 +03:00
parent bf050aa53b
commit cec32851cf
3 changed files with 26 additions and 14 deletions

View File

@ -20,6 +20,7 @@ import androidx.fragment.app.Fragment
import com.etesync.syncadapter.Constants
import com.etesync.syncadapter.R
import com.etesync.syncadapter.ui.WebViewActivity
import com.google.android.material.textfield.TextInputEditText
import com.google.android.material.textfield.TextInputLayout
import net.cachapa.expandablelayout.ExpandableLayout
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
@ -36,10 +37,10 @@ class LoginCredentialsFragment : Fragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
val v = inflater.inflate(R.layout.login_credentials_fragment, container, false)
editUserName = v.findViewById<View>(R.id.user_name) as EditText
editUrlPassword = v.findViewById<View>(R.id.url_password) as TextInputLayout
showAdvanced = v.findViewById<View>(R.id.show_advanced) as CheckedTextView
customServer = v.findViewById<View>(R.id.custom_server) as EditText
editUserName = v.findViewById<TextInputEditText>(R.id.user_name)
editUrlPassword = v.findViewById<TextInputLayout>(R.id.url_password)
showAdvanced = v.findViewById<CheckedTextView>(R.id.show_advanced)
customServer = v.findViewById<TextInputEditText>(R.id.custom_server)
if (savedInstanceState == null) {
val activity = activity

View File

@ -40,6 +40,7 @@
android:id="@+id/encryption_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="14dp"
app:passwordToggleEnabled="true">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"

View File

@ -35,13 +35,19 @@
android:text="@string/login_service_details_description"
android:layout_marginBottom="14dp"/>
<EditText
android:id="@+id/user_name"
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/login_email_address"
android:autofillHints="emailAddress"
android:inputType="textEmailAddress"/>
android:layout_marginBottom="14dp">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/user_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/login_email_address"
android:autofillHints="emailAddress"
android:inputType="textEmailAddress"/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/url_password"
android:layout_width="match_parent"
@ -81,12 +87,16 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/custom_server"
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/login_custom_server"
android:inputType="textUri"/>
android:layout_height="wrap_content">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/custom_server"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/login_custom_server"
android:inputType="textUri"/>
</com.google.android.material.textfield.TextInputLayout>
</net.cachapa.expandablelayout.ExpandableLayout>