Note that there are some explanatory texts on larger screens.

plurals
  1. POChanging default seekbar color
    primarykey
    data
    text
    <p>If anybody knows what i'm doing wrong please let me know. I created an android app and I am trying to change the default color of the seekbar from yellow to any other color. I created an xml file located in all 3 drawables and ran the project but the color of the seekbar still isnt changing color. Below is the code me and a fellow mate from irc have been working on.</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;item android:id="@android:id/background"&gt; &lt;shape&gt; &lt;corners android:radius="5dip" /&gt; &lt;gradient android:startColor="#ff9d9e9d" android:centerColor="#ff5a5d5a" android:centerY="0.75" android:endColor="#ff747674" android:angle="270" /&gt; &lt;/shape&gt; &lt;/item&gt; &lt;item android:id="@android:id/secondaryProgress"&gt; &lt;clip&gt; &lt;shape&gt; &lt;corners android:radius="5dip" /&gt; &lt;gradient android:startColor="#80ffd300" android:centerColor="#80ffb600" android:centerY="0.75" android:endColor="#a0ffcb00" android:angle="270" /&gt; &lt;/shape&gt; &lt;/clip&gt; &lt;/item&gt; &lt;item android:id="@android:id/progress" &gt; &lt;clip&gt; &lt;shape&gt; &lt;corners android:radius="5dip" /&gt; &lt;gradient android:startColor="#FF0000" android:centerColor="#FF0000" android:centerY="0.75" android:endColor="#FF0000" android:angle="270" /&gt; &lt;/shape&gt; &lt;/clip&gt; &lt;/item&gt; &lt;/layer-list&gt; </code></pre> <p>This is my java code</p> <pre><code>SeekBar seekBar = (SeekBar)findViewById(R.id.seekbar); final TextView seekBarValue = (TextView) findViewById(R.id.seekbarvalue); //filling seekbar seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { seekBarValue.setText(String.valueOf(progress+1998)); //sets the date to seekBar when in motion } @Override public void onStartTrackingTouch(SeekBar seekBar) { //TO DO Auto-Generated Method stub } @Override public void onStopTrackingTouch(SeekBar seekBar) { //TO DO Auto-Generated Method stub } </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.
 

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