Example usage for android.app Dialog setTitle

List of usage examples for android.app Dialog setTitle

Introduction

In this page you can find the example usage for android.app Dialog setTitle.

Prototype

public void setTitle(@StringRes int titleId) 

Source Link

Document

Set the title text for this dialog's window.

Usage

From source file:de.awisus.refugeeaidleipzig.views.login.FragmentAnmelden.java

/**
 * Called when this dialogue is created; Android-specific
 * Inflates the layout, initialises text field and spinner, initialises the spinner adapter to
 * show up accommodations and sets the dialogue buttons
 *
 * @param savedInstanceState Bundle of saved instance state
 * @return dialogue created by the AlertDialog.Builder
 *//*from   w w w .  j  a v a2  s .com*/
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    Button btAnmelden, btNeu;
    AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
    View view = getActivity().getLayoutInflater().inflate(R.layout.fragment_anmelden, null);

    warnungID = R.string.warnung_anmelden;

    etName = (EditText) view.findViewById(R.id.etName);
    etPasswort = (EditText) view.findViewById(R.id.etPassword);
    btAnmelden = (Button) view.findViewById(R.id.btAnmelden);
    btNeu = (Button) view.findViewById(R.id.btNeu);

    btAnmelden.setOnClickListener(this);
    btNeu.setOnClickListener(this);

    builder.setView(view);

    Dialog dialog = builder.create();
    dialog.setTitle(R.string.titel_login);
    dialog.setCancelable(false);
    dialog.setCanceledOnTouchOutside(false);

    return dialog;
}

From source file:com.kii.sample.balance.samples.SampleLoginDialogFragment.java

@NonNull
@Override/*from w  w w . j a va  2 s. c  o m*/
public Dialog onCreateDialog(Bundle savedInstanceState) {
    Dialog dialog = super.onCreateDialog(savedInstanceState);
    dialog.setTitle(R.string.login_kii_cloud);
    return dialog;
}

From source file:com.androzic.waypoint.WaypointProject.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    Dialog dialog = super.onCreateDialog(savedInstanceState);
    dialog.setTitle(R.string.waypointproject_name);
    return dialog;
}

From source file:com.kii.sample.balance.samples.SampleRegistrationDialogFragment.java

@NonNull
@Override//  w w  w.  j  ava  2 s.  c o  m
public Dialog onCreateDialog(Bundle savedInstanceState) {
    Dialog dialog = super.onCreateDialog(savedInstanceState);
    dialog.setTitle(R.string.register_kii_cloud);
    return dialog;
}

From source file:nz.ac.otago.psyanlab.common.designer.program.object.PickObjectDialogueFragment.java

@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    Dialog dialog = getDialog();
    dialog.setTitle(R.string.title_dialogue_pick_object);
    dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);

    Bundle args = getArguments();/*  ww  w .  ja va2  s  .com*/
    if (args != null) {
        mCallerId = args.getLong(ARG_CALLER_ID, INVALID_ID);
        mCallerKind = args.getInt(ARG_CALLER_KIND);
        mFilter = args.getInt(ARG_FILTER);
        mRequestCode = args.getInt(ARG_REQUEST_CODE);
    }

    if (mCallerId == INVALID_ID) {
        throw new RuntimeException("Invalid caller object id given.");
    }

    mFragmentFactory = new FragmentFactory(mCallerKind, mCallerId, mFilter);
    mViews = new ViewHolder(view);
    mViews.initViews();
}

From source file:com.privacity.ListaPerfilActivity.java

@Override
protected void onResume() {
    super.onResume();

    Eventos = new ArrayList<HashMap<String, String>>();
    com = new ConexionSiabra(this);
    JSONObject jsonObject = com.getListaPerfiles();

    String[] perfiles = this.getIntent().getStringArrayExtra("perfiles");
    String[] perfilesCodigo = this.getIntent().getStringArrayExtra("perfilesCodigo");

    if (!jsonObject.has("Error") && !jsonObject.has("detail")) {
        try {//from w  w  w  .  ja v a  2  s.  co m
            perfiles = new String[jsonObject.length()];
            perfilesCodigo = new String[jsonObject.length()];
            for (int i = 0; i < jsonObject.length(); i++) {
                JSONArray array = jsonObject.getJSONArray(String.valueOf(i));
                perfiles[i] = array.getString(0);
                perfilesCodigo[i] = array.getString(1);
            }
        } catch (JSONException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            Log.wtf("Error", e);
        }

        for (int i = 0; i < perfiles.length; i++) {
            HashMap<String, String> datosEvento = new HashMap<String, String>();
            datosEvento.put("username", perfiles[i]);
            datosEvento.put("codigo", perfilesCodigo[i]);
            Eventos.add(datosEvento);
        }

    } // IF no hay error
    else {
        Dialog dialogo = new Dialog(this);
        dialogo.setTitle(getResources().getString(R.string.errorDeConexion));
        dialogo.show();
    }

    // PINTA TODAS LAS FILAS
    SimpleAdapter ListadoAdapter = new SimpleAdapter(this, Eventos, R.layout.row, from, to);
    setListAdapter(ListadoAdapter);
}

From source file:com.google.android.apps.gutenberg.EditNoteFragment.java

@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
    switch (loader.getId()) {
    case LOADER_ATTENDEE:
        if (cursor.getCount() > 0) {
            cursor.moveToFirst();//from w  w w  .  j  a v  a2 s .  co  m
            String note = cursor.getString(cursor.getColumnIndexOrThrow(Table.Attendee.NOTE));
            if (mEditNote != null) {
                mEditNote.setText(note);
            }
            String name = cursor.getString(cursor.getColumnIndexOrThrow(Table.Attendee.NAME));
            Dialog dialog = getDialog();
            if (dialog != null) {
                dialog.setTitle(name);
            }
        } else {
            Toast.makeText(getActivity(), "Error", Toast.LENGTH_SHORT).show();
            dismissAllowingStateLoss();
        }
        break;
    }
}

From source file:fi.loezi.unifud.MainActivity.java

public void showAboutDialog() {

    final Dialog dialog = new Dialog(this);
    dialog.setContentView(R.layout.dialog_fragment);
    dialog.setTitle("UniFud");

    final TextView text = (TextView) dialog.findViewById(R.id.dialogText);
    text.setText(//from   w  w w  .j  av  a 2  s .c o  m
            "Created by Leo Leppnen (leo.leppanen@helsinki.fi)\n" + "\n" + "Data provided by HYY Ravintolat\n"
                    + "\n" + "Icons by Freepik and Icon Works from www.flaticon.com, licensed under CC BY 3.0");

    String version = null;
    try {
        version = getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
    } catch (PackageManager.NameNotFoundException exception) {
        version = "unknown";
    }

    text.append("\n\nVersion " + version);

    final Button dialogButton = (Button) dialog.findViewById(R.id.dialogButtonOK);

    dialogButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            dialog.dismiss();
        }
    });

    dialog.show();
}

From source file:com.infamous.site.activity.MainActivity.java

public Dialog getChangelog() {
    final Dialog CDialog = new Dialog(MainActivity.this);
    CDialog.setTitle(getResources().getString(R.string.changelog_title));
    CDialog.setContentView(R.layout.changelog);
    CDialog.setCanceledOnTouchOutside(true);
    CDialog.setCancelable(true);//from  w w w .jav a  2  s. c om

    Button Close = (Button) CDialog.findViewById(R.id.close);
    Close.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            CDialog.dismiss();
        }
    });

    return CDialog;
}

From source file:com.dcs.fakecurrencydetector.MainActivity.java

public void showHelp() {

    Dialog dialog = new Dialog(MainActivity.this);
    dialog.setTitle(R.string.action_about);
    dialog.setContentView(R.layout.dialog);
    dialog.show();//from www. ja va  2  s. c  o m
}