zz_moto_actionbar_bkg.xml resource error on Droid

徘徊边缘 提交于 2019-11-30 04:14:59

We hit this same bug and, at least in our case, it turned out to be due to running out of memory while an image associated with that layout was being loaded. The layout itself seems to be some skinning stuff Motorola is doing for the alert dialog (my assumption). The only way I found out it was an OutOfMemoryError is that our QA tester generated an adb bugreport when he hit the crash and I could see the OutOfMemoryError in the bugreport caused while attempting to decode an image (on the same thread on which the stack trace was generated).

Motorola phones are so annoying and sometimes can be spainful. I used to have current location icon not showing up on the google map only with motorola phones. They fixed the issue on ICS upgrade so all the efforts and time I spent to figure out the problem went to trash. And now I'm having this exactly the same issue with some users when alert dialog is opened. And the worst part is I can't reproduce this with the same phone, the same OS the user reported the bug.

you try this type code in alert dialog

{
myDialog = new Dialog(context);
myDialog.setContentView(R.layout.addfence_dialog);
myDialog.setTitle("EditFence");
myDialog.setCancelable(true);

strTitle = (EditText) myDialog.findViewById(R.id.add_dialog_edtTitle);
strArea = (EditText) myDialog.findViewById(R.id.add_dialog_edtArea);
strDescription = (EditText) myDialog.findViewById(R.id.add_dialog_edtDescription);
strTag = (EditText) myDialog.findViewById(R.id.add_dialog_edtTag);

save = (Button) myDialog.findViewById(R.id.add_dialog_btnSave);
cancel = (Button) myDialog.findViewById(R.id.add_dialog_btnCancel);

strTitle.setText(getTitle);
strArea.setText(getArea);
strDescription.setText(getDesc);
strTag.setText(getTag);

save.setOnClickListener(new OnClickListener() {
    public void onClick(View v) {
          .....
}
myDialog.show();
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!