Commit e4323c45 authored by Lijin Shen's avatar Lijin Shen Committed by Commit Bot

[Messages] Use ButtonCompat to represent text button

Use ButtonCompat instead to represent a text button.

Bug: 1123947
Change-Id: Ibe75a7fc47d602a3a61625aa0a24fe35d7ba0c04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2524963
Commit-Queue: Lijin Shen <lazzzis@google.com>
Reviewed-by: default avatarPavel Yatsuk <pavely@chromium.org>
Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825862}
parent 1fdbee5a
...@@ -73,17 +73,12 @@ ...@@ -73,17 +73,12 @@
android:layout_width="1dp" android:layout_width="1dp"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
<TextView <org.chromium.ui.widget.ButtonCompat
style="@style/TextAppearance.Button.Text.Blue" style="@style/TextButton"
android:id="@+id/message_primary_button" android:id="@+id/message_primary_button"
android:paddingStart="@dimen/message_button_padding"
android:paddingEnd="@dimen/message_button_padding"
android:layout_weight="0" android:layout_weight="0"
android:gravity="center_vertical"
android:minWidth="@dimen/message_banner_button_min_width"
android:minHeight="@dimen/min_touch_target_size"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center_vertical"
android:background="?attr/selectableItemBackground" /> android:visibility="gone" />
</org.chromium.components.messages.MessageBannerView> </org.chromium.components.messages.MessageBannerView>
\ No newline at end of file
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
<!-- Min width to ensure the min touchable size. --> <!-- Min width to ensure the min touchable size. -->
<dimen name="message_banner_button_min_width">12dp</dimen> <dimen name="message_banner_button_min_width">12dp</dimen>
<dimen name="message_icon_padding">12dp</dimen> <dimen name="message_icon_padding">12dp</dimen>
<dimen name="message_button_padding">16dp</dimen>
<dimen name="message_divider_margin">12dp</dimen> <dimen name="message_divider_margin">12dp</dimen>
<dimen name="message_shadow_top_margin">8dp</dimen> <dimen name="message_shadow_top_margin">8dp</dimen>
<dimen name="message_shadow_lateral_margin">12dp</dimen> <dimen name="message_shadow_lateral_margin">12dp</dimen>
......
...@@ -60,6 +60,7 @@ public class MessageBannerView extends LinearLayout { ...@@ -60,6 +60,7 @@ public class MessageBannerView extends LinearLayout {
} }
void setPrimaryButtonText(String text) { void setPrimaryButtonText(String text) {
mPrimaryButton.setVisibility(VISIBLE);
mPrimaryButton.setText(text); mPrimaryButton.setText(text);
} }
......
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