Guys, Tried changing to an AlertBuilder but got the same result:
Builder loadDialog = new AlertDialog.Builder(this); loadDialog.setIcon(R.drawable.load); loadDialog.setTitle("Program Loading Center"); loadDialog.setMessage(""); View v = View.inflate(this, R.layout.load, null); final ListView lvList = (ListView) v.findViewById(R.id.lvList); lvList.setOnItemClickListener(new OnItemClickListener(){ @Override public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { removeDialog(DIALOG_LOAD_ID); FlurryAgent.onEvent("Load", null); } }); lvList.setAdapter(new DBAdapter(this)); loadDialog.setView(v); Everything is displayed just as expected but when I the function onItemClick is never fired (clicking on any of the items displayed at lvList, which inflated from the same layout containing textviews and a button, all over a relativelayout). Any other ideas? tnx On 7 set, 18:04, Gabriel Simões <gsim...@gmail.com> wrote: > what intrigates me is that the listeners for the buttons work > perfectly, plug & play. > :/ > > On 7 set, 17:54, Mark Murphy <mmur...@commonsware.com> wrote: > > > > > 2010/9/7 Gabriel Simões <gsim...@gmail.com>: > > > > If I´m not wrong I can´t inflate a layout on an alertdialog, right? > > > Sure you can. > > > > On this Layout I have more than a ListView (buttons and TextViews) so > > > to use an AlertDialog probably is not the best solution for me right > > > now. > > > That probably should not be a dialog. Use an activity. > > > > About the context, I didn´t get it. I thought that when I created a > > > dialog I should pass to it the context of the activity that created > > > it, am I wrong? > > > The Activity *is* a Context. Never call getApplicationContext(). > > > > If I don´t decide to use an alertdialog, is there a way to make it > > > work using a "pure" dialog? > > > Use an activity. Give it Theme.Dialog if you want it to look like a dialog. > > > -- > > Mark Murphy (a Commons > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > > Android Training in London:http://skillsmatter.com/go/os-mobile-server -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en