Merge pull request #4078 from osmandapp/move_to_26_api

Fix crash connected with arrow from support library
This commit is contained in:
Alexey 2017-07-10 12:35:04 +03:00 committed by GitHub
commit 4fa889005b
22 changed files with 24 additions and 24 deletions

View file

@ -399,7 +399,7 @@
android:layout_height="56dp"
android:layout_gravity="top"
android:contentDescription="@string/back_to_search"
android:src="@drawable/abc_ic_ab_back_material"/>
android:src="@drawable/ic_arrow_back"/>
<LinearLayout
android:id="@+id/widget_top_bar_title_layout"

View file

@ -30,7 +30,7 @@
android:layout_height="56dp"
android:layout_gravity="top"
android:contentDescription="@string/back_to_search"
android:src="@drawable/abc_ic_ab_back_material"/>
android:src="@drawable/ic_arrow_back"/>
<LinearLayout
android:id="@+id/top_bar_title_layout"

View file

@ -18,7 +18,7 @@
android:layout_gravity="left"
android:background="@drawable/dashboard_button_light"
android:scaleType="center"
android:src="@drawable/abc_ic_ab_back_material"
android:src="@drawable/ic_arrow_back"
tools:visibility="visible"/>
<ImageView

View file

@ -10,7 +10,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/shared_string_help"
app:navigationIcon="@drawable/abc_ic_ab_back_material"
app:navigationIcon="@drawable/ic_arrow_back"
app:theme="?attr/toolbar_theme"
android:background="?attr/pstsTabBackground"/>

View file

@ -176,7 +176,7 @@
android:layout_height="56dp"
android:layout_gravity="top"
android:contentDescription="@string/back_to_search"
android:src="@drawable/abc_ic_ab_back_material"/>
android:src="@drawable/ic_arrow_back"/>
<LinearLayout
android:id="@+id/widget_top_bar_title_layout"

View file

@ -44,7 +44,7 @@ public abstract class ActionBarPreferenceActivity extends AppCompatPreferenceAct
shadowView = null;
}
tb.setClickable(true);
tb.setNavigationIcon(((OsmandApplication) getApplication()).getIconsCache().getIcon(R.drawable.abc_ic_ab_back_material));
tb.setNavigationIcon(((OsmandApplication) getApplication()).getIconsCache().getIcon(R.drawable.ic_arrow_back));
tb.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
tb.setBackgroundColor(getResources().getColor(getResIdFromAttribute(this, R.attr.pstsTabBackground)));
tb.setTitleTextColor(getResources().getColor(getResIdFromAttribute(this, R.attr.pstsTextColor)));

View file

@ -105,7 +105,7 @@ public class FavoritesSearchFragment extends DialogFragment {
}
toolbar = (Toolbar) view.findViewById(R.id.toolbar);
toolbar.setNavigationIcon(app.getIconsCache().getThemedIcon(R.drawable.abc_ic_ab_back_material));
toolbar.setNavigationIcon(app.getIconsCache().getThemedIcon(R.drawable.ic_arrow_back));
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
toolbar.setNavigationOnClickListener(
new View.OnClickListener() {

View file

@ -17,7 +17,7 @@ public class OsmandActionBarActivity extends AppCompatActivity {
//should be called after set content view
protected void setupHomeButton(){
Drawable back = ((OsmandApplication)getApplication()).getIconsCache().getIcon(R.drawable.abc_ic_ab_back_material);
Drawable back = ((OsmandApplication)getApplication()).getIconsCache().getIcon(R.drawable.ic_arrow_back);
back.setColorFilter(ContextCompat.getColor(this, R.color.color_white), PorterDuff.Mode.MULTIPLY);
final ActionBar supportActionBar = getSupportActionBar();
if (supportActionBar != null) {

View file

@ -108,7 +108,7 @@ public class ShowRouteInfoDialogFragment extends DialogFragment {
view = inflater.inflate(R.layout.route_info_layout, container, false);
Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
toolbar.setNavigationIcon(getMyApplication().getIconsCache().getThemedIcon(R.drawable.abc_ic_ab_back_material));
toolbar.setNavigationIcon(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_arrow_back));
toolbar.setNavigationContentDescription(R.string.shared_string_close);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override

View file

@ -487,7 +487,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
lst.setVisibility(View.GONE);
ImageView back = (ImageView) dashboardView.findViewById(R.id.toolbar_back);
back.setImageDrawable(
getMyApplication().getIconsCache().getIcon(R.drawable.abc_ic_ab_back_material));
getMyApplication().getIconsCache().getIcon(R.drawable.ic_arrow_back));
back.setOnClickListener(new View.OnClickListener() {
@Override

View file

@ -101,7 +101,7 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow
activity.getAccessibilityAssistant().registerPage(view, DownloadActivity.DOWNLOAD_TAB_NUMBER);
toolbar = (Toolbar) view.findViewById(R.id.toolbar);
toolbar.setNavigationIcon(getMyApplication().getIconsCache().getIcon(R.drawable.abc_ic_ab_back_material));
toolbar.setNavigationIcon(getMyApplication().getIconsCache().getIcon(R.drawable.ic_arrow_back));
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override

View file

@ -97,7 +97,7 @@ public class SearchDialogFragment extends DialogFragment implements DownloadEven
searchText = "";
Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
toolbar.setNavigationIcon(R.drawable.abc_ic_ab_back_material);
toolbar.setNavigationIcon(R.drawable.ic_arrow_back);
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override

View file

@ -49,7 +49,7 @@ public abstract class PointEditorFragment extends Fragment {
Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
toolbar.setTitle(getToolbarTitle());
toolbar.setNavigationIcon(getMyApplication().getIconsCache().getIcon(R.drawable.abc_ic_ab_back_material));
toolbar.setNavigationIcon(getMyApplication().getIconsCache().getIcon(R.drawable.ic_arrow_back));
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
toolbar.setTitleTextColor(getResources().getColor(getResIdFromAttribute(getMapActivity(), R.attr.pstsTextColor)));
toolbar.setNavigationOnClickListener(new View.OnClickListener() {

View file

@ -168,7 +168,7 @@ public class TrackDetailsMenuFragment extends Fragment {
ImageButton backButton = (ImageButton) mainView.findViewById(R.id.top_bar_back_button);
if (backButton != null) {
backButton.setImageDrawable(ctx.getMyApplication().getIconsCache().getIcon(R.drawable.abc_ic_ab_back_material, R.color.color_white));
backButton.setImageDrawable(ctx.getMyApplication().getIconsCache().getIcon(R.drawable.ic_arrow_back, R.color.color_white));
}
}

View file

@ -132,7 +132,7 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment {
Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
toolbar.setTitle(isAddingPoi ? R.string.poi_create_title : R.string.poi_edit_title);
toolbar.setNavigationIcon(R.drawable.abc_ic_ab_back_material);
toolbar.setNavigationIcon(R.drawable.ic_arrow_back);
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override

View file

@ -713,7 +713,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
ll.setOrientation(LinearLayout.VERTICAL);
Toolbar tb = new Toolbar(this);
tb.setClickable(true);
Drawable back = ((OsmandApplication) getApplication()).getIconsCache().getIcon(R.drawable.abc_ic_ab_back_material);
Drawable back = ((OsmandApplication) getApplication()).getIconsCache().getIcon(R.drawable.ic_arrow_back);
tb.setNavigationIcon(back);
tb.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
tb.setTitle(R.string.osmo_sign_in);

View file

@ -152,7 +152,7 @@ public class CreateEditActionDialog extends DialogFragment {
toolbar.setTitleTextColor(Color.WHITE);
toolbar.setNavigationIcon(getIconsCache().getIcon(
R.drawable.abc_ic_ab_back_material,
R.drawable.ic_arrow_back,
R.color.color_white));
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);

View file

@ -108,7 +108,7 @@ public class QuickActionListFragment extends BaseOsmAndFragment implements Quick
private void setUpToolbar(View view) {
Toolbar toolbar = (Toolbar) view.findViewById(R.id.custom_toolbar);
Drawable back = getMyApplication().getIconsCache().getIcon(R.drawable.abc_ic_ab_back_material);
Drawable back = getMyApplication().getIconsCache().getIcon(R.drawable.ic_arrow_back);
back.setColorFilter(ContextCompat.getColor(getContext(), R.color.color_white), PorterDuff.Mode.MULTIPLY);
toolbar.setNavigationIcon(back);
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);

View file

@ -107,7 +107,7 @@ public class QuickSearchCoordinatesFragment extends DialogFragment implements Os
view = inflater.inflate(R.layout.search_advanced_coords, container, false);
Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
toolbar.setNavigationIcon(app.getIconsCache().getIcon(R.drawable.abc_ic_ab_back_material));
toolbar.setNavigationIcon(app.getIconsCache().getIcon(R.drawable.ic_arrow_back));
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override

View file

@ -409,7 +409,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
);
toolbar = (Toolbar) view.findViewById(R.id.toolbar);
toolbar.setNavigationIcon(app.getIconsCache().getThemedIcon(R.drawable.abc_ic_ab_back_material));
toolbar.setNavigationIcon(app.getIconsCache().getThemedIcon(R.drawable.ic_arrow_back));
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
toolbar.setNavigationOnClickListener(
new OnClickListener() {

View file

@ -327,7 +327,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
final Toolbar topBar = new Toolbar(ctx);
topBar.setClickable(true);
Drawable back = app.getIconsCache().getIcon(R.drawable.abc_ic_ab_back_material);
Drawable back = app.getIconsCache().getIcon(R.drawable.ic_arrow_back);
topBar.setNavigationIcon(back);
topBar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
topBar.setTitle(title);
@ -435,7 +435,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
final Toolbar topBar = new Toolbar(ctx);
topBar.setClickable(true);
Drawable back = app.getIconsCache().getIcon(R.drawable.abc_ic_ab_back_material);
Drawable back = app.getIconsCache().getIcon(R.drawable.ic_arrow_back);
topBar.setNavigationIcon(back);
topBar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
topBar.setTitle(title);

View file

@ -275,8 +275,8 @@ public class MapInfoWidgetsFactory {
int bgLightLandId = R.drawable.btn_round;
int bgDarkLandId = R.drawable.btn_round_night;
int backBtnIconLightId = R.drawable.abc_ic_ab_back_material;
int backBtnIconDarkId = R.drawable.abc_ic_ab_back_material;
int backBtnIconLightId = R.drawable.ic_arrow_back;
int backBtnIconDarkId = R.drawable.ic_arrow_back;
int backBtnIconClrLightId = R.color.icon_color;
int backBtnIconClrDarkId = 0;