In one Activity
(it's a SherlockActivity
, by the way) of my Android application, I have a normal ListView
.
For that ListView
, I set an AdapterView.OnItemClickListener
via getListView().setOnItemClickListener(...)
.
And in that listener, an AlertDialog
is built using the AlertDialog.Builder
class and then it is shown to the user:
getListView().setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, final View v, int position, long id) {
AlertDialog.Builder builder = new AlertDialog.Builder(MyActivity.this);
...
builder.setMessage(Html.fromHtml(...));
builder.show();
}
}
Now exactly when builder.show()
is called, the following warning does always appear in LogCat:
W/ResourceType(463): Failure getting entry for 0x010802c9 (t=7 e=713) in package 0 (error -75)
Where does this come from? To me, it seems this is out of my control, as it appears with builder.show()
, so that this warning is maybe generated somewhere in the sources for the AlertDialog
class. Is this true?
If not, how can I find which resource is missing? How to debug this warning?
Edit: There's no corresponding entry for 0x010802c9
(or whichever value that is at run time) in R.java
, so I really don't know how to debug this.
Are you trying to open it from worker thread instead of GUI thread? You can check if the thread is GUI thread with:
Looper.myLooper() == Looper.getMainLooper()
In order to be sure that it is opened from GUI thread, use handler or runOnUiThread method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With