You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Occasionally when I go back to the app and it resumes, it crashes and I see this exception:
android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.content.res.Resources.getValue(Resources.java:1316)
at android.content.res.Resources.getDrawable(Resources.java:812)
at android.content.Context.getDrawable(Context.java:403)
at android.support.v4.content.ContextCompatApi21.getDrawable(ContextCompatApi21.java:26)
at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:319)
at org.onebusaway.android.ui.AlertList$Adapter.initView(AlertList.java:78)
at org.onebusaway.android.ui.AlertList$Adapter.initView(AlertList.java:60)
at org.onebusaway.android.util.ArrayAdapter.getView(ArrayAdapter.java:73)
at android.widget.AbsListView.obtainView(AbsListView.java:2390)
at android.widget.ListView.measureHeightOfChildren(ListView.java:1270)
at android.widget.ListView.onMeasure(ListView.java:1182)
Looks like its caused by this code getting the drawable for the AlertList:
int drawableRight = clickable ? R.drawable.ic_navigation_chevron_right : 0;
int iconColor = R.color.header_text_color;
Drawable drawable = ContextCompat
.getDrawable(Application.get().getApplicationContext(), drawableRight); // <- This line throws the exception
Drawable wrappedDrawable = DrawableCompat.wrap(drawable);
wrappedDrawable = wrappedDrawable.mutate();
The text was updated successfully, but these errors were encountered:
…source ID
Currently, we're calling ContextCompat.getDrawable() with the value of 0 when its not clickable, which causes the `android.content.res.Resources$NotFoundException: Resource ID #0x0` exception
For
develop
branch:Occasionally when I go back to the app and it resumes, it crashes and I see this exception:
Looks like its caused by this code getting the drawable for the AlertList:
The text was updated successfully, but these errors were encountered: