From cec32851cf1db6ba2d872d2a00e4194104cd604a Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Mon, 7 Sep 2020 19:13:50 +0300 Subject: [PATCH] Fix login/change password forms to have a consistent design. --- .../ui/setup/LoginCredentialsFragment.kt | 9 +++--- .../res/layout/change_encryption_password.xml | 1 + .../res/layout/login_credentials_fragment.xml | 30 ++++++++++++------- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/com/etesync/syncadapter/ui/setup/LoginCredentialsFragment.kt b/app/src/main/java/com/etesync/syncadapter/ui/setup/LoginCredentialsFragment.kt index 846b6f9d..c22cfa1a 100644 --- a/app/src/main/java/com/etesync/syncadapter/ui/setup/LoginCredentialsFragment.kt +++ b/app/src/main/java/com/etesync/syncadapter/ui/setup/LoginCredentialsFragment.kt @@ -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(R.id.user_name) as EditText - editUrlPassword = v.findViewById(R.id.url_password) as TextInputLayout - showAdvanced = v.findViewById(R.id.show_advanced) as CheckedTextView - customServer = v.findViewById(R.id.custom_server) as EditText + editUserName = v.findViewById(R.id.user_name) + editUrlPassword = v.findViewById(R.id.url_password) + showAdvanced = v.findViewById(R.id.show_advanced) + customServer = v.findViewById(R.id.custom_server) if (savedInstanceState == null) { val activity = activity diff --git a/app/src/main/res/layout/change_encryption_password.xml b/app/src/main/res/layout/change_encryption_password.xml index ef4e6183..d1ea0eff 100644 --- a/app/src/main/res/layout/change_encryption_password.xml +++ b/app/src/main/res/layout/change_encryption_password.xml @@ -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"> - + android:layout_marginBottom="14dp"> + + + - + android:layout_height="wrap_content"> + +