Commit 234c5157 authored by Christian Dullweber's avatar Christian Dullweber Committed by Commit Bot

Improve PreviewTab and Https layout in new PageInfo UI

Move text to the bottom and revert to individual margins as the
divider does not work as expected.

Bug: 1077766
Change-Id: I7ade4dfd6d1315581dce1cf6b3670490652ff401
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2440511Reviewed-by: default avatarEhimare Okoyomon <eokoyomon@chromium.org>
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812642}
parent 6dfd67fb
...@@ -12,13 +12,36 @@ ...@@ -12,13 +12,36 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/sheet_bg_color" android:background="@color/sheet_bg_color"
android:orientation="vertical" android:orientation="vertical"
android:divider="@android:color/transparent" android:layout_marginBottom="8dp">
<LinearLayout
android:id="@+id/page_info_row_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:showDividers="middle" android:showDividers="middle"
android:dividerHeight="12dp"> android:divider="?android:listDivider"
android:dividerPadding="2dp" >
<org.chromium.components.page_info.PageInfoRowView
android:id="@+id/page_info_connection_row"
android:visibility="gone"
android:layout_height="wrap_content"
android:layout_width="match_parent"/>
<org.chromium.components.page_info.PageInfoRowView
android:id="@+id/page_info_permissions_row"
android:visibility="gone"
android:layout_height="wrap_content"
android:layout_width="match_parent"/>
<org.chromium.components.page_info.PageInfoRowView
android:id="@+id/page_info_cookies_row"
android:visibility="gone"
android:layout_height="wrap_content"
android:layout_width="match_parent"/>
</LinearLayout>
<View <View
android:id="@+id/page_info_preview_separator" android:id="@+id/page_info_preview_separator"
android:layout_marginTop="4dp" android:layout_marginTop="16dp"
style="@style/HorizontalDivider" style="@style/HorizontalDivider"
android:visibility="gone" /> android:visibility="gone" />
...@@ -27,7 +50,7 @@ ...@@ -27,7 +50,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/page_info_popup_padding_sides" android:layout_marginHorizontal="@dimen/page_info_popup_padding_sides"
android:paddingTop="2dp" android:layout_marginTop="12dp"
android:textAppearance="@style/TextAppearance.TextLarge.Primary" android:textAppearance="@style/TextAppearance.TextLarge.Primary"
android:text="@string/page_info_preview_message" android:text="@string/page_info_preview_message"
android:visibility="gone" /> android:visibility="gone" />
...@@ -36,6 +59,7 @@ ...@@ -36,6 +59,7 @@
android:id="@+id/page_info_preview_load_original" android:id="@+id/page_info_preview_load_original"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginVertical="12dp"
android:layout_marginHorizontal="@dimen/page_info_popup_padding_sides" android:layout_marginHorizontal="@dimen/page_info_popup_padding_sides"
android:textAppearance="@style/TextAppearance.TextLarge.Primary" android:textAppearance="@style/TextAppearance.TextLarge.Primary"
android:visibility="gone" /> android:visibility="gone" />
...@@ -44,44 +68,19 @@ ...@@ -44,44 +68,19 @@
android:id="@+id/page_info_lite_mode_https_image_compression_message" android:id="@+id/page_info_lite_mode_https_image_compression_message"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginVertical="12dp"
android:layout_marginHorizontal="@dimen/page_info_popup_padding_sides" android:layout_marginHorizontal="@dimen/page_info_popup_padding_sides"
android:text="@string/page_info_lite_mode_https_image_compression" android:text="@string/page_info_lite_mode_https_image_compression"
android:textAppearance="@style/TextAppearance.TextMedium.Primary" android:textAppearance="@style/TextAppearance.TextMedium.Primary"
android:visibility="gone" /> android:visibility="gone" />
<LinearLayout
android:id="@+id/page_info_row_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:showDividers="middle"
android:divider="?android:listDivider"
android:dividerPadding="2dp" >
<org.chromium.components.page_info.PageInfoRowView
android:id="@+id/page_info_connection_row"
android:visibility="gone"
android:layout_height="wrap_content"
android:layout_width="match_parent"/>
<org.chromium.components.page_info.PageInfoRowView
android:id="@+id/page_info_permissions_row"
android:visibility="gone"
android:layout_height="wrap_content"
android:layout_width="match_parent"/>
<org.chromium.components.page_info.PageInfoRowView
android:id="@+id/page_info_cookies_row"
android:visibility="gone"
android:layout_height="wrap_content"
android:layout_width="match_parent"/>
</LinearLayout>
<org.chromium.ui.widget.ButtonCompat <org.chromium.ui.widget.ButtonCompat
android:id="@+id/page_info_instant_app_button" android:id="@+id/page_info_instant_app_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="start" android:layout_gravity="start"
android:layout_marginHorizontal="@dimen/page_info_popup_padding_sides" android:layout_marginHorizontal="@dimen/page_info_popup_padding_sides"
android:paddingEnd="@dimen/page_info_popup_button_padding_sides" android:paddingHorizontal="@dimen/page_info_popup_button_padding_sides"
android:paddingStart="@dimen/page_info_popup_button_padding_sides"
android:text="@string/page_info_instant_app_button" android:text="@string/page_info_instant_app_button"
app:buttonColor="@color/app_banner_install_button_bg" app:buttonColor="@color/app_banner_install_button_bg"
style="@style/FilledButton" /> style="@style/FilledButton" />
...@@ -92,8 +91,7 @@ ...@@ -92,8 +91,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="end" android:layout_gravity="end"
android:layout_marginHorizontal="@dimen/page_info_popup_padding_sides" android:layout_marginHorizontal="@dimen/page_info_popup_padding_sides"
android:paddingEnd="@dimen/page_info_popup_button_padding_sides" android:paddingHorizontal="@dimen/page_info_popup_button_padding_sides"
android:paddingStart="@dimen/page_info_popup_button_padding_sides"
android:text="@string/page_info_open_online_button" android:text="@string/page_info_open_online_button"
style="@style/TextButton" /> style="@style/TextButton" />
</LinearLayout> </LinearLayout>
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