List of usage examples for android.app AlertDialog THEME_HOLO_LIGHT
int THEME_HOLO_LIGHT
To view the source code for android.app AlertDialog THEME_HOLO_LIGHT.
Click Source Link
From source file:edu.tcfsh.arrivinglaterecordapp.MainActivity.java
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main_activity); getBundle();/*from w ww .j a v a2s. c o m*/ arrivingLateRecordFragment = new ArrivingLateRecordFragment(dayOfMonth, month, year); // Create the adapter that will return a fragment for each of the three // primary sections // of the app. mAppSectionsPagerAdapter = new AppSectionsPagerAdapter(getSupportFragmentManager()); leavingActivityDialog = new AlertDialog.Builder(this, AlertDialog.THEME_HOLO_LIGHT); leavingActivityDialog.setTitle("??"); leavingActivityDialog.setMessage("?"); leavingActivityDialog.setPositiveButton("", new DialogInterface.OnClickListener() { public void onClick(DialogInterface arg0, int arg1) { savingFileAlertDialog.show(); } }); leavingActivityDialog.setNegativeButton("?", new DialogInterface.OnClickListener() { public void onClick(DialogInterface arg0, int arg1) { } }); savingFileAlertDialog = new AlertDialog.Builder(this, AlertDialog.THEME_HOLO_LIGHT); savingFileAlertDialog.setTitle("??"); savingFileAlertDialog.setMessage("?????"); savingFileAlertDialog.setPositiveButton("", new DialogInterface.OnClickListener() { public void onClick(DialogInterface arg0, int arg1) { arrivingLateRecordFragment.saveArrivingLateRecordFile(); finish(); } }); savingFileAlertDialog.setNegativeButton("?", new DialogInterface.OnClickListener() { public void onClick(DialogInterface arg0, int arg1) { finish(); } }); // Set up the action bar. final ActionBar actionBar = getActionBar(); // Specify that the Home/Up button should not be enabled, since there is // no hierarchical // parent. actionBar.setHomeButtonEnabled(false); // Specify that we will be displaying tabs in the action bar. actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); // Set up the ViewPager, attaching the adapter and setting up a listener // for when the // user swipes between sections. mViewPager = (ViewPager) findViewById(R.id.pager); mViewPager.setAdapter(mAppSectionsPagerAdapter); mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() { @Override public void onPageSelected(int position) { // When swiping between different app sections, select // the corresponding tab. // We can also use ActionBar.Tab#select() to do this if // we have a reference to the // Tab. actionBar.setSelectedNavigationItem(position); } }); // For each of the sections in the app, add a tab to the action bar. for (int i = 0; i < mAppSectionsPagerAdapter.getCount(); i++) { // Create a tab with text corresponding to the page title defined by // the adapter. // Also specify this Activity object, which implements the // TabListener interface, as the // listener for when this tab is selected. actionBar.addTab( actionBar.newTab().setText(mAppSectionsPagerAdapter.getPageTitle(i)).setTabListener(this)); } }
From source file:cn.xcom.helper.activity.AuthorizedActivity.java
private void initView() { rl_back = (RelativeLayout) findViewById(R.id.rl_authorized_back); rl_back.setOnClickListener(this); iv_city = (ImageView) findViewById(R.id.iv_authorized_city); iv_city.setOnClickListener(this); iv_handheld_ID_card = (ImageView) findViewById(R.id.iv_authorized_handheld_ID_card); iv_handheld_ID_card.setOnClickListener(this); iv_ID_card = (ImageView) findViewById(R.id.iv_authorized_ID_card); iv_ID_card.setOnClickListener(this); iv_driving_license = (ImageView) findViewById(R.id.iv_authorized_driving_license); iv_driving_license.setOnClickListener(this); tv_city = (TextView) findViewById(R.id.tv_authorized_city); et_name = (EditText) findViewById(R.id.et_authorized_name); et_ID = (EditText) findViewById(R.id.et_authorized_ID); et_contact_name = (EditText) findViewById(R.id.et_authorized_emergency_contact_person_name); et_contact_phone = (EditText) findViewById(R.id.et_authorized_emergency_contact_person_phone); bt_next = (Button) findViewById(R.id.bt_authorized_next); bt_next.setOnClickListener(this); userInfo = new UserInfo(); dialog = new ProgressDialog(mContext, AlertDialog.THEME_HOLO_LIGHT); options = new DisplayImageOptions.Builder().bitmapConfig(Bitmap.Config.RGB_565) .imageScaleType(ImageScaleType.IN_SAMPLE_INT).showImageOnLoading(R.mipmap.ic_authorized_photo) .showImageOnFail(R.mipmap.ic_authorized_photo).cacheInMemory(true).cacheOnDisc(true) .considerExifParams(true).build(); }
From source file:org.distantshoresmedia.activities.Main.java
private void sharePressed() { View titleView = View.inflate(getApplicationContext(), R.layout.alert_title, null); ((TextView) titleView.findViewById(R.id.alert_title_text_view)).setText("Select Share Method"); AlertDialog dialogue = new AlertDialog.Builder(this, AlertDialog.THEME_HOLO_LIGHT).setCustomTitle(titleView) .setAdapter(/*from ww w .j a v a2 s .c o m*/ new ShareAdapter(getApplicationContext(), Arrays.asList("Send/Save Keyboards", "Receive/Load Keyboards")), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { switch (which) { case 0: { startActivity(new Intent(getApplicationContext(), ShareActivity.class)); break; } case 1: { startActivity(new Intent(getApplicationContext(), LoadActivity.class)); break; } default: { dialog.cancel(); } } } }) .setNegativeButton("Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }).create(); dialogue.show(); }
From source file:org.godotengine.godot.FireBase.java
public void alertMsg(String title, String message) { AlertDialog.Builder bld;/* ww w . j av a2 s. c o m*/ bld = new AlertDialog.Builder(activity, AlertDialog.THEME_HOLO_LIGHT); bld.setIcon(com.godot.game.R.drawable.icon); bld.setTitle(title); bld.setMessage(message); bld.setNeutralButton("OK", null); bld.create().show(); }
From source file:li.barter.fragments.SelectPreferredLocationFragment.java
/** * Show the dialog for the user to add his name, in case it's not already added *//* www.j a v a2 s .c om*/ protected void showEnableLocationDialog() { mEnableLocationDialogFragment = new EnableLocationDialogFragment(); mEnableLocationDialogFragment.show(AlertDialog.THEME_HOLO_LIGHT, 0, R.string.enable_location, R.string.enable_location_message, R.string.enable, R.string.cancel, 0, getFragmentManager(), true, FragmentTags.DIALOG_ENABLE_LOCATION); }
From source file:cn.xcom.helper.activity.AuthorizedActivity.java
private void showPickDialog() { new AlertDialog.Builder(this, AlertDialog.THEME_HOLO_LIGHT) .setNegativeButton("", new DialogInterface.OnClickListener() { @Override/* ww w . j av a 2 s . c o m*/ public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); Intent albumIntent = new Intent(); albumIntent.setType("image/*"); albumIntent.setAction(Intent.ACTION_PICK); startActivityForResult(albumIntent, PHOTO_REQUEST_ALBUM); } }).setPositiveButton("?", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); int permissionCheck = ContextCompat.checkSelfPermission(mContext, Manifest.permission.CAMERA); if (permissionCheck == PackageManager.PERMISSION_GRANTED) { Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); String state = Environment.getExternalStorageState(); if (state.equals(Environment.MEDIA_MOUNTED)) { File path = Environment .getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM); File file = new File(path, "51helper.jpg"); cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(file)); } startActivityForResult(cameraIntent, PHOTO_REQUEST_CAMERA); } else if (permissionCheck == PackageManager.PERMISSION_DENIED) { // Should we show an explanation? if (ActivityCompat.shouldShowRequestPermissionRationale((Activity) mContext, Manifest.permission.CAMERA)) { // Show an expanation to the user *asynchronously* -- don't block // this thread waiting for the user's response! After the user // sees the explanation, try again to request the permission. } else { // No explanation needed, we can request the permission. ActivityCompat.requestPermissions((Activity) mContext, new String[] { Manifest.permission.CAMERA }, MY_PERMISSIONS_REQUEST_READ_CONTACTS); // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an // app-defined int constant. The callback method gets the // result of the request. } } } }).show(); }
From source file:li.barter.fragments.LoginFragment.java
/** * Show the dialog for the user to enter his email address */// w ww .j a v a 2 s . com private void showForgotPasswordDialog() { mAddSingleEditTextDialogFragment = new AddSingleEditTextDialogFragment(); mAddSingleEditTextDialogFragment.show(AlertDialog.THEME_HOLO_LIGHT, 0, R.string.forgot_password, R.string.submit, R.string.cancel, 0, R.string.email_label, getFragmentManager(), true, FragmentTags.DIALOG_FORGOT_PASSWORD); }
From source file:org.godotengine.godot.auth.FacebookSignIn.java
public void askForPermission(final String title, final String message, final String perm, final boolean read) { new AlertDialog.Builder(activity, AlertDialog.THEME_HOLO_LIGHT) .setPositiveButton("Yes", new DialogInterface.OnClickListener() { @Override/*from w w w . j a va 2 s.c o m*/ public void onClick(DialogInterface dialog, int id) { if (!read) { requestPublishPermissions(Arrays.asList(perm)); } else { requestReadPermissions(Arrays.asList(perm)); } } }).setNegativeButton("No", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { } }).setTitle(title).setMessage(message).show(); }
From source file:com.tenth.space.ui.fragment.HomeFragment.java
private void showBrightnessAdjustDalog() { final SharedPreferences preferences = getActivity().getSharedPreferences("showBrightnessAdjustDalog", Context.MODE_PRIVATE); boolean needShow = preferences.getBoolean("needShow", true); if (needShow) { new AlertDialog.Builder(getActivity(), AlertDialog.THEME_HOLO_LIGHT).setTitle("??") .setMessage("?") .setNegativeButton("????", new DialogInterface.OnClickListener() { @Override//from www.j a v a 2 s.co m public void onClick(DialogInterface dialog, int which) { SharedPreferences.Editor editor = preferences.edit(); editor.putBoolean("needShow", false); editor.commit(); } }).setPositiveButton("?", null).create().show(); } }
From source file:li.barter.fragments.EditProfileFragment.java
/** * Method to handle click on profile image *///from w ww . j a v a 2s . c o m private void showChoosePictureSourceDialog() { mChoosePictureDialogFragment = new SingleChoiceDialogFragment(); mChoosePictureDialogFragment.show(AlertDialog.THEME_HOLO_LIGHT, R.array.take_photo_choices, 0, R.string.take_picture, getFragmentManager(), true, FragmentTags.DIALOG_TAKE_PICTURE); }