Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code> LinearLayout linearLayout = new LinearLayout(getApplicationContext()); LinearLayout.LayoutParams rlp = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.FILL_PARENT); // linearLayout.setOrientation(LinearLayout.VERTICAL); VerticalSeekBar_1 verticalSeekBar_1 = new VerticalSeekBar_1( getApplicationContext()); // ------------ custom seekbar LayerDrawable layer = (LayerDrawable) verticalSeekBar_1 .getProgressDrawable(); Drawable draw1 = (Drawable) layer .findDrawableByLayerId(android.R.id.progress); Bitmap bitmap1 = BitmapFactory.decodeResource(getApplicationContext() .getResources(), R.drawable.scroll_on); draw1 = new ClipDrawable(new BitmapDrawable(bitmap1), Gravity.AXIS_PULL_BEFORE, ClipDrawable.HORIZONTAL); layer.setDrawableByLayerId(android.R.id.progress, draw1); Drawable draw2 = (Drawable) layer .findDrawableByLayerId(android.R.id.background); Bitmap bitmap2 = BitmapFactory.decodeResource(getApplicationContext() .getResources(), R.drawable.scroll_off); draw2 = new BitmapDrawable(bitmap2); layer.setDrawableByLayerId(android.R.id.background, draw2); // -------------- verticalSeekBar_1.setLayoutParams(rlp); verticalSeekBar_1.setMax(100); verticalSeekBar_1.setProgress(30); verticalSeekBar_1 .setOnSeekBarChangeListener(new OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { // TODO Auto-generated method stub } @Override public void onStartTrackingTouch(SeekBar seekBar) { // TODO Auto-generated method stub } @Override public void onStopTrackingTouch(SeekBar seekBar) { // TODO Auto-generated method stub } }); linearLayout.addView(verticalSeekBar_1); setContentView(linearLayout); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload