Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat and determine where you are hanging when the force-close dialog appears.
On Fri, Sep 23, 2011 at 1:47 AM, Sandeep Lulla <[email protected]> wrote: > I am inflating a view using service in android. I want to add listener > to button in the view. But i am facing not responding error. > > Here's my code : > > LayoutInflater layoutInflater = > (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE); > > view=layoutInflater.inflate(R.layout.example,null); > > Button btn = (Button) view.findViewById(R.id.Button01); > > btn.setOnClickListener(myClickListener); > > myClickListener = new OnClickListener() { > public void onClick(View v) { > > Toast.makeText(this, "My button clicked", > Toast.LENGTH_LONG).show(); > } > wm.addView(view, localLayoutParams); > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

