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:com.example.android.supportv7.app.DialogUsage.java

private void showSimpleDialog() {
    Dialog dialog = new AppCompatDialog(this);
    dialog.setTitle(R.string.dialog_title);
    dialog.setContentView(R.layout.dialog_content);
    dialog.show();/*from   w w  w.  j  a v  a  2s. c  om*/
}

From source file:com.example.android.supportv7.app.DialogUsage.java

private void showButtonBarDialog() {
    Dialog dialog = new AppCompatDialog(this);
    dialog.setTitle(R.string.dialog_title);
    dialog.setContentView(R.layout.dialog_content_buttons);
    dialog.show();/*from w  w  w . ja  va  2 s  .  co  m*/
}

From source file:de.awisus.refugeeaidleipzig.views.map.FragmentAccommodationInfo.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
    View view = getActivity().getLayoutInflater().inflate(R.layout.fragment_show_accommodation, null);

    TextView tvAddress = (TextView) view.findViewById(R.id.tvAddress);
    TextView tvSpace = (TextView) view.findViewById(R.id.tvSpace);
    TextView tvResidents = (TextView) view.findViewById(R.id.tvResidents);
    TextView tvNeeds = (TextView) view.findViewById(R.id.tvNeeds);

    setTvAddress(tvAddress);//from www  .j  a v a 2  s .  com
    tvSpace.setText(String.valueOf(unterkunft.getGroesse()));
    tvResidents.setText(String.valueOf(unterkunft.getBewohner()));
    tvNeeds.setText(getNeeds());

    builder.setView(view);
    Dialog dialog;
    dialog = builder.create();
    dialog.setTitle(unterkunft.toString());
    return dialog;
}

From source file:im.vector.fragments.VectorUserGroupsDialogFragment.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    Dialog d = super.onCreateDialog(savedInstanceState);
    d.setTitle(getString(R.string.groups_list));
    return d;//w  ww . jav  a  2 s.  c om
}

From source file:com.coinprism.wallet.QRCodeDialog.java

@android.support.annotation.NonNull
@Override/*from   ww w  .j av  a  2  s .  c o m*/
public Dialog onCreateDialog(Bundle savedInstanceState) {
    final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
    // Get the layout inflater
    final LayoutInflater inflater = getActivity().getLayoutInflater();

    final View view = inflater.inflate(R.layout.dialog_qr_code, null);
    // Inflate and set the layout for the dialog
    // Pass null as the parent view because its going in the dialog layout
    builder.setView(view);

    builder.setNegativeButton(getString(R.string.tab_wallet_dialog_qr_close),
            new DialogInterface.OnClickListener() {
                // Close the dialog
                public void onClick(DialogInterface dialog, int id) {
                    QRCodeDialog.this.getDialog().cancel();
                }
            });

    builder.setNeutralButton(getString(R.string.tab_wallet_dialog_qr_copy_address),
            new DialogInterface.OnClickListener() {
                // Copy the address into the clipboard
                public void onClick(DialogInterface dialogInterface, int i) {
                    ClipboardManager clipboard = (ClipboardManager) getActivity()
                            .getSystemService(FragmentActivity.CLIPBOARD_SERVICE);
                    ClipData clip = ClipData.newPlainText("label", QRCodeDialog.this.address);
                    clipboard.setPrimaryClip(clip);
                }
            });

    final Dialog result = builder.create();
    result.setTitle(this.title);

    final ImageView qrCode = (ImageView) view.findViewById(R.id.qrCode);
    QRCodeEncoder.createQRCode(this.address, qrCode, 592, 592, 0, 0x00FFFFFF);

    return result;
}

From source file:com.github.michalbednarski.intentslab.bindservice.SystemServicesDialog.java

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

From source file:com.privacity.MainActivity.java

public void actualizarValidador(String verificador) {
    if (com.obtenerAccessToken(verificador)) {
        Intent intent = new Intent(this, MenuActivity.class);
        startActivity(intent);/* ww w  . ja  v  a 2s. c o  m*/
        this.finish();
    } else {
        Dialog dialogoError = new Dialog(this);
        dialogoError.setTitle(R.string.VerificadorIncorrecto);
        dialogoError.show();

    }
}

From source file:im.neon.fragments.VectorReadReceiptsDialogFragment.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    Dialog d = super.onCreateDialog(savedInstanceState);
    d.setTitle(getString(R.string.read_receipts_list));
    return d;/*from w  w  w  . java  2  s  .c o  m*/
}

From source file:com.siabra.discover.MainActivity.java

public void actualizarValidador(String verificador) {
    if (com.obtenerAccessToken(verificador)) {
        Intent intent = new Intent(this, CloudReco.class);
        startActivity(intent);//www  .  ja v  a2 s.  com
        this.finish();
    } else {
        Dialog dialogoError = new Dialog(this);
        dialogoError.setTitle("Verficador incorrecto.");
        dialogoError.show();

    }
}

From source file:it.flaviomascetti.posture.MainActivity.java

@SuppressWarnings("StatementWithEmptyBody")
@Override//w  w  w  .  j  a  v a 2  s  . c o m
public boolean onNavigationItemSelected(MenuItem item) {
    // Handle navigation view item clicks here.
    int id = item.getItemId();

    if (id == R.id.nav_license) {
        Dialog d = new Dialog(this);
        d.setTitle(R.string.license);
        d.setCancelable(true);
        d.setContentView(R.layout.app_license_popup);
        d.show();
    } else if (id == R.id.nav_acc_test) {
        getSupportFragmentManager().beginTransaction().replace(R.id.container, new AccuracyTestFragment())
                .commit();
    } else if (id == R.id.nav_posture_check) {
        getSupportFragmentManager().beginTransaction().replace(R.id.container, new PostureCheckFragment())
                .commit();
    }

    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    drawer.closeDrawer(GravityCompat.START);
    return true;
}