List of usage examples for android.app Dialog setTitle
public void setTitle(@StringRes int titleId)
From source file:org.lunci.dumbthing.dialog.LinkShareDialog.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { final Dialog dialog = super.onCreateDialog(savedInstanceState); dialog.setTitle(getResources().getString(R.string.link_accounts)); dialog.setCanceledOnTouchOutside(true); dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { dialog.getWindow().setIcon(R.drawable.ic_link_share); }/*from w w w. j a v a 2 s . c om*/ return dialog; }
From source file:org.gnucash.android.ui.transaction.dialog.TransferFundsDialogFragment.java
@NonNull @Override/*ww w .j a v a2s . c om*/ public Dialog onCreateDialog(Bundle savedInstanceState) { Dialog dialog = super.onCreateDialog(savedInstanceState); dialog.setTitle(R.string.title_transfer_funds); return dialog; }
From source file:com.adithya321.sharesanalysis.fragments.FundFlowFragment.java
@Nullable @Override//from w w w .ja v a 2 s .c om public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { ViewGroup root = (ViewGroup) inflater.inflate(R.layout.fragment_fund_flow, container, false); Window window = getActivity().getWindow(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) window.setStatusBarColor(getResources().getColor(R.color.colorPrimaryDark)); ((AppCompatActivity) getActivity()).getSupportActionBar() .setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.colorPrimary))); databaseHandler = new DatabaseHandler(getContext()); fundIn = (TextView) root.findViewById(R.id.fund_in); fundOut = (TextView) root.findViewById(R.id.fund_out); fundsListView = (ListView) root.findViewById(R.id.funds_list_view); setViews(); FloatingActionButton addFundFab = (FloatingActionButton) root.findViewById(R.id.add_fund_fab); addFundFab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { final Dialog dialog = new Dialog(getContext()); dialog.setTitle("Add Fund Flow"); dialog.setContentView(R.layout.dialog_add_fund); dialog.getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT); dialog.show(); Calendar calendar = Calendar.getInstance(); year_start = calendar.get(Calendar.YEAR); month_start = calendar.get(Calendar.MONTH) + 1; day_start = calendar.get(Calendar.DAY_OF_MONTH); final Button selectDate = (Button) dialog.findViewById(R.id.select_date); selectDate.setText(new StringBuilder().append(day_start).append("/").append(month_start).append("/") .append(year_start)); selectDate.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Dialog dialog = new DatePickerDialog(getActivity(), onDateSetListener, year_start, month_start - 1, day_start); dialog.setOnDismissListener(new DialogInterface.OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { selectDate.setText(new StringBuilder().append(day_start).append("/") .append(month_start).append("/").append(year_start)); } }); dialog.show(); } }); final EditText amount = (EditText) dialog.findViewById(R.id.amount); Button addFundBtn = (Button) dialog.findViewById(R.id.add_fund_btn); addFundBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Fund fund = new Fund(); fund.setId(databaseHandler.getNextKey("fund")); String stringStartDate = year_start + " " + month_start + " " + day_start; DateFormat format = new SimpleDateFormat("yyyy MM dd", Locale.ENGLISH); try { Date date = format.parse(stringStartDate); fund.setDate(date); } catch (Exception e) { Toast.makeText(getActivity(), "Invalid Date", Toast.LENGTH_SHORT).show(); return; } try { fund.setAmount(Double.parseDouble(amount.getText().toString())); } catch (Exception e) { Toast.makeText(getActivity(), "Invalid Amount", Toast.LENGTH_SHORT).show(); return; } if (((RadioButton) dialog.findViewById(R.id.radioBtn_fund_in)).isChecked()) fund.setType("in"); else if (((RadioButton) dialog.findViewById(R.id.radioBtn_fund_out)).isChecked()) fund.setType("out"); else { Toast.makeText(getActivity(), "Invalid Fund Type", Toast.LENGTH_SHORT).show(); return; } databaseHandler.addFund(fund); setViews(); dialog.dismiss(); } }); } }); return root; }
From source file:com.linroid.pushapp.ui.home.DeviceTokenDialog.java
@NonNull @Override// w w w . ja va 2 s. c om public Dialog onCreateDialog(Bundle savedInstanceState) { Dialog dialog = super.onCreateDialog(savedInstanceState); // dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setTitle(R.string.title_device_qrcode); WindowManager.LayoutParams lp = new WindowManager.LayoutParams(); lp.copyFrom(dialog.getWindow().getAttributes()); lp.width = WindowManager.LayoutParams.MATCH_PARENT; lp.height = WindowManager.LayoutParams.WRAP_CONTENT; lp.gravity = Gravity.CENTER; dialog.getWindow().setAttributes(lp); return dialog; }
From source file:org.cirrus.mobi.pegel.PegelFragmentsActivity.java
private Dialog createAboutDialog() { Dialog dialog = new Dialog(this); dialog.setContentView(R.layout.about_dialog); dialog.setTitle("About Pegel-Online v." + app_ver); TextView text = (TextView) dialog.findViewById(R.id.about_d_text); text.setText(R.string.about);//from w w w . jav a2 s .c o m ImageView image = (ImageView) dialog.findViewById(R.id.about_d_logo); image.setImageResource(R.drawable.icon); return dialog; }
From source file:de.awisus.refugeeaidleipzig.views.profile.FragmentEditOffer.java
private void forExistingOffer(Dialog dialog) { dialog.setTitle(R.string.titel_bearbeite_angebot); LatLng latLng = angebot.getLatLng(); ImageUtility.setIvImage(ivOffer, angebot.getImageData()); etTitel.setText(angebot.toString()); try {/*from w ww . j a va2s .com*/ String address = LocationUtility.latlngToStreet(latLng, getActivity()); String city = LocationUtility.latlngToCity(latLng, getActivity()); etStreet.setText(address); etPostal.setText(city); } catch (IOException ex) { Log.e("Set offer Address", ex.getMessage()); } etDescription.setText(angebot.getContent()); }
From source file:com.wrmndfzzy.atomize.intro.IntroActivity.java
protected void permissionsDialog() { final Dialog pDialog = new Dialog(IntroActivity.this); pDialog.requestWindowFeature(Window.FEATURE_NO_TITLE); pDialog.setTitle("Missing Permissions"); pDialog.setContentView(R.layout.intro_permissions_dialog); pDialogConfirm = (Button) pDialog.findViewById(R.id.ipDialogConfirm); pDialogConfirm.setOnClickListener(new View.OnClickListener() { @Override/*from w w w .j av a2s.co m*/ public void onClick(View v) { pDialog.dismiss(); IntroActivity.this.finish(); } }); pDialog.show(); }
From source file:com.privacity.PerfilActivity.java
public void cancelarPerfil(View view) { JSONObject jsonObject = com.cancelarPerfil(codigo); Dialog dialogo = new Dialog(this); //Tratamiento de errores if (jsonObject.has("Error") || jsonObject.has("detail")) { dialogo.setTitle(getResources().getString(R.string.errorDeConexion)); try {/*from ww w . j av a2 s.c om*/ String error = jsonObject.getString("Error"); dialogo.setTitle(error); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } } //IF else { //Si ha tenido exito dialogo.setTitle((getResources().getString(R.string.perfilCancelado))); botonCancelar.setVisibility(View.INVISIBLE); botonAceptar.setVisibility(View.VISIBLE); } dialogo.show(); }
From source file:com.owncloud.android.ui.dialog.SyncedFolderPreferencesDialogFragment.java
@Override @NonNull/* w w w .ja v a2s . c om*/ public Dialog onCreateDialog(Bundle savedInstanceState) { final Dialog dialog = super.onCreateDialog(savedInstanceState); dialog.setTitle(null); return dialog; }
From source file:com.privacity.PermisosActivity.java
public void validar(View view) { JSONObject jsonObject = comm.modificarPermisosPorPalabras(lconversor()); Dialog dialogo = new Dialog(this); if (jsonObject.has("Error")) { dialogo.setTitle(R.string.errorDeConexion); } else {/*from w ww . jav a2 s. co m*/ dialogo.setTitle(R.string.permisosModificados); } dialogo.show(); }