fix descrease padding below scroll buttons in "Vehicle" block
This commit is contained in:
parent
4c4a439adc
commit
ebbcb1778f
2 changed files with 8 additions and 3 deletions
|
@ -128,9 +128,9 @@ public class OnlineRoutingCard extends BaseCard {
|
||||||
rvSelectionMenu.setAdapter(adapter);
|
rvSelectionMenu.setAdapter(adapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeBottomMarginSelectionMenu() {
|
public void updateBottomMarginSelectionMenu(int bottomMargin) {
|
||||||
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) rvSelectionMenu.getLayoutParams();
|
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) rvSelectionMenu.getLayoutParams();
|
||||||
params.bottomMargin = 0;
|
params.bottomMargin = bottomMargin;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDescription(@NonNull String description) {
|
public void setDescription(@NonNull String description) {
|
||||||
|
|
|
@ -248,12 +248,17 @@ public class OnlineRoutingEngineFragment extends BaseOsmAndFragment {
|
||||||
if (engine.vehicleType != vehicle) {
|
if (engine.vehicleType != vehicle) {
|
||||||
engine.vehicleType = vehicle;
|
engine.vehicleType = vehicle;
|
||||||
updateCardViews(nameCard, vehicleCard, exampleCard);
|
updateCardViews(nameCard, vehicleCard, exampleCard);
|
||||||
|
if (vehicle == VehicleType.CUSTOM) {
|
||||||
|
vehicleCard.updateBottomMarginSelectionMenu((int) getResources().getDimension(R.dimen.content_padding));
|
||||||
|
} else {
|
||||||
|
vehicleCard.updateBottomMarginSelectionMenu(0);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
vehicleCard.removeBottomMarginSelectionMenu();
|
vehicleCard.updateBottomMarginSelectionMenu(0);
|
||||||
vehicleCard.setFieldBoxLabelText(getString(R.string.shared_string_custom));
|
vehicleCard.setFieldBoxLabelText(getString(R.string.shared_string_custom));
|
||||||
vehicleCard.setOnTextChangedListener(new OnTextChangedListener() {
|
vehicleCard.setOnTextChangedListener(new OnTextChangedListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue