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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:39:00+00:00 2026-06-17T18:39:00+00:00

I have made a simple android project with a single activity containing three buttons

  • 0

I have made a simple android project with a single activity containing three buttons and a seek bar,Now i want is that when i press 1st button the seek bar should directly progressed 33%(without showing progress),when 2nd button pressed the seek bar should progressed again by 33% second time and when third button pressed the seek bar should full progressed..my code is as below:

Main.java

package com.example.seekabardemo;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.SeekBar;

public class MainActivity extends Activity {
Button btn,btn1,btn2;
SeekBar sk;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
      btn=(Button)findViewById(R.id.button1);
      btn1=(Button)findViewById(R.id.button2);
      btn2=(Button)findViewById(R.id.button3);
      sk=(SeekBar)findViewById(R.id.seekBar1);
      btn.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub


        }
    });
      btn1.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub

        }
    });
      btn2.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub

        }
    });
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
}

enter image description here

enter image description here

enter image description here

enter image description here

Thank you….Please help me..!

Please help me ..thank you..!

  • 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-06-17T18:39:01+00:00Added an answer on June 17, 2026 at 6:39 pm

    write this three statements in click events of each button respectively.

    sk.setProgress(sk.getMax()/3);
    sk.setProgress(sk.getMax()*2/3);
    sk.setProgress(sk.getMax());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've made a simple Android music player. I want to have a TextView that
I have made a custom button bar as described here . Now, I want
I made a simple android application that moves from one activity to another activity
I have made a program of simple alert box in android.now i have to
Beginner in Android development. My code crashes. I have made a simple Java method
I have made simple encryption/decryption method in php that I'm trying to move to
I have made a simple test application for the issue, two winforms each containing
I am trying to create a simple 3-D app for android that will have
I made a simple extension of CheckBoxPreference so that I could have my own
I have made a simple tic tac toe app for Android which needs no

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.