Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Marked as private warning after changing colour of up arrow

Tags:

After defining a custom colour for the back arrow in the action bar, a warning is then returned. What can be done to get rid of this warning?

        final Drawable upArrow = ContextCompat.getDrawable(this, R.drawable.abc_ic_ab_back_mtrl_am_alpha);
        upArrow.setColorFilter(Color.BLUE, PorterDuff.Mode.SRC_ATOP);
        actionBar.setHomeAsUpIndicator(upArrow);

The resource @drawable/abc_ic_ab_back_mtrl_am_alpha is marked as private in com.android.support:appcompat-v7

like image 522
wbk727 Avatar asked Oct 03 '15 20:10

wbk727


1 Answers

See Choose resources to make public for the reason.

In short, drawable/abc_ic_ab_back_mtrl_am_alpha is a private resource of appcompat-v7 and is intended to be used only by that library. You should not use it.

If you really want to use it, copy it to your project

like image 194
don't panic Avatar answered Sep 21 '22 15:09

don't panic