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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:38:39+00:00 2026-06-02T03:38:39+00:00

I have a problem using a SeekBar in my code… I’d like to have

  • 0

I have a problem using a SeekBar in my code…

I’d like to have a SeekBar which the values are set by me, not by the user. The only solution I’ve founded and I don’t like, is setting enabled to false, but the colors of the seek bar become grey… (so I can’t do anything when the user slides the thumb…)

I would get something like that, but without touchable events!

enter image description here

SOLVED:

I solved the problem, as @CommonsWare says:

public class TaskListProgressBar extends SeekBar {

public TaskListProgressBar(Context context) {
    super(context);
 }


public TaskListProgressBar(Context context, AttributeSet attrs) {
        super(context, attrs);
   }

   public TaskListProgressBar(Context context, AttributeSet attrs, int defStyle) {
       super(context, attrs, defStyle);
   }


   @Override
   public boolean onTouchEvent(MotionEvent event) {
       return true;
   }

   @Override
   public boolean onTrackballEvent(MotionEvent ev) {
       return false;
   } 
  • 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-02T03:38:40+00:00Added an answer on June 2, 2026 at 3:38 am

    You could subclass it and override onTouchEvent() and onTrackballEvent() (to eat all attempts to silde the thumb) and also use android:focusable="false" (to prevent it from getting the focus, so arrow keys cannot modify the thumb position).

    That being said:

    • I have never tried this, so YMMV.

    • Please only do this if you are changing the default thumb image, per your screenshot above. Otherwise, users will expect the thumb to be movable, and they will get frustrated when they cannot move it.

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

Sidebar

Related Questions

i have problem using LIKE structure in DB2 : for example: select * from
I have a problem using JSON and arrays. Here is my code: while($row =
i have a problem using the Catch Clipboard Events code found on this link
I have a problem using first-child I have the following html code to make
I have a problem using QBE with NHibernate. Here's a sample code: Person person
I´m have a problem using EF for my data model. I have this code
I have a problem using fadeIn() on div that contains elements which positions are
i.e Say: select * from tblname where col1 NOT IN array; have problem using
I have problem using annotated validation in spring 3 mvc. I´m not sure if
I have a problem using CAB Framework. I created some GUI User control interfaces

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.