Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6548529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:58:54+00:00 2026-05-25T11:58:54+00:00

I have a seekbar, while moving it I want to change values from 0

  • 0

I have a seekbar, while moving it I want to change values from 0 to 200. I have a TextView, where I display those values while moving the seekbar. But I don’t want to have every value from that interval(0,1,2,3,4,5…), but to have 10, 20, 30…so on. So when I move the seekbar, I want to display 10,20,30,40….to 200. Can somebody give me a hint or an example how to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:58:54+00:00Added an answer on May 25, 2026 at 11:58 am

    Try below code

    SeekBar seekBar = (SeekBar)layout.findViewById(R.id.seekbar);
    seekBar.setProgress(0);
    seekBar.incrementProgressBy(10);
    seekBar.setMax(200);
    TextView seekBarValue = (TextView)layout.findViewById(R.id.seekbarvalue);
    seekBarValue.setText(tvRadius.getText().toString().trim());
    
    seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener(){
    
        @Override
        public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
            progress = progress / 10;
            progress = progress * 10;
            seekBarValue.setText(String.valueOf(progress));
        }
    
        @Override
        public void onStartTrackingTouch(SeekBar seekBar) {
    
        }
    
        @Override
        public void onStopTrackingTouch(SeekBar seekBar) {
    
        }
    });
    

    setProgress(int) is used to set starting value of the seek bar

    setMax(int) is used to set maximum value of seek bar

    If you want to set boundaries of the seekbar then you can check the progressbar value in the onProgressChanged method. If the progress is less than or greater than the boundary then you can set the progress to the boundary you defined.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Seekbar and I want to save the state to database when
I have a SeekBar in my application, and I want it to behave so
For example, I have write GUI. I have a SeekBar, I change the progress
I hope this is a simple problem. I have a seekbar that I want
I have one seekbar in my custom listview . Now i dont want that
I have multiple SeekBars which the user can manipulate to change various values in
i have build a custom media player and i want to show the seekbar
I want to have a SeekBar with a thumb that appears as the user
I am creating a color chooser from a SeekBar. So far, I have successfully
I have a SeekBar inside a HorizontalScrollView and am finding it very hard to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.