Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions auth/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
android:name=".ui.email.EmailActivity"
android:label="@string/fui_sign_in_default"
android:exported="false"
android:windowSoftInputMode="adjustPan" />
android:windowSoftInputMode="adjustResize" />

<activity
android:name=".ui.phone.PhoneActivity"
android:label="@string/fui_sign_in_with_phone_number"
android:exported="false"
android:windowSoftInputMode="adjustPan|stateAlwaysVisible" />
android:windowSoftInputMode="adjustResize|stateAlwaysVisible" />

<activity
android:name=".ui.idp.WelcomeBackIdpPrompt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,16 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat

view.findViewById(R.id.button_next).setOnClickListener(this);

TextView termsText = view.<TextView>findViewById(R.id.email_tos_and_pp_text);
TextView footerText = view.<TextView>findViewById(R.id.email_footer_tos_and_pp_text);
TextView termsText = view.findViewById(R.id.email_tos_and_pp_text);
TextView footerText = view.findViewById(R.id.email_footer_tos_and_pp_text);
FlowParameters flowParameters = getFlowParams();

if (flowParameters.isSingleProviderFlow()) {
PrivacyDisclosureUtils.setupTermsOfServiceAndPrivacyPolicyText(getContext(),
getFlowParams(),
termsText);
} else {
termsText.setVisibility(View.GONE);
PrivacyDisclosureUtils.setupTermsOfServiceFooter(getContext(),
getFlowParams(),
footerText);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,13 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
mEmailEditText.setImportantForAutofill(View.IMPORTANT_FOR_AUTOFILL_NO);
}

if (savedInstanceState != null) { return; }
TextView footerText = view.findViewById(R.id.email_footer_tos_and_pp_text);
PrivacyDisclosureUtils.setupTermsOfServiceFooter(getContext(), getFlowParams(), footerText);

// WARNING: Nothing below this line will be executed on rotation
if (savedInstanceState != null) {
return;
}

// If email is passed in, fill in the field and move down to the name field.
String email = mUser.getEmail();
Expand All @@ -168,9 +174,6 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
} else {
safeRequestFocus(mEmailEditText);
}

TextView footerText = view.<TextView>findViewById(R.id.email_footer_tos_and_pp_text);
PrivacyDisclosureUtils.setupTermsOfServiceFooter(getContext(), getFlowParams(), footerText);
}

private void safeRequestFocus(final View v) {
Expand Down
21 changes: 6 additions & 15 deletions auth/src/main/res/layout/fui_check_email_layout.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>

<android.support.constraint.ConstraintLayout
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
Expand Down Expand Up @@ -47,20 +46,12 @@
android:textIsSelectable="false"
tools:text="Terms and Privacy Policy" />

<TextView
android:id="@+id/email_footer_tos_and_pp_text"
style="@style/FirebaseUI.PrivacyFooter" />

</LinearLayout>

</ScrollView>

<TextView
android:id="@+id/email_footer_tos_and_pp_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/fui_field_padding_vert"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingBottom="16dp"
android:gravity="end"
android:textIsSelectable="true"
app:layout_constraintBottom_toBottomOf="parent" />

</android.support.constraint.ConstraintLayout>
</FrameLayout>
18 changes: 6 additions & 12 deletions auth/src/main/res/layout/fui_confirmation_code_layout.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>

<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
Expand Down Expand Up @@ -95,24 +94,19 @@
tools:text="Resend code" />

<android.support.constraint.Barrier
android:id="@+id/resend_barrier"
android:layout_width="0dp"
android:layout_height="0dp"
app:barrierDirection="bottom"
app:constraint_referenced_ids="ticker,resend_code" />

<TextView
android:id="@+id/email_footer_tos_and_pp_text"
app:layout_constraintTop_toBottomOf="@+id/resend_barrier"
style="@style/FirebaseUI.PrivacyFooter" />

</android.support.constraint.ConstraintLayout>

</ScrollView>

<TextView
android:id="@+id/email_footer_tos_and_pp_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/fui_field_padding_vert"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingBottom="16dp"
android:gravity="end"
android:textIsSelectable="true"
app:layout_constraintBottom_toBottomOf="parent" />
</android.support.constraint.ConstraintLayout>
16 changes: 5 additions & 11 deletions auth/src/main/res/layout/fui_phone_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,14 @@
android:textIsSelectable="false"
app:layout_constraintTop_toBottomOf="@+id/send_code" />

<TextView
android:id="@+id/email_footer_tos_and_pp_text"
style="@style/FirebaseUI.PrivacyFooter"
app:layout_constraintTop_toBottomOf="@+id/send_sms_tos" />

</android.support.constraint.ConstraintLayout>

</ScrollView>

<TextView
android:id="@+id/email_footer_tos_and_pp_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/fui_field_padding_vert"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingBottom="16dp"
android:gravity="end"
android:textIsSelectable="true"
app:layout_constraintBottom_toBottomOf="parent" />
</android.support.constraint.ConstraintLayout>

26 changes: 11 additions & 15 deletions auth/src/main/res/layout/fui_register_email_layout.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
Expand All @@ -8,7 +8,10 @@

<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:paddingBottom="16dp"
android:clipToPadding="false">

<LinearLayout
style="@style/FirebaseUI.WrapperStyle"
Expand Down Expand Up @@ -68,21 +71,14 @@
style="@style/FirebaseUI.Button"
android:text="@string/fui_button_text_save"
tools:ignore="RtlHardcoded" />

<TextView
android:id="@+id/email_footer_tos_and_pp_text"
style="@style/FirebaseUI.PrivacyFooter" />

</LinearLayout>

</ScrollView>

<TextView
android:id="@+id/email_footer_tos_and_pp_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/fui_field_padding_vert"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingBottom="16dp"
android:gravity="end"
android:textIsSelectable="true"
app:layout_constraintBottom_toBottomOf="parent" />

</android.support.constraint.ConstraintLayout>
</FrameLayout>

9 changes: 9 additions & 0 deletions auth/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,13 @@
<item name="android:textColor">#FFFFFFFF</item>
</style>

<style name="FirebaseUI.PrivacyFooter">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginTop">16dp</item>
<item name="android:paddingBottom">16dp</item>
<item name="android:gravity">end</item>
<item name="android:textIsSelectable">true</item>
</style>

</resources>