If someone knows what I'm doing wrong, let me know. I created an Android app and I am trying to change the default color in the search bar from yellow to any other color. I created an xml file located in all three drawings and started the project, but the color of the arrow still does not change color. Below is the code that we and the teammate from irc worked.
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@android:id/background"> <shape> <corners android:radius="5dip" /> <gradient android:startColor="#ff9d9e9d" android:centerColor="#ff5a5d5a" android:centerY="0.75" android:endColor="#ff747674" android:angle="270" /> </shape> </item> <item android:id="@android:id/secondaryProgress"> <clip> <shape> <corners android:radius="5dip" /> <gradient android:startColor="#80ffd300" android:centerColor="#80ffb600" android:centerY="0.75" android:endColor="#a0ffcb00" android:angle="270" /> </shape> </clip> </item> <item android:id="@android:id/progress" > <clip> <shape> <corners android:radius="5dip" /> <gradient android:startColor="#FF0000" android:centerColor="#FF0000" android:centerY="0.75" android:endColor="#FF0000" android:angle="270" /> </shape> </clip> </item> </layer-list>
This is my java 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 }
Playgooz
source share