Java Code Examples for android.app.AlertDialog#THEME_HOLO_LIGHT

The following examples show how to use android.app.AlertDialog#THEME_HOLO_LIGHT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DialogFactory.java    From FlowGeek with GNU General Public License v2.0 5 votes vote down vote up
public int getTheme(Context context){
    SharedPreferences preferences = SharePreferenceManager.getApplicationSetting(context);
    int theme = preferences.getInt(ApplicationSetting.KEY_THEME, ApplicationTheme.LIGHT.getKey());
    if (theme == ApplicationTheme.LIGHT.getKey()){
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            return android.R.style.Theme_Material_Light_Dialog_Alert;
        }else return AlertDialog.THEME_HOLO_LIGHT;
    }else{
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            return android.R.style.Theme_Material_Dialog_Alert;
        }else return AlertDialog.THEME_HOLO_DARK;
    }
}
 
Example 2
Source File: DatePickerManager.java    From Birdays with Apache License 2.0 5 votes vote down vote up
/**
 * Set correct theme for day/night modes
 */
private int setTheme(boolean nightMode) {
    if (nightMode) {
        return AlertDialog.THEME_HOLO_DARK;
    } else {
        return AlertDialog.THEME_HOLO_LIGHT;
    }
}
 
Example 3
Source File: SearchActivity.java    From quickmark with MIT License 5 votes vote down vote up
@Override
protected Dialog onCreateDialog(int id)// ��дonCreateDialog����
{
	switch (id) {
	case DATE_DIALOG_ID:// ��������ѡ��Ի���
		return new DatePickerDialog(this, AlertDialog.THEME_HOLO_LIGHT,
				mDateSetListener, mYear, mMonth, mDay);
	}
	return null;
}
 
Example 4
Source File: Lens.java    From DistroHopper with GNU General Public License v3.0 5 votes vote down vote up
protected void showDialog (String message, boolean error)
{
	AlertDialog.Builder dlg;
	dlg = new AlertDialog.Builder (this.context, error ? AlertDialog.THEME_HOLO_DARK : AlertDialog.THEME_HOLO_LIGHT);
	dlg.setMessage (message);
	dlg.setCancelable (true);
	dlg.setNeutralButton ("OK", null);

	dlg.show ();
}
 
Example 5
Source File: EditProfile_Fragment.java    From Android with MIT License 4 votes vote down vote up
public void showDatePicker() {
    DatePickerDialog cc = new DatePickerDialog(getActivity(), AlertDialog.THEME_HOLO_LIGHT, dateSetListener, 1990,
            1, 1);
    cc.show();
}
 
Example 6
Source File: SignupFragment.java    From Android with MIT License 4 votes vote down vote up
public void showDatePicker() {
    DatePickerDialog cc = new DatePickerDialog(getActivity(), AlertDialog.THEME_HOLO_LIGHT, dateSetListener, 2008,
            1, 1);
    cc.show();
}