Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all!
i have a gridView, inner is Buttons.
so, had to create event OnClick() is switch to display2.
C++
public void ClickGridView(View v)
{
   Intent myIntent = new Intent(v.getContext(), display2.class);
   startActivity(myIntent);
   finish();
}

so, code xml is
HTML
<Button
       android:id ="@+id/buttonSwitch"
       android: önClick = "ClickGridView">
</Button>


i had read at LogCat.
error is line startActivity(myIntent);
plz help me fix it!
thanks so much
Posted

Wow, i have fix it.
insert
HTML
<activity android:name=".display2" xmlns:android="#unknown">
</activity>

at xml file ActivityMainfest.xml
 
Share this answer
 
In the XML, your onClick has a strange o character, change that to a normal "o" and it should work better.
 
Share this answer
 
Comments
dev C plus 22-May-13 22:51pm    
hi!
thanks for it
the bug is not fix.
if the bug is charater "o", project is not compiled

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900