Loading app/src/main/java/at/bitfire/davdroid/ui/setup/AccountDetailsFragment.kt +4 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,10 @@ class AccountDetailsFragment : Fragment() { if (requireActivity().intent.getStringExtra(LoginActivity.SETUP_ACCOUNT_PROVIDER_TYPE) == LoginActivity.ACCOUNT_PROVIDER_EELO || requireActivity().intent.getStringExtra(LoginActivity.SETUP_ACCOUNT_PROVIDER_TYPE) == LoginActivity.ACCOUNT_PROVIDER_GOOGLE) { v.mainDetailLayout.visibility = View.GONE v.mainLoadingLayout.visibility = View.VISIBLE val name = model.name.value if (name.isNullOrBlank()) model.nameError.value = getString(R.string.login_account_name_required) Loading app/src/main/res/layout/login_account_details.xml +105 −88 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"> <data> <import type="android.view.View" /> <variable name="details" type="at.bitfire.davdroid.ui.setup.AccountDetailsFragment.AccountDetailsModel" /> </data> <LinearLayout android:orientation="vertical" <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:id="@+id/main_detail_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <ScrollView android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:layout_margin="@dimen/activity_margin"> android:layout_margin="@dimen/activity_margin" android:layout_weight="1"> <LinearLayout android:layout_width="match_parent" Loading @@ -27,52 +34,52 @@ android:orientation="vertical"> <TextView style="@style/TextAppearance.MaterialComponents.Headline5" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/TextAppearance.MaterialComponents.Headline5" android:text="@string/login_create_account" android:layout_marginBottom="14dp"/> android:layout_marginBottom="14dp" android:text="@string/login_create_account" /> <com.google.android.material.textfield.TextInputLayout style="@style/edittext_holder_style" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/login_account_name" style="@style/edittext_holder_style" android:theme="@style/edittext_holder_theme" app:errorEnabled="true" app:error="@{details.nameError}"> app:error="@{details.nameError}" app:errorEnabled="true"> <!--suppress AndroidUnknownAttribute --> <AutoCompleteTextView android:id="@+id/accountName" unfilteredText="@={details.name}" android:layout_width="match_parent" android:layout_height="wrap_content" unfilteredText="@={details.name}" android:afterTextChanged="@{details::validateAccountName}" android:inputType="textEmailAddress" /> </com.google.android.material.textfield.TextInputLayout> <TextView style="@style/TextAppearance.AppCompat.Body2" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/TextAppearance.AppCompat.Body2" app:drawableStartCompat="@drawable/ic_info" android:drawablePadding="8dp" android:layout_marginBottom="4dp" android:drawablePadding="8dp" android:text="@string/login_account_avoid_apostrophe" android:visibility="@{details.showApostropheWarning ? View.VISIBLE : View.GONE}"/> android:visibility="@{details.showApostropheWarning ? View.VISIBLE : View.GONE}" app:drawableStartCompat="@drawable/ic_info" /> <TextView android:id="@+id/account_email_hint" style="@style/TextAppearance.AppCompat.Body2" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" style="@style/TextAppearance.AppCompat.Body2" android:text="@string/login_account_name_info" /> <LinearLayout android:id="@+id/carddav" android:layout_height="wrap_content" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView Loading @@ -93,9 +100,9 @@ </ScrollView> <androidx.cardview.widget.CardView style="@style/stepper_nav_bar" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/stepper_nav_bar"> android:layout_height="wrap_content"> <LinearLayout android:layout_width="match_parent" Loading @@ -105,13 +112,13 @@ <ProgressBar android:id="@+id/create_account_progress" style="?android:attr/progressBarStyleHorizontal" android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:visibility="gone" tools:visibility="visible" android:layout_weight="1" android:indeterminate="true" style="?android:attr/progressBarStyleHorizontal"/> android:visibility="gone" tools:visibility="visible" /> <Button android:id="@+id/create_account" Loading @@ -126,4 +133,14 @@ </LinearLayout> <LinearLayout android:id="@+id/main_loading_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:visibility="gone"> <include layout="@layout/detect_configuration" /> </LinearLayout> </RelativeLayout> </layout> No newline at end of file Loading
app/src/main/java/at/bitfire/davdroid/ui/setup/AccountDetailsFragment.kt +4 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,10 @@ class AccountDetailsFragment : Fragment() { if (requireActivity().intent.getStringExtra(LoginActivity.SETUP_ACCOUNT_PROVIDER_TYPE) == LoginActivity.ACCOUNT_PROVIDER_EELO || requireActivity().intent.getStringExtra(LoginActivity.SETUP_ACCOUNT_PROVIDER_TYPE) == LoginActivity.ACCOUNT_PROVIDER_GOOGLE) { v.mainDetailLayout.visibility = View.GONE v.mainLoadingLayout.visibility = View.VISIBLE val name = model.name.value if (name.isNullOrBlank()) model.nameError.value = getString(R.string.login_account_name_required) Loading
app/src/main/res/layout/login_account_details.xml +105 −88 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"> <data> <import type="android.view.View" /> <variable name="details" type="at.bitfire.davdroid.ui.setup.AccountDetailsFragment.AccountDetailsModel" /> </data> <LinearLayout android:orientation="vertical" <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:id="@+id/main_detail_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <ScrollView android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:layout_margin="@dimen/activity_margin"> android:layout_margin="@dimen/activity_margin" android:layout_weight="1"> <LinearLayout android:layout_width="match_parent" Loading @@ -27,52 +34,52 @@ android:orientation="vertical"> <TextView style="@style/TextAppearance.MaterialComponents.Headline5" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/TextAppearance.MaterialComponents.Headline5" android:text="@string/login_create_account" android:layout_marginBottom="14dp"/> android:layout_marginBottom="14dp" android:text="@string/login_create_account" /> <com.google.android.material.textfield.TextInputLayout style="@style/edittext_holder_style" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/login_account_name" style="@style/edittext_holder_style" android:theme="@style/edittext_holder_theme" app:errorEnabled="true" app:error="@{details.nameError}"> app:error="@{details.nameError}" app:errorEnabled="true"> <!--suppress AndroidUnknownAttribute --> <AutoCompleteTextView android:id="@+id/accountName" unfilteredText="@={details.name}" android:layout_width="match_parent" android:layout_height="wrap_content" unfilteredText="@={details.name}" android:afterTextChanged="@{details::validateAccountName}" android:inputType="textEmailAddress" /> </com.google.android.material.textfield.TextInputLayout> <TextView style="@style/TextAppearance.AppCompat.Body2" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/TextAppearance.AppCompat.Body2" app:drawableStartCompat="@drawable/ic_info" android:drawablePadding="8dp" android:layout_marginBottom="4dp" android:drawablePadding="8dp" android:text="@string/login_account_avoid_apostrophe" android:visibility="@{details.showApostropheWarning ? View.VISIBLE : View.GONE}"/> android:visibility="@{details.showApostropheWarning ? View.VISIBLE : View.GONE}" app:drawableStartCompat="@drawable/ic_info" /> <TextView android:id="@+id/account_email_hint" style="@style/TextAppearance.AppCompat.Body2" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" style="@style/TextAppearance.AppCompat.Body2" android:text="@string/login_account_name_info" /> <LinearLayout android:id="@+id/carddav" android:layout_height="wrap_content" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView Loading @@ -93,9 +100,9 @@ </ScrollView> <androidx.cardview.widget.CardView style="@style/stepper_nav_bar" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/stepper_nav_bar"> android:layout_height="wrap_content"> <LinearLayout android:layout_width="match_parent" Loading @@ -105,13 +112,13 @@ <ProgressBar android:id="@+id/create_account_progress" style="?android:attr/progressBarStyleHorizontal" android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:visibility="gone" tools:visibility="visible" android:layout_weight="1" android:indeterminate="true" style="?android:attr/progressBarStyleHorizontal"/> android:visibility="gone" tools:visibility="visible" /> <Button android:id="@+id/create_account" Loading @@ -126,4 +133,14 @@ </LinearLayout> <LinearLayout android:id="@+id/main_loading_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:visibility="gone"> <include layout="@layout/detect_configuration" /> </LinearLayout> </RelativeLayout> </layout> No newline at end of file