Stack Overflow archive
0 score

Android: How can I set value of SeekBar

score
0
question views
679
license
CC BY-SA 3.0

How can I call this following method in above java file?

In onCreateView(LayoutInflater, ViewGroup, Bundle) you can still use findViewById(int). The following will call the constructor you want:

java
View rootView = inflater.inflate(R.layout.fragment_budget_filter, container, false);

...

SeekBar seekBar = (SeekBar) rootView.findViewById(R.id.budget_max_seekbar);
TextView textView = (TextView) rootView.findViewById(R.id.max_budget);
AndroidSeekBar yourSeekBar = new AndroidSeekBar(seekBar, textView);

...

return rootView;

Originally posted on Stack Overflow. Public user contributions are licensed under Creative Commons Attribution-ShareAlike.