i am using the datepicker dialog to dispaly the dateformat dialog,i want to change the divders color of datepicker and how to customize the datepickerdailog for as three blue color divders are single line.how can i customize the datepicker dialog like second picture.
i got this dialog from datepickersdialog.
//i am using the code to display the the datepicker dialog is:
public class MainActivity extends Activity {
private EditText txtView;
private String initialDate;
private String initialMonth;
private String initialYear;
private DatePickerDialog dialog = null;
Context context;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button btn = (Button) findViewById(R.id.button1);
txtView = (EditText) findViewById(R.id.textView1);
context = getApplicationContext();
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Calendar dtTxt = null;
String preExistingDate = (String) txtView.getText().toString();
if (preExistingDate != null && !preExistingDate.equals("")) {
StringTokenizer st = new StringTokenizer(preExistingDate,
"/");
System.out.println("datepicker dialog if condition");
initialMonth = st.nextToken();
initialDate = st.nextToken();
initialYear = st.nextToken();
if (dialog == null)
dialog = new DatePickerDialog(v.getContext(),
new PickDate(), Integer.parseInt(initialYear),
Integer.parseInt(initialDate), Integer
.parseInt(initialMonth) - 1);
dialog.updateDate(Integer.parseInt(initialYear),
Integer.parseInt(initialDate),
Integer.parseInt(initialMonth) - 1);
} else {
dtTxt = Calendar.getInstance();
if (dialog == null)
System.out.println("datepicker dialog if condition else part");
dialog = new DatePickerDialog(v.getContext(),
new PickDate(), dtTxt.getTime().getYear(),
dtTxt.getTime().getDay(), dtTxt.getTime()
.getMonth());
dialog.updateDate(dtTxt.getTime().getYear(), dtTxt
.getTime().getDay(), dtTxt.getTime().getMonth());
dialog.setTitle("");
}
dialog.show();
}
});
}
private class PickDate implements DatePickerDialog.OnDateSetListener {
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
view.updateDate(year, monthOfYear, dayOfMonth);
txtView.setText(monthOfYear + "/" + dayOfMonth + "/" + year);
dialog.hide();
}
}
//i want to change the dialog divders like this:
should change the blue color line and i want take a complete line also like below picture: