From a173650020f11079897b2807ef7f2ee6fd5b29c2 Mon Sep 17 00:00:00 2001 From: Aaron Huttner Date: Wed, 24 Aug 2016 17:22:33 -0400 Subject: [PATCH] hotfix for voter declaration dialog bug --- app/build.gradle | 2 +- .../DisclosureAgreementDialogFragment.java | 3 ++ .../RegistrationCompleteDialogFragment.java | 1 + .../ReviewAndConfirmFragment.java | 2 - .../layout/dialog_disclosure_agreement.xml | 54 +++++++++++-------- .../layout/dialog_registration_complete.xml | 31 ----------- app/src/main/res/values/styles.xml | 6 +++ 7 files changed, 42 insertions(+), 57 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 6fab2dc4..40344c0a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,7 +1,7 @@ // Manifest version information! def versionMajor = 1 def versionMinor = 0 -def versionPatch = 4 +def versionPatch = 5 def versionBuild = 0 // bump for dogfood builds, public betas, etc. apply plugin: 'com.android.application' diff --git a/app/src/main/java/com/rockthevote/grommet/ui/registration/DisclosureAgreementDialogFragment.java b/app/src/main/java/com/rockthevote/grommet/ui/registration/DisclosureAgreementDialogFragment.java index a9eb5462..0903c995 100644 --- a/app/src/main/java/com/rockthevote/grommet/ui/registration/DisclosureAgreementDialogFragment.java +++ b/app/src/main/java/com/rockthevote/grommet/ui/registration/DisclosureAgreementDialogFragment.java @@ -43,6 +43,9 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, content.setText(result); content.setMovementMethod(LinkMovementMethod.getInstance()); + getDialog().setTitle(getString(R.string.disclosure_agreement_title)); + getDialog().setCancelable(false); + return v; } diff --git a/app/src/main/java/com/rockthevote/grommet/ui/registration/RegistrationCompleteDialogFragment.java b/app/src/main/java/com/rockthevote/grommet/ui/registration/RegistrationCompleteDialogFragment.java index b726a6b3..663b03bb 100644 --- a/app/src/main/java/com/rockthevote/grommet/ui/registration/RegistrationCompleteDialogFragment.java +++ b/app/src/main/java/com/rockthevote/grommet/ui/registration/RegistrationCompleteDialogFragment.java @@ -20,6 +20,7 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, setCancelable(false); View v = inflater.inflate(R.layout.dialog_registration_complete, container); ButterKnife.bind(this, v); + getDialog().setTitle(getString(R.string.registration_complete)); return v; } diff --git a/app/src/main/java/com/rockthevote/grommet/ui/registration/ReviewAndConfirmFragment.java b/app/src/main/java/com/rockthevote/grommet/ui/registration/ReviewAndConfirmFragment.java index 2dc6d8ed..c0bee761 100644 --- a/app/src/main/java/com/rockthevote/grommet/ui/registration/ReviewAndConfirmFragment.java +++ b/app/src/main/java/com/rockthevote/grommet/ui/registration/ReviewAndConfirmFragment.java @@ -89,9 +89,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); ButterKnife.bind(this, view); - dialog = new DisclosureAgreementDialogFragment(); - dialog.setCancelable(false); } @Override diff --git a/app/src/main/res/layout/dialog_disclosure_agreement.xml b/app/src/main/res/layout/dialog_disclosure_agreement.xml index 10e26b07..e26ec206 100644 --- a/app/src/main/res/layout/dialog_disclosure_agreement.xml +++ b/app/src/main/res/layout/dialog_disclosure_agreement.xml @@ -1,32 +1,41 @@ - - - + + + android:layout_above="@+id/disclosure_button_bar" + android:layout_alignParentTop="true" + android:fillViewport="true" + > + + + + + - @@ -48,5 +57,4 @@ /> - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_registration_complete.xml b/app/src/main/res/layout/dialog_registration_complete.xml index 35316a7f..804aff83 100644 --- a/app/src/main/res/layout/dialog_registration_complete.xml +++ b/app/src/main/res/layout/dialog_registration_complete.xml @@ -7,42 +7,11 @@ android:paddingStart="24dp" android:paddingTop="24dp"> - - - - - - - - - @color/colorPrimaryDark @color/colorAccent @android:color/holo_red_dark + @style/GrommetDatePickerDialog @@ -19,10 +20,15 @@ @color/colorPrimaryDark + + + +