Merge "Reduce margin for DropTargetBar to avoid buttons to be truncated." into sc-dev
This commit is contained in:
@@ -19,6 +19,5 @@
|
|||||||
|
|
||||||
<!-- Drag padding to add to the bottom of drop targets -->
|
<!-- Drag padding to add to the bottom of drop targets -->
|
||||||
<dimen name="drop_target_drag_padding">20dp</dimen>
|
<dimen name="drop_target_drag_padding">20dp</dimen>
|
||||||
<dimen name="drop_target_text_size">16sp</dimen>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
@@ -189,8 +189,9 @@
|
|||||||
<!-- Dragging -->
|
<!-- Dragging -->
|
||||||
<!-- Drag padding to add to the bottom of drop targets -->
|
<!-- Drag padding to add to the bottom of drop targets -->
|
||||||
<dimen name="drop_target_drag_padding">14dp</dimen>
|
<dimen name="drop_target_drag_padding">14dp</dimen>
|
||||||
<dimen name="drop_target_text_size">20sp</dimen>
|
<dimen name="drop_target_text_size">16sp</dimen>
|
||||||
<dimen name="drop_target_shadow_elevation">2dp</dimen>
|
<dimen name="drop_target_shadow_elevation">2dp</dimen>
|
||||||
|
<dimen name="drop_target_bar_margin_horizontal">4dp</dimen>
|
||||||
|
|
||||||
<!-- the distance an icon must be dragged before button drop targets accept it -->
|
<!-- the distance an icon must be dragged before button drop targets accept it -->
|
||||||
<dimen name="drag_distanceThreshold">30dp</dimen>
|
<dimen name="drag_distanceThreshold">30dp</dimen>
|
||||||
|
|||||||
@@ -258,7 +258,7 @@
|
|||||||
<!-- Drop targets -->
|
<!-- Drop targets -->
|
||||||
<style name="DropTargetButtonBase" parent="@android:style/TextAppearance.DeviceDefault">
|
<style name="DropTargetButtonBase" parent="@android:style/TextAppearance.DeviceDefault">
|
||||||
<item name="android:drawablePadding">8dp</item>
|
<item name="android:drawablePadding">8dp</item>
|
||||||
<item name="android:padding">16dp</item>
|
<item name="android:padding">14dp</item>
|
||||||
<item name="android:textColor">@color/drop_target_text</item>
|
<item name="android:textColor">@color/drop_target_text</item>
|
||||||
<item name="android:textSize">@dimen/drop_target_text_size</item>
|
<item name="android:textSize">@dimen/drop_target_text_size</item>
|
||||||
<item name="android:singleLine">true</item>
|
<item name="android:singleLine">true</item>
|
||||||
|
|||||||
@@ -105,7 +105,8 @@ public class DropTargetBar extends FrameLayout
|
|||||||
/ (2 * (grid.inv.numColumns + 1)))
|
/ (2 * (grid.inv.numColumns + 1)))
|
||||||
+ grid.edgeMarginPx;
|
+ grid.edgeMarginPx;
|
||||||
} else {
|
} else {
|
||||||
gap = grid.desiredWorkspaceLeftRightMarginPx - grid.inv.defaultWidgetPadding.right;
|
gap = getContext().getResources()
|
||||||
|
.getDimensionPixelSize(R.dimen.drop_target_bar_margin_horizontal);
|
||||||
}
|
}
|
||||||
lp.width = grid.availableWidthPx - 2 * gap;
|
lp.width = grid.availableWidthPx - 2 * gap;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user