Reputation: 3
Im a newbie on Android Programming. Im basically working on our UI but I have this situation wherein the text "Yes/No" is missing but it is functioning. The text are just missing.
I just got the code also here on stackoverflow.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sign_up);
}
public void onBackPressed(){
new AlertDialog.Builder(this)
.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle("")
.setMessage("Are you sure you want to cancel?")
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
finish();
}
})
.setNegativeButton("No",null)
.show();
It will be a great help for me if you answer. Thank you so much!
Upvotes: 0
Views: 577
Reputation: 1
For the latest android versions check your theme color in the color.xml file. "colorOnPrimary" color may be white change it to another color
Upvotes: 0
Reputation: 358
Its not missing please check your theme color in color.xml may be your colorAccent is white change it to other colour
Upvotes: 2