Skip to content

File/Folder picker dialog #30

Description

@isabsent

I am going to create a simple file/folder chooser based on your library. For this purpose I would like to extending your SimpleListDialog and customize onItemClick :

import android.view.View;
import android.widget.AdapterView;

import eltos.simpledialogfragment.list.SimpleListDialog;

public class SimpleListDialogMod extends SimpleListDialog {

    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
        super.onItemClick(parent, view, position, id); 
        //Some custom code
    }
}

and use it as follows:

SimpleListDialogMod.build()
        .title(titleResId)
        .choiceMode(SimpleListDialog.SINGLE_CHOICE)
        .choiceMin(1)
        .items(itemNames)
        .extra(extras)
        .pos(R.string.button_deeper)
        .neg(R.string.button_up)
        .neut(R.string.button_pick)
        .show(this, PICK_DIALOG);

but onItemClick is never called when I press an item in the list! Why?

P.S. Would you be so kind to write your own SimplePickFileDialog? It is widely used and would be very useful as I suppose.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions