I am creating an Android application where the user selects the maximum value using a search.
I need another button on the same search screen so that the user can select the maximum and minimum value from a specific unique search key.
Here is my single search string code -
package com.ui.yogeshblogspot; public class CustomSeekBarExActivity extends Activity implements OnSeekBarChangeListener{ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); SeekBar bar=(SeekBar)findViewById(R.id.seekBar1); bar.setOnSeekBarChangeListener(this); } @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
Here is my xml of the search bar -
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:background="#FFFFFF"> <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Choose Your Progress" android:textColor="#000000" android:textAppearance="?android:attr/textAppearanceMedium" /> <SeekBar android:id="@+id/seekBar1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:progressDrawable="@xml/progress" android:max="100" android:thumb="@xml/thumb"/> <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#000000" android:gravity="center" android:layout_gravity="center" android:paddingTop="10dp" android:textAppearance="?android:attr/textAppearanceMedium" /> </LinearLayout>
source share