How to get the step value selected in android-comboseekbar-master

后端 未结 2 1197
广开言路
广开言路 2021-01-19 04:49

I created a comboseekbar using the library android-comboseekbar-master. And i implemented the xml and code



        
2条回答
  •  一生所求
    2021-01-19 05:05

    I looked into the library . I don't think there is an option for that. Although there is a close work around,look at my code, if you find this suitable use it, otherwise you can edit the library.

    mSeekBar.setOnItemClickListener(new OnItemClickListener() {
    
       @Override
       public void onItemClick(AdapterView parent, View view,
         int position, long id) {
        // TODO Auto-generated method stub
        toast(position + "");
        switch (position) {
        case 0:
    
        //do something here
         break;
        case 1:
        //do something here
         break;
        case 2:
         //do something here
         break;
        case 3:
        //do something here
    
         break;
        case 4:
         //do something here
         break;
        case 5:
         //do something here
         break;
        }
    
       }
      });
    

提交回复
热议问题