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);
|
||||
}
|
||||
|
||||
public void removeBottomMarginSelectionMenu() {
|
||||
public void updateBottomMarginSelectionMenu(int bottomMargin) {
|
||||
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) rvSelectionMenu.getLayoutParams();
|
||||
params.bottomMargin = 0;
|
||||
params.bottomMargin = bottomMargin;
|
||||
}
|
||||
|
||||
public void setDescription(@NonNull String description) {
|
||||
|
|
|
@ -248,12 +248,17 @@ public class OnlineRoutingEngineFragment extends BaseOsmAndFragment {
|
|||
if (engine.vehicleType != vehicle) {
|
||||
engine.vehicleType = vehicle;
|
||||
updateCardViews(nameCard, vehicleCard, exampleCard);
|
||||
if (vehicle == VehicleType.CUSTOM) {
|
||||
vehicleCard.updateBottomMarginSelectionMenu((int) getResources().getDimension(R.dimen.content_padding));
|
||||
} else {
|
||||
vehicleCard.updateBottomMarginSelectionMenu(0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
vehicleCard.removeBottomMarginSelectionMenu();
|
||||
vehicleCard.updateBottomMarginSelectionMenu(0);
|
||||
vehicleCard.setFieldBoxLabelText(getString(R.string.shared_string_custom));
|
||||
vehicleCard.setOnTextChangedListener(new OnTextChangedListener() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue