Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
the error is occurring with this code like "unfortunately stop"

What I have tried:

Textview lblalert = (TextView)findViewById(R.id.txtm);
lblalert.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
AlertDialog alert = new AlertDialog.Builder(Home.this).create();
alert.setTitle("Alert");
alert.setMessage("You are not registered BBN member. To see the detail please cantact to administrator");
alert.show();
}
});
Posted
Updated 20-May-16 22:02pm
Comments
Richard MacCutchan 20-May-16 3:38am    
You need to use your debugger, or check the log output, to isolate where the app stops.

Check this out android dialogs[^]
 
Share this answer
 
Android only have toast which is equivalent of messagebox
Android Toast Example - javatpoint[^]
Toasts | Android Developers[^]
 
Share this answer
 
Comments
Richard MacCutchan 21-May-16 4:09am    
That is not true, see Peter's solution.

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