mirror of
https://github.com/etesync/android
synced 2025-02-23 04:52:02 +00:00
Fix login/change password forms to have a consistent design.
This commit is contained in:
parent
bf050aa53b
commit
cec32851cf
@ -20,6 +20,7 @@ import androidx.fragment.app.Fragment
|
|||||||
import com.etesync.syncadapter.Constants
|
import com.etesync.syncadapter.Constants
|
||||||
import com.etesync.syncadapter.R
|
import com.etesync.syncadapter.R
|
||||||
import com.etesync.syncadapter.ui.WebViewActivity
|
import com.etesync.syncadapter.ui.WebViewActivity
|
||||||
|
import com.google.android.material.textfield.TextInputEditText
|
||||||
import com.google.android.material.textfield.TextInputLayout
|
import com.google.android.material.textfield.TextInputLayout
|
||||||
import net.cachapa.expandablelayout.ExpandableLayout
|
import net.cachapa.expandablelayout.ExpandableLayout
|
||||||
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
|
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
|
||||||
@ -36,10 +37,10 @@ class LoginCredentialsFragment : Fragment() {
|
|||||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||||
val v = inflater.inflate(R.layout.login_credentials_fragment, container, false)
|
val v = inflater.inflate(R.layout.login_credentials_fragment, container, false)
|
||||||
|
|
||||||
editUserName = v.findViewById<View>(R.id.user_name) as EditText
|
editUserName = v.findViewById<TextInputEditText>(R.id.user_name)
|
||||||
editUrlPassword = v.findViewById<View>(R.id.url_password) as TextInputLayout
|
editUrlPassword = v.findViewById<TextInputLayout>(R.id.url_password)
|
||||||
showAdvanced = v.findViewById<View>(R.id.show_advanced) as CheckedTextView
|
showAdvanced = v.findViewById<CheckedTextView>(R.id.show_advanced)
|
||||||
customServer = v.findViewById<View>(R.id.custom_server) as EditText
|
customServer = v.findViewById<TextInputEditText>(R.id.custom_server)
|
||||||
|
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
val activity = activity
|
val activity = activity
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
android:id="@+id/encryption_password"
|
android:id="@+id/encryption_password"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="14dp"
|
||||||
app:passwordToggleEnabled="true">
|
app:passwordToggleEnabled="true">
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -35,13 +35,19 @@
|
|||||||
android:text="@string/login_service_details_description"
|
android:text="@string/login_service_details_description"
|
||||||
android:layout_marginBottom="14dp"/>
|
android:layout_marginBottom="14dp"/>
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/user_name"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/login_email_address"
|
android:layout_marginBottom="14dp">
|
||||||
android:autofillHints="emailAddress"
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:inputType="textEmailAddress"/>
|
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
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/url_password"
|
android:id="@+id/url_password"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -81,12 +87,16 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/custom_server"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:hint="@string/login_custom_server"
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:inputType="textUri"/>
|
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>
|
</net.cachapa.expandablelayout.ExpandableLayout>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user