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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:40:13+00:00 2026-06-07T19:40:13+00:00

I have implemented multiple seek bar in android like @Override public void onCreate(Bundle savedInstanceState)

  • 0

I have implemented multiple seek bar in android like

@Override
public void onCreate(Bundle savedInstanceState) 
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    sb1=(SeekBar) findViewById(R.id.seekBar1);
    sb2=(SeekBar) findViewById(R.id.seekBar2);
    sb3=(SeekBar) findViewById(R.id.seekBar3);

    tv1=(TextView) findViewById(R.id.textView1);
    tv2=(TextView) findViewById(R.id.textView2);
    tv3=(TextView) findViewById(R.id.textView3);

    sb1.setOnSeekBarChangeListener(this);
    sb2.setOnSeekBarChangeListener(this);
    sb3.setOnSeekBarChangeListener(this);

}

@Override
public void onProgressChanged(SeekBar arg0, int arg1, boolean arg2) 
{

    switch (arg0.getId()) 
    {
    case R.id.seekBar1:
        tv1.setText(arg1);
        break;
    case R.id.seekBar2:
        tv2.setText(arg1);
        break;
    case R.id.seekBar3:
        tv3.setText(arg1);
        break;
    }
}

@Override
public void onStartTrackingTouch(SeekBar arg0) 
{
    // TODO Auto-generated method stub

}

@Override
public void onStopTrackingTouch(SeekBar arg0) 
{
    // TODO Auto-generated method stub

}

Whenever I run this app, it gives the following errors:

FATAL EXCEPTION: main

07-18 15:41:13.200: E/AndroidRuntime(596): android.content.res.Resources$NotFoundException:String resource ID #0x1
07-18 15:41:13.200: E/AndroidRuntime(596):  at android.content.res.Resources.getText(Resources.java:201)
07-18 15:41:13.200: E/AndroidRuntime(596):  at android.widget.TextView.setText(TextView.java:2817)
07-18 15:41:13.200: E/AndroidRuntime(596):  at com.example.allocationseekbar.MainActivity.onProgressChanged(MainActivity.java:42)
07-18 15:41:13.200: E/AndroidRuntime(596):  at android.widget.SeekBar.onProgressRefresh(SeekBar.java:89)
07-18 15:41:13.200: E/AndroidRuntime(596):  at android.widget.ProgressBar.doRefreshProgress(ProgressBar.java:506)
07-18 15:41:13.200: E/AndroidRuntime(596):  at android.widget.ProgressBar.refreshProgress(ProgressBar.java:515)
07-18 15:41:13.200: E/AndroidRuntime(596):  at android.widget.ProgressBar.setProgress(ProgressBar.java:564)
07-18 15:41:13.200: E/AndroidRuntime(596):  at android.widget.AbsSeekBar.trackTouchEvent(AbsSeekBar.java:337)
07-18 15:41:13.200: E/AndroidRuntime(596):  at android.widget.AbsSeekBar.onTouchEvent(AbsSeekBar.java:292)
07-18 15:41:13.200: E/AndroidRuntime(596):  at android.view.View.dispatchTouchEvent(View.java:3766)
07-18 15:41:13.200: E/AndroidRuntime(596):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
07-18 15:41:13.200: E/AndroidRuntime(596):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
07-18 15:41:13.200: E/AndroidRuntime(596):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
07-18 15:41:13.200: E/AndroidRuntime(596):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
07-18 15:41:13.200: E/AndroidRuntime(596):  at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1671)
07-18 15:41:13.200: E/AndroidRuntime(596):  at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
07-18 15:41:13.200: E/AndroidRuntime(596):  at android.app.Activity.dispatchTouchEvent(Activity.java:2086)
07-18 15:41:13.200: E/AndroidRuntime(596):  at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1655)
07-18 15:41:13.200: E/AndroidRuntime(596):  at android.view.ViewRoot.handleMessage(ViewRoot.java:1785)
07-18 15:41:13.200: E/AndroidRuntime(596):  at android.os.Handler.dispatchMessage(Handler.java:99)
07-18 15:41:13.200: E/AndroidRuntime(596):  at android.os.Looper.loop(Looper.java:123)
07-18 15:41:13.200: E/AndroidRuntime(596):  at android.app.ActivityThread.main(ActivityThread.java:4627)
07-18 15:41:13.200: E/AndroidRuntime(596):  at java.lang.reflect.Method.invokeNative(Native Method)
07-18 15:41:13.200: E/AndroidRuntime(596):  at java.lang.reflect.Method.invoke(Method.java:521)
07-18 15:41:13.200: E/AndroidRuntime(596):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-18 15:41:13.200: E/AndroidRuntime(596):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-18 15:41:13.200: E/AndroidRuntime(596):  at dalvik.system.NativeStart.main(Native Method)

I don’t know why this is happening. Please help me. Thanxs in advance

  • 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-07T19:40:15+00:00Added an answer on June 7, 2026 at 7:40 pm

    You are passing an int into the setText() method of your TextView which is the overload to look for a resource with that ID. You need to change it (and the similar lines) to:

    tv1.setText(arg1.toString()); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented an application with multiple check boxes with multiple layouts.I am invisible
as the question states. I have implemented a function wherein it fetches multiple rows
Very simple Qt GUI application: On the scene I have multiple circles implemented as
I have implemented a ToString() override method for my class in my Webservice and
I have successfully implemented code to plot multiple locations on google maps dynamically. Solution:
I have multiple custom UIWebView's as subviews within a UIScrollView. I have implemented the
I have implemented multiple file uploads for existing records as seen here https://github.com/websymphony/Rails3-Paperclip-Uploadify I
I have implemented a table view with multiple threads. Currently when a user taps
I have a feature where we have to compare multiple series. I have implemented
i am new programmer in android application i would like display multiple notifications one

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.