I am showing a AlertDialog
which is showing some list data but the title of Dialog and data are not showing in Same alignment there is some extra padding given from left to AlertDialog's
title and Dialog looks like this :
Code :
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Search on the basis of :");
builder.setCancelable(false);
final ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(OrdersActivity.this, android.R.layout.select_dialog_item);
arrayAdapter.add("Order Name");
arrayAdapter.add("Order Date");
builder.setAdapter(arrayAdapter, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
String strName = arrayAdapter.getItem(which);
adapter.searchType(strName);
}
});
builder.show();
Can anyone tell me How to remove that extra padding from dialog title ?