Fix bottom menu sizing

This commit is contained in:
PavelRatushny 2017-12-12 12:58:52 +02:00
parent bf2f3bdf0d
commit 9be80bb8fc

View file

@ -104,13 +104,13 @@ public class AmenityMenuBuilder extends MenuBuilder {
// Icon // Icon
LinearLayout llIcon = new LinearLayout(view.getContext()); LinearLayout llIcon = new LinearLayout(view.getContext());
llIcon.setOrientation(LinearLayout.HORIZONTAL); llIcon.setOrientation(LinearLayout.HORIZONTAL);
llIcon.setLayoutParams(new LinearLayout.LayoutParams(dpToPx(72f), dpToPx(48f))); llIcon.setLayoutParams(new LinearLayout.LayoutParams(dpToPx(64f), dpToPx(48f)));
llIcon.setGravity(Gravity.CENTER_VERTICAL); llIcon.setGravity(Gravity.CENTER_VERTICAL);
ll.addView(llIcon); ll.addView(llIcon);
ImageView iconView = new ImageView(view.getContext()); ImageView iconView = new ImageView(view.getContext());
LinearLayout.LayoutParams llIconParams = new LinearLayout.LayoutParams(dpToPx(24f), dpToPx(24f)); LinearLayout.LayoutParams llIconParams = new LinearLayout.LayoutParams(dpToPx(24f), dpToPx(24f));
llIconParams.setMargins(dpToPx(16f), dpToPx(12f), dpToPx(32f), dpToPx(12f)); llIconParams.setMargins(dpToPx(16f), dpToPx(12f), dpToPx(24f), dpToPx(12f));
llIconParams.gravity = Gravity.CENTER_VERTICAL; llIconParams.gravity = Gravity.CENTER_VERTICAL;
iconView.setLayoutParams(llIconParams); iconView.setLayoutParams(llIconParams);
iconView.setScaleType(ImageView.ScaleType.CENTER_INSIDE); iconView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
@ -175,7 +175,7 @@ public class AmenityMenuBuilder extends MenuBuilder {
ll.addView(llIconCollapse); ll.addView(llIconCollapse);
LinearLayout.LayoutParams llIconCollapseParams = new LinearLayout.LayoutParams(dpToPx(24f), dpToPx(24f)); LinearLayout.LayoutParams llIconCollapseParams = new LinearLayout.LayoutParams(dpToPx(24f), dpToPx(24f));
llIconCollapseParams.setMargins(0, dpToPx(12f), dpToPx(32f), dpToPx(12f)); llIconCollapseParams.setMargins(0, dpToPx(12f), dpToPx(24f), dpToPx(12f));
llIconCollapseParams.gravity = Gravity.CENTER_VERTICAL; llIconCollapseParams.gravity = Gravity.CENTER_VERTICAL;
iconViewCollapse.setLayoutParams(llIconCollapseParams); iconViewCollapse.setLayoutParams(llIconCollapseParams);
iconViewCollapse.setScaleType(ImageView.ScaleType.CENTER_INSIDE); iconViewCollapse.setScaleType(ImageView.ScaleType.CENTER_INSIDE);