constructor
Şöyle yaparız.
Protected olduğı için dışarıdan çağrılamaz. Metodun içi şöyle
Protected olduğı için dışarıdan çağrılamaz. Metodun içi şöyle
Düğmelerin yerine değiştirmek için şöyle yaparız.
Şöyle yaparız.
Şöyle yaparız.
Şöyle yaparız.
AlertDialog alertDialog = new AlertDialog.Builder(this).create();Protected olduğı için dışarıdan çağrılamaz. Metodun içi şöyle
protected AlertDialog(Context context) {
  this(context, 0);
}Protected olduğı için dışarıdan çağrılamaz. Metodun içi şöyle
protected AlertDialog(Context context, @StyleRes int themeResId) {
  this(context, themeResId, true);
}Düğmelerin yerine değiştirmek için şöyle yaparız.
Button posBtn = (Button) alertDialog.findViewById(android.R.id.button1);
Button negBtn = (Button) alertDialog.findViewById(android.R.id.button2);
Button neuBtn = (Button) alertDialog.findViewById(android.R.id.button3);
//get parent ViewGroup
 ViewGroup parentLayout = (ViewGroup) posBtn.getParent();
//get child indexes
int posIndex = parentLayout.indexOfChild(posBtn);
int negindex = parentLayout.indexOfChild(negBtn);
int neuIndex = parentLayout.indexOfChild(neuBtn);
 parentLayout.removeAllViews();
 parentLayout.addView(neuIndex,posBtn); //< --- swapping neutral and positive
 parentLayout.addView(posIndex,neuBtn);
 parentLayout.addView(negIndex,negBtn); Şöyle yaparız.
// Setting OK Button
alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
  public void onClick(DialogInterface dialog, int which) {
  }
});Şöyle yaparız.
// Setting Dialog Message
alertDialog.setMessage(msg);
setTitle metodu
Şöyle yaparız.// Setting Dialog Title
alertDialog.setTitle("ERROR");
show metodu
Şöyle yaparız.// Showing Alert Message
alertDialog.show(); 
Hiç yorum yok:
Yorum Gönder