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 6064079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:14:27+00:00 2026-05-23T09:14:27+00:00

In my application I have a Seekbar that is shown in a dialog. Now

  • 0

In my application I have a Seekbar that is shown in a dialog.
Now I wanna set the interval and step in the Seekbar. The interval should be 0-250 and each step should be 5 minutes.

so far this is my code:

public class seekActivity extends Activity implements OnClickListener, OnSeekBarChangeListener {
    SeekBar seekbar;
    Button button;
    TextView textview;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //set up main content view
        setContentView(R.layout.main);
        //this button will show the dialog
        Button button1main = (Button) findViewById(R.id.Button01main);
        button1main.setOnClickListener(this);
    }
    public void onClick(View v) {
        //set up dialog
        Dialog dialog = new Dialog(this);
        dialog.setContentView(R.layout.maindialog);
        dialog.setTitle("This is my custom dialog box");
        dialog.setCancelable(true);
        button = (Button) dialog.findViewById(R.id.Button01);
        seekbar = (SeekBar) dialog.findViewById(R.id.seekBar1);
        seekbar.setOnSeekBarChangeListener(this);
        textview = (TextView) dialog.findViewById(R.id.textView1);
        dialog.show();
    }
    public class SeekBarPreference {
    }
    @Override
    public void onProgressChanged(SeekBar seekBar, int progress,
    boolean fromUser) {
        // TODO Auto-generated method stub
        textview.setText(progress + "");
    }
    @Override
    public void onStartTrackingTouch(SeekBar seekBar) {
        // TODO Auto-generated method stub
    }
    @Override
    public void onStopTrackingTouch(SeekBar seekBar) {
        // TODO Auto-generated method stub
    };
}

Could anyone give me some tips/code how to do?

Thanks!

  • 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-23T09:14:28+00:00Added an answer on May 23, 2026 at 9:14 am

    Instead of doing this why not just set the max value of the SeekBar to 50 (250/5) and then do whatever conversion is necessary from the SeekBar values to “real” values?

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

Sidebar

Related Questions

So in my application, I have a seekbar that allows the user to set
I have PHP application that contain three small applications. Each application have own users
I'm playing video via MediPlayer in my android application and have SeekBar displayed. Now
I have a web application that requires Blog Forum Chat support etc Now my
My application have a Service that every X minutes do same action on the
Should a web application have a notices/about page that details the components/libraries that we
In My application have time consuming process.There fore i try to do that operation
I have an android application that binds itself to a remote service once the
My application have a configuration xml-file. That file contains more than 50 program settings.
I have a Delphi application that communicates with web servers on the Internet using

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.