title: Android seekbar - thumb is invisible after set its drawable
body: <p>I have a seek bar and I am setting the thumb drawable in code. When the activity is starting I can see the changed drawable for the thumb but if I start a new activity from the seekbar activity and come back, the seekbar's thumb gets invisible (only if I set it's drawable again). This is happening only if I come back from other activity to the seekbar activity.</p>
  
  <p>I need to change the drawable of the thumb in onRestart() because the other activityes may change the color or shape of the thumb and I need to refresh it's drawable.</p>
  
  <p>I tried invalidate() on the seekbar but no use...</p>
  
  <p><strong>EDIT:</strong>
  <em>I tried to make 3 static Drawable objects and load the images in onCreate() and I noticed that after coming back on the SeekBar activity, if I set the thumb drawable to the one that is already set, the thumb is visible but if I change the drawable, the thumb becomes invisible.</em>  </p>
  
  <p><strong>EDIT 2:</strong></p>
  
  <p>In this case I set the loaded drawables to the thumb:</p>
  
  <pre><code>String gender = getGender();
      if (gender.equals(Profile.GENDER_1)) {
          mSeekBar.setThumb(mDrawable1);
      } else if (gender.equals(Profile.GENDER_2)) {
          mSeekBar.setThumb(mDrawable2);
      } else {
          mSeekBar.setThumb(mDrawable3);
      }
  </code></pre>
  
  <p>And this is if I try to get the drawables from the resources</p>
  
  <p>String gender = getGender();</p>
  
  <pre><code>if (gender.equals(Profile.GENDER_1)) {
      mDrawable = mSeekBar.getContext().getResources().getDrawable(R.drawable.slider_thumb_1);
  } else if (gender.equals(Profile.GENDER_2)) {
      mDrawable = mSeekBar.getContext().getResources().getDrawable(R.drawable.slider_thumb_2);
  } else {
      mDrawable = mSeekBar.getContext().getResources().getDrawable(R.drawable.slider_thumb_3);
  }
  
  mSeekBar.setThumb(mDrawable);
  </code></pre>
  
  <p>In both cases the thumb is getting invisible..</p>
  
  <p>What can be the problem? does somebody know the answer? 
  Thank you!</p>