Merge pull request #6756 from osmandapp/RoutePreparationUiFixes

Fix rounded background buttons for pre lollipop api in route preparation
This commit is contained in:
Alexey 2019-03-29 19:04:52 +03:00 committed by GitHub
commit e1c79037cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 11 deletions

View file

@ -2,7 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="18dp" />
<corners android:radius="@dimen/route_info_button_bg_line_radius" />
<solid android:color="@color/active_buttons_and_links_trans_dark" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_dark" />
</shape>
@ -10,13 +10,13 @@
<item android:state_enabled="false">
<shape android:shape="rectangle">
<solid android:color="@color/activity_background_dark" />
<corners android:radius="18dp" />
<corners android:radius="@dimen/route_info_button_bg_line_radius" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="@null" />
<corners android:radius="18dp" />
<solid android:color="@color/card_and_list_background_dark" />
<corners android:radius="@dimen/route_info_button_bg_line_radius" />
<stroke android:width="1dp" android:color="@color/divider_dark" />
</shape>
</item>

View file

@ -2,7 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="18dp" />
<corners android:radius="@dimen/route_info_button_bg_line_radius" />
<solid android:color="@color/active_buttons_and_links_trans_light" />
<stroke android:width="1dp" android:color="@color/active_buttons_and_links_light" />
</shape>
@ -10,13 +10,13 @@
<item android:state_enabled="false">
<shape android:shape="rectangle">
<solid android:color="@color/activity_background_light" />
<corners android:radius="18dp" />
<corners android:radius="@dimen/route_info_button_bg_line_radius" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="@null" />
<corners android:radius="18dp" />
<solid android:color="@color/card_and_list_background_light" />
<corners android:radius="@dimen/route_info_button_bg_line_radius" />
<stroke android:width="1dp" android:color="@color/divider_light" />
</shape>
</item>

View file

@ -1363,7 +1363,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
AndroidUtils.setBackground(app, viaButton, nightMode, R.drawable.btn_rounded_light, R.drawable.btn_rounded_dark);
AndroidUtils.setBackground(app, viaButtonContainer, nightMode, R.drawable.ripple_rounded_light, R.drawable.ripple_rounded_dark);
} else {
AndroidUtils.setBackground(app, viaButtonContainer, nightMode, R.drawable.btn_border_trans_rounded_light, R.drawable.btn_border_trans_rounded_dark);
AndroidUtils.setBackground(app, viaButtonContainer, nightMode, R.drawable.btn_trans_rounded_light, R.drawable.btn_trans_rounded_dark);
}
ImageView viaButtonImageView = (ImageView) mainView.findViewById(R.id.via_button_image_view);
@ -1423,7 +1423,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
AndroidUtils.setBackground(app, toButton, nightMode, R.drawable.btn_rounded_light, R.drawable.btn_rounded_dark);
AndroidUtils.setBackground(app, toButtonContainer, nightMode, R.drawable.ripple_rounded_light, R.drawable.ripple_rounded_dark);
} else {
AndroidUtils.setBackground(app, toButtonContainer, nightMode, R.drawable.btn_border_trans_rounded_light, R.drawable.btn_border_trans_rounded_dark);
AndroidUtils.setBackground(app, toButtonContainer, nightMode, R.drawable.btn_trans_rounded_light, R.drawable.btn_trans_rounded_dark);
}
ImageView toButtonImageView = (ImageView) mainView.findViewById(R.id.to_button_image_view);
@ -1495,7 +1495,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
AndroidUtils.setBackground(app, fromButton, nightMode, R.drawable.btn_rounded_light, R.drawable.btn_rounded_dark);
AndroidUtils.setBackground(app, fromButtonContainer, nightMode, R.drawable.ripple_rounded_light, R.drawable.ripple_rounded_dark);
} else {
AndroidUtils.setBackground(app, fromButtonContainer, nightMode, R.drawable.btn_border_trans_rounded_light, R.drawable.btn_border_trans_rounded_dark);
AndroidUtils.setBackground(app, fromButtonContainer, nightMode, R.drawable.btn_trans_rounded_light, R.drawable.btn_trans_rounded_dark);
}
ImageView swapDirectionView = (ImageView) mainView.findViewById(R.id.from_button_image_view);