Commit 6f36e2b3 authored by kkimlabs's avatar kkimlabs Committed by Commit bot

[Android] Fix bookmark row vertical alignment.

Fixed the followings:

1. Bookmark row text was aligned to the top.
(regression from https://crrev.com/2cb98653338e23e4f31ade78de2ef872e697b2bc)

2. On offline section, selection-highlighting was not symmetric
   vertically.

BUG=577996

Review URL: https://codereview.chromium.org/1636773002

Cr-Commit-Position: refs/heads/master@{#371397}
parent f9e30015
......@@ -26,6 +26,7 @@
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="vertical" >
<TextView
......
......@@ -99,12 +99,12 @@ public class EnhancedBookmarkBookmarkRow extends EnhancedBookmarkRow implements
TextView textView = (TextView) findViewById(R.id.offline_page_size);
View bookmarkRowView = findViewById(R.id.bookmark_row);
if (offlinePage != null) {
int bottomPadding = textView.getResources().getDimensionPixelSize(
int verticalPadding = textView.getResources().getDimensionPixelSize(
R.dimen.offline_page_item_vertical_spacing);
textView.setText(Formatter.formatFileSize(getContext(), offlinePage.getFileSize()));
// Get the embedded bookmark_row layout, and add padding. This is because the entries
// in filter view are larger (contain more items) than normal bookmark view.
bookmarkRowView.setPadding(0, 0, 0, bottomPadding);
bookmarkRowView.setPadding(0, verticalPadding / 2, 0, verticalPadding / 2);
textView.setVisibility(View.VISIBLE);
} else {
textView.setVisibility(View.GONE);
......
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