Aller au contenu
View in the app

A better way to browse. Learn more.

Forum de Frandroid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

comment vider complètement une Hushmap

Featured Replies

Posté(e)

Bonjour,
Je veux supprimer tous les éléments d'un Hushmap , voici une partie du code

@[member=override]
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_historique);

    // associate the button from interface to code
    initInterface();
    addButtonClickListner();
    HistFile = (HistoryFileManager) getIntent().getParcelableExtra(
            MainActivity.PAR_KEY);
    // Adding menuItems to ListView
    // android.R.layout.activity_list_item;
    final ListAdapter adapter = new SimpleAdapter(this, HistFile.menuItems,
            R.layout.list_application, new String[] {
                    HistFile.KEY_NOM_APPLICATION,
                    HistFile.KEY_DATE_CREATION },
            new int[] { R.id.textViewNameApplication,
                    R.id.textViewDateCreation });


    listView1.setAdapter(adapter);
            btn_Supprimer.setOnClickListener(new OnClickListener() {

        @[member=override]
        public void onClick(View v) {
            AlertDialog.Builder builder = new AlertDialog.Builder(v
                    .getContext());

            DialogInterface.OnClickListener listenerYes = new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int id) {
                    //Qu'est ce que je doit faire là

                    Toast.makeText(getApplicationContext(),
                            "Suppression réussie", Toast.LENGTH_SHORT)
                            .show();
                }
            };

            DialogInterface.OnClickListener listenerNo = new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int id) {
                    // User cancelled the dialog
                }
            };

            builder.setMessage(R.string.supprimerAllApplications)
                    .setPositiveButton(R.string.yes, listenerYes)
                    .setNegativeButton(R.string.no, listenerNo);

            AlertDialog d = builder.create();
            d.setTitle("Supprimer historique");
            d.show();
        }
    });

}

j'ai utilisé la méthode clear , remove mais ça marche pas

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

Account

Navigation

Rechercher

Rechercher

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.