Commit 79a0906a authored by Anthony Vallee-Dubois's avatar Anthony Vallee-Dubois Committed by Commit Bot

Explicit Language Ask minor UI polish

This adds a bit of padding after the checkboxes and makes entire
rows clickable.

Bug: 887678
Change-Id: I89d6d7f1901170d6178b3b5e0fce228b3d584d00
Reviewed-on: https://chromium-review.googlesource.com/1252524Reviewed-by: default avatarTheresa <twellington@chromium.org>
Commit-Queue: anthonyvd <anthonyvd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595501}
parent af3f31af
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<CheckBox <CheckBox
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingEnd="@dimen/explicit_ask_checkbox_end_padding"
android:id="@+id/language_ask_checkbox" android:id="@+id/language_ask_checkbox"
android:layout_alignBaseline="@+id/ui_language_representation" /> android:layout_alignBaseline="@+id/ui_language_representation" />
......
...@@ -550,4 +550,7 @@ ...@@ -550,4 +550,7 @@
<dimen name="navigation_popup_default_padding">16dp</dimen> <dimen name="navigation_popup_default_padding">16dp</dimen>
<dimen name="navigation_popup_top_padding">8dp</dimen> <dimen name="navigation_popup_top_padding">8dp</dimen>
<dimen name="navigation_popup_favicon_bg_size">36dp</dimen> <dimen name="navigation_popup_favicon_bg_size">36dp</dimen>
<!-- Explicit Language Ask Prompt dimensions -->
<dimen name="explicit_ask_checkbox_end_padding">4dp</dimen>
</resources> </resources>
...@@ -43,7 +43,8 @@ public class LanguageAskPrompt implements ModalDialogView.Controller { ...@@ -43,7 +43,8 @@ public class LanguageAskPrompt implements ModalDialogView.Controller {
} }
} }
private class LanguageAskPromptRowViewHolder extends ViewHolder { private class LanguageAskPromptRowViewHolder
extends ViewHolder implements View.OnClickListener {
private TextView mLanguageNameTextView; private TextView mLanguageNameTextView;
private TextView mNativeNameTextView; private TextView mNativeNameTextView;
private CheckBox mCheckbox; private CheckBox mCheckbox;
...@@ -52,6 +53,7 @@ public class LanguageAskPrompt implements ModalDialogView.Controller { ...@@ -52,6 +53,7 @@ public class LanguageAskPrompt implements ModalDialogView.Controller {
LanguageAskPromptRowViewHolder(View view) { LanguageAskPromptRowViewHolder(View view) {
super(view); super(view);
view.setOnClickListener(this);
mLanguageNameTextView = mLanguageNameTextView =
((TextView) itemView.findViewById(R.id.ui_language_representation)); ((TextView) itemView.findViewById(R.id.ui_language_representation));
mNativeNameTextView = mNativeNameTextView =
...@@ -69,6 +71,11 @@ public class LanguageAskPrompt implements ModalDialogView.Controller { ...@@ -69,6 +71,11 @@ public class LanguageAskPrompt implements ModalDialogView.Controller {
}); });
} }
@Override
public void onClick(View v) {
mCheckbox.setChecked(!mCheckbox.isChecked());
}
/** /**
* Sets the text in the TextView children of this row to |languageName| and |nativeName| * Sets the text in the TextView children of this row to |languageName| and |nativeName|
* respectively. * respectively.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment