Fix android 4 padding

This commit is contained in:
max-klaus 2019-08-03 19:32:39 +03:00
parent e86bde9c61
commit 46b88489a3

View file

@ -115,7 +115,12 @@ public class PublicTransportCard extends BaseCard {
view.findViewById(R.id.badges_padding).setVisibility(View.VISIBLE); view.findViewById(R.id.badges_padding).setVisibility(View.VISIBLE);
view.setBackgroundResource(AndroidUtils.resolveAttribute(view.getContext(), R.attr.card_and_list_background_basic)); view.setBackgroundResource(AndroidUtils.resolveAttribute(view.getContext(), R.attr.card_and_list_background_basic));
View info = view.findViewById(R.id.routes_info_container); View info = view.findViewById(R.id.routes_info_container);
int paddingLeft = info.getPaddingLeft();
int paddingTop = info.getPaddingTop();
int paddingRight = info.getPaddingRight();
int paddingBottom = info.getPaddingBottom();
info.setBackgroundResource(AndroidUtils.resolveAttribute(view.getContext(), android.R.attr.selectableItemBackground)); info.setBackgroundResource(AndroidUtils.resolveAttribute(view.getContext(), android.R.attr.selectableItemBackground));
info.setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom);
info.setOnClickListener(new View.OnClickListener() { info.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {