Merge "Overflow height and spacing polish" into rvc-dev
This commit is contained in:
@@ -20,6 +20,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingTop="@dimen/bubble_overflow_padding"
|
android:paddingTop="@dimen/bubble_overflow_padding"
|
||||||
|
android:paddingLeft="@dimen/bubble_overflow_padding"
|
||||||
|
android:paddingRight="@dimen/bubble_overflow_padding"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_gravity="center_horizontal">
|
android:layout_gravity="center_horizontal">
|
||||||
|
|
||||||
|
|||||||
@@ -37,5 +37,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
android:paddingTop="@dimen/bubble_overflow_text_padding"
|
||||||
android:gravity="center"/>
|
android:gravity="center"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -1148,11 +1148,13 @@
|
|||||||
<!-- Default (and minimum) height of the expanded view shown when the bubble is expanded -->
|
<!-- Default (and minimum) height of the expanded view shown when the bubble is expanded -->
|
||||||
<dimen name="bubble_expanded_default_height">180dp</dimen>
|
<dimen name="bubble_expanded_default_height">180dp</dimen>
|
||||||
<!-- Default height of bubble overflow -->
|
<!-- Default height of bubble overflow -->
|
||||||
<dimen name="bubble_overflow_height">380dp</dimen>
|
<dimen name="bubble_overflow_height">460dp</dimen>
|
||||||
<!-- Bubble overflow padding when there are no bubbles -->
|
<!-- Bubble overflow padding when there are no bubbles -->
|
||||||
<dimen name="bubble_overflow_empty_state_padding">16dp</dimen>
|
<dimen name="bubble_overflow_empty_state_padding">16dp</dimen>
|
||||||
<!-- Padding of container for overflow bubbles -->
|
<!-- Padding of container for overflow bubbles -->
|
||||||
<dimen name="bubble_overflow_padding">5dp</dimen>
|
<dimen name="bubble_overflow_padding">15dp</dimen>
|
||||||
|
<!-- Padding of label for bubble overflow view -->
|
||||||
|
<dimen name="bubble_overflow_text_padding">7dp</dimen>
|
||||||
<!-- Height of the triangle that points to the expanded bubble -->
|
<!-- Height of the triangle that points to the expanded bubble -->
|
||||||
<dimen name="bubble_pointer_height">4dp</dimen>
|
<dimen name="bubble_pointer_height">4dp</dimen>
|
||||||
<!-- Width of the triangle that points to the expanded bubble -->
|
<!-- Width of the triangle that points to the expanded bubble -->
|
||||||
|
|||||||
@@ -81,11 +81,15 @@ public class BubbleOverflowActivity extends Activity {
|
|||||||
|
|
||||||
DisplayMetrics displayMetrics = new DisplayMetrics();
|
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||||
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
|
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
|
||||||
final int viewWidth = displayMetrics.widthPixels / columns;
|
final int recyclerViewWidth = (displayMetrics.widthPixels
|
||||||
|
- res.getDimensionPixelSize(R.dimen.bubble_overflow_padding));
|
||||||
|
final int viewWidth = recyclerViewWidth / columns;
|
||||||
|
|
||||||
final int maxOverflowBubbles = res.getInteger(R.integer.bubbles_max_overflow);
|
final int maxOverflowBubbles = res.getInteger(R.integer.bubbles_max_overflow);
|
||||||
final int rows = (int) Math.ceil((double) maxOverflowBubbles / columns);
|
final int rows = (int) Math.ceil((double) maxOverflowBubbles / columns);
|
||||||
final int viewHeight = res.getDimensionPixelSize(R.dimen.bubble_overflow_height) / rows;
|
final int recyclerViewHeight = res.getDimensionPixelSize(R.dimen.bubble_overflow_height)
|
||||||
|
- res.getDimensionPixelSize(R.dimen.bubble_overflow_padding);
|
||||||
|
final int viewHeight = recyclerViewHeight / rows;
|
||||||
|
|
||||||
mAdapter = new BubbleOverflowAdapter(mOverflowBubbles,
|
mAdapter = new BubbleOverflowAdapter(mOverflowBubbles,
|
||||||
mBubbleController::promoteBubbleFromOverflow, viewWidth, viewHeight);
|
mBubbleController::promoteBubbleFromOverflow, viewWidth, viewHeight);
|
||||||
|
|||||||
Reference in New Issue
Block a user