Skip to content

Commit

Permalink
hotfix for voter declaration dialog bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Huttner authored and Aaron Huttner committed Aug 24, 2016
1 parent 443c6d4 commit a173650
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 57 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
54 changes: 31 additions & 23 deletions app/src/main/res/layout/dialog_disclosure_agreement.xml
Original file line number Diff line number Diff line change
@@ -1,32 +1,41 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingEnd="24dp"
android:paddingStart="24dp"
android:paddingTop="24dp">

<TextView
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="24dp"
android:paddingStart="24dp"
android:paddingTop="24dp">

<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingEnd="@dimen/content_area_padding"
android:text="@string/disclosure_agreement_title"
android:textAppearance="@android:style/TextAppearance.Material.DialogWindowTitle"/>
android:layout_above="@+id/disclosure_button_bar"
android:layout_alignParentTop="true"
android:fillViewport="true"
>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
android:id="@+id/text_content"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:paddingBottom="24dp"
android:paddingTop="8dp"
tools:text="@string/disclosure_agreement"/>
</LinearLayout>
</ScrollView>

<TextView
android:id="@+id/text_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="24dp"
android:paddingTop="8dp"
tools:text="@string/disclosure_agreement"/>

<LinearLayout
android:id="@+id/disclosure_button_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_alignParentBottom="true"
android:gravity="end"
android:orientation="horizontal"
android:paddingBottom="8dp">
Expand All @@ -48,5 +57,4 @@
/>
</LinearLayout>


</LinearLayout>
</RelativeLayout>
31 changes: 0 additions & 31 deletions app/src/main/res/layout/dialog_registration_complete.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,11 @@
android:paddingStart="24dp"
android:paddingTop="24dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<ImageView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="fill_horizontal|center_vertical"
android:layout_weight=".1"
android:paddingEnd="@dimen/content_area_padding"
android:scaleType="fitCenter"
android:src="@drawable/ic_done_black_24dp"
android:tint="@color/colorAccent"
/>

<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="fill_horizontal"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingEnd="@dimen/content_area_padding"
android:paddingStart="@dimen/content_area_padding"
android:text="@string/registration_complete"
android:textAppearance="@android:style/TextAppearance.Material.DialogWindowTitle"/>

</LinearLayout>


<TextView
android:id="@+id/drc_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="24dp"
android:paddingTop="8dp"
android:text="@string/registration_complete_dialog_text"/>

<LinearLayout
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,23 @@
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="textColorError">@android:color/holo_red_dark</item>
<item name="android:dialogTheme">@style/GrommetDatePickerDialog</item>

</style>

<style name="RegistrationTheme" parent="GrommetTheme">
<item name="android:statusBarColor">@color/colorPrimaryDark</item>
</style>

<!--<style name="GrommetDialog" parent="Theme.AppCompat.Light.Dialog">-->
<!--<item name="windowNoTitle">false</item>-->
<!--</style>-->

<style name="GrommetDatePickerDialog" parent="Theme.AppCompat.Light.Dialog">
<item name="android:datePickerStyle">@style/GrommetDatePicker</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:colorAccent">@color/colorAccent</item>
<item name="android:windowNoTitle">false</item>
</style>

<style name="GrommetDatePicker" parent="android:Widget.Material.Light.DatePicker">
Expand Down

0 comments on commit a173650

Please sign in to comment.