fix previous;

"Vehicle" block, descrease padding below scroll buttons
This commit is contained in:
Skalii 2021-01-13 16:59:50 +02:00
parent 847f99fbd5
commit 5a8a39ecf5
2 changed files with 9 additions and 1 deletions

View file

@ -5,6 +5,7 @@ import android.text.TextWatcher;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.view.View.OnFocusChangeListener; import android.view.View.OnFocusChangeListener;
import android.view.ViewGroup;
import android.widget.EditText; import android.widget.EditText;
import android.widget.TextView; import android.widget.TextView;
@ -127,6 +128,11 @@ public class OnlineRoutingCard extends BaseCard {
rvSelectionMenu.setAdapter(adapter); rvSelectionMenu.setAdapter(adapter);
} }
public void removeBottomMarginSelectionMenu() {
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) rvSelectionMenu.getLayoutParams();
params.bottomMargin = 0;
}
public void setDescription(@NonNull String description) { public void setDescription(@NonNull String description) {
showElements(tvDescription); showElements(tvDescription);
tvDescription.setText(description); tvDescription.setText(description);

View file

@ -230,6 +230,7 @@ public class OnlineRoutingEngineFragment extends BaseOsmAndFragment {
return false; return false;
} }
}); });
vehicleCard.removeBottomMarginSelectionMenu();
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
@ -284,7 +285,8 @@ public class OnlineRoutingEngineFragment extends BaseOsmAndFragment {
return false; return false;
} }
}); });
exampleCard.setFieldBoxLabelText(getString(R.string.online_routing_example_hint)); exampleCard.setDescription(getString(R.string.online_routing_example_hint));
exampleCard.showFieldBox();
exampleCard.setButton(getString(R.string.test_route_calculation), new View.OnClickListener() { exampleCard.setButton(getString(R.string.test_route_calculation), new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {