Skip to content

tusinh/PickerView-Android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PickerView-Android

How to Use

  • add PickerView like your module lib android.
  1. init global
MyOptionsPickerView singlePicker;
  1. setData String
    //Single String Picker
        singlePicker = new MyOptionsPickerView(MainActivity.this);
        final ArrayList<String> items = new ArrayList<String>();
        items.add("A");
        items.add("B");
        items.add("C");
        items.add("D");
        items.add("E");
        singlePicker.setPicker(items);
        singlePicker.setTitle("Single Picker");
        singlePicker.setCyclic(false);
        singlePicker.setSelectOptions(0);
        singlePicker.setOnoptionsSelectListener(new MyOptionsPickerView.OnOptionsSelectListener() {
            @Override
            public void onOptionsSelect(int options1, int option2, int options3) {
                //  singleTVOptions.setText("Single Picker " + items.get(options1));
                Toast.makeText(MainActivity.this, "" + items.get(options1), Toast.LENGTH_SHORT).show();
//                vMasker.setVisibility(View.GONE);
            }
        });
  1. show
   singleTVOptions.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                singlePicker.show();
            }
        });

4.Reference https://github.com/RameshBhupathi/PickerView

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages