0

I have this class and I want to see what is the current value of view.getValue() when I scroll the number picker, I put a breakpoint inside if but I'm unable to see its value

public class ClsCallbackBottomSheet implements NumberPicker.OnScrollListenr{


@Override
public void onScrollStateChange(NumberPicker view, int scrollState) {

    if (scrollState == 0) {
        ClsBottomSheet.tv.setText(ClsBottomSheet.values[view.getValue()]);
    }
 }

getting these values

blackHawk
  • 6,047
  • 13
  • 57
  • 100

2 Answers2

0
int value = view.getValue();
ClsBottomSheet.tv.setText(ClsBottomSheet.values[value]);

Either separate them like that, or step into the getValue function

Ted Cassirer
  • 364
  • 1
  • 10
  • I'm stepping into but its not taking me to getvalue – blackHawk Jun 13 '17 at 07:01
  • click on the image, its when first time break point takes focus, if Im stepping into it first taking me to numberpicker set max and set min method, after that in textview, but never getvalue – blackHawk Jun 13 '17 at 07:18
0

If you are in debug mode you can get method or variable value by dynamic execution. Please check below screen shot. Here i have marked a control it will enable in debug mode, and you can execute your code by using this option. Hope this will help you.enter image description here

EKN
  • 1,886
  • 1
  • 16
  • 29
  • yes it workes, but number picker is freezed so i can only see current value, can't see beyond this like dynamic – blackHawk Jun 13 '17 at 07:26