xml formatting

removed click effect on base profile button in default app profiles
This commit is contained in:
madwasp79 2019-06-07 13:35:29 +03:00
parent dd2aa2aa08
commit 64f66afefa
4 changed files with 599 additions and 585 deletions

View file

@ -1,16 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"><shape android:shape="rectangle">
<solid android:color="@color/route_info_cancel_button_color_dark" />
<corners android:radius="@dimen/map_button_rect_rad" />
</shape></item>
<item android:state_enabled="false"><shape android:shape="rectangle">
<solid android:color="@color/searchbar_tab_inactive_light" />
<corners android:radius="@dimen/map_button_rect_rad" />
</shape></item>
<item><shape android:shape="rectangle">
<solid android:color="@color/ctx_menu_buttons_bg_dark" />
<corners android:radius="@dimen/map_button_rect_rad" />
</shape></item>
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="@color/route_info_cancel_button_color_dark"/>
<corners android:radius="@dimen/map_button_rect_rad"/>
</shape>
</item>
<item android:state_enabled="false">
<shape android:shape="rectangle">
<solid android:color="@color/searchbar_tab_inactive_light"/>
<corners android:radius="@dimen/map_button_rect_rad"/>
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="@color/ctx_menu_buttons_bg_dark"/>
<corners android:radius="@dimen/map_button_rect_rad"/>
</shape>
</item>
</selector>

View file

@ -1,17 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"><shape android:shape="rectangle">
<solid android:color="@color/active_buttons_and_links_trans_dark" />
<corners android:radius="@dimen/map_button_rect_rad" />
</shape></item>
<item android:state_enabled="false"><shape android:shape="rectangle">
<solid android:color="@color/inactive_buttons_and_links_dark" />
<corners android:radius="@dimen/map_button_rect_rad" />
</shape></item>
<item><shape android:shape="rectangle">
<solid android:color="@color/active_buttons_and_links_dark" />
<corners android:radius="@dimen/map_button_rect_rad" />
</shape></item>
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="@color/active_buttons_and_links_trans_dark"/>
<corners android:radius="@dimen/map_button_rect_rad"/>
</shape>
</item>
<item android:state_enabled="false">
<shape android:shape="rectangle">
<solid android:color="@color/inactive_buttons_and_links_dark"/>
<corners android:radius="@dimen/map_button_rect_rad"/>
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="@color/active_buttons_and_links_dark"/>
<corners android:radius="@dimen/map_button_rect_rad"/>
</shape>
</item>
</selector>

File diff suppressed because it is too large Load diff

View file

@ -208,24 +208,28 @@ public class EditProfileFragment extends BaseOsmAndFragment {
baseModeIcon.setImageDrawable(
app.getUIUtilities().getIcon(profile.iconId, R.color.icon_color));
}
typeSelectionBtn.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (isUserProfile || isNew) {
final SelectProfileBottomSheetDialogFragment dialog = new SelectProfileBottomSheetDialogFragment();
Bundle bundle = new Bundle();
if (profile.parent != null) {
bundle.putString(SELECTED_KEY, profile.parent.getStringKey());
}
bundle.putString(DIALOG_TYPE, TYPE_BASE_APP_PROFILE);
dialog.setArguments(bundle);
if (getActivity() != null) {
getActivity().getSupportFragmentManager().beginTransaction()
.add(dialog, "select_base_type").commitAllowingStateLoss();
if (isUserProfile || isNightMode) {
typeSelectionBtn.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (isUserProfile || isNew) {
final SelectProfileBottomSheetDialogFragment dialog = new SelectProfileBottomSheetDialogFragment();
Bundle bundle = new Bundle();
if (profile.parent != null) {
bundle.putString(SELECTED_KEY, profile.parent.getStringKey());
}
bundle.putString(DIALOG_TYPE, TYPE_BASE_APP_PROFILE);
dialog.setArguments(bundle);
if (getActivity() != null) {
getActivity().getSupportFragmentManager().beginTransaction()
.add(dialog, "select_base_type").commitAllowingStateLoss();
}
}
}
}
});
});
} else {
typeSelectionBtn.setClickable(false);
}
if (!Algorithms.isEmpty(mode.getRoutingProfile())) {
for (RoutingProfileDataObject r : routingProfileDataObjects) {