Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - getting proble at setclass

getting proble at setclass

Put your problem here if it does not fit any of the other categories.

getting proble at setclass

Postby srinivas.b » Thu Jan 20, 2011 1:36 pm

private Button navbutton;
this.navbutton = (Button)this.findViewById(R.id.Button01);
this.navbutton.setOnClickListener(new OnClickListener(){

public void onClick(View v) {

Intent intent;
intent = new Intent().setClass(this,loginnav.class);

startActivity(intent);
finish();
}
});
srinivas.b
Junior Developer
Junior Developer
 
Posts: 15
Joined: Thu Jan 13, 2011 12:14 pm

Top

Re: getting proble at setclass

Postby vengeance_mj » Thu Jan 20, 2011 9:30 pm

You need to pass the Context of the parent class, since the context is unapplicable within an annonymous inner class. Let us assume your parent class name ( the one which extends Activity) has name Parent, then write ur Intent as

intent = new Intent().setClass(Parent.this,loginnav.class);
vengeance_mj
Senior Developer
Senior Developer
 
Posts: 174
Joined: Thu Oct 29, 2009 2:32 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: MSNbot Media and 13 guests