2017-06-20 1 views
0

Ici, ce que je fais est, je veux montrer la barre de recherche fonctionnant entre le RangeSeekBar (entre la gamme sélectionnée). Pour cela, je veux placer ces deux barres de recherche à un seul endroit.Comment placer deux Seeksbars à un même endroit?

Je ne sais pas comment faire cela. J'ai essayé RelativeLayout et FrameLayout mais rien ne s'est passé.

Merci.

activity_play.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="vertical" 
    android:paddingBottom="@dimen/activity_vertical_margin" 
    android:paddingLeft="@dimen/activity_horizontal_margin" 
    android:paddingRight="@dimen/activity_horizontal_margin" 
    android:paddingTop="@dimen/activity_vertical_margin" 
    tools:context=".MainActivity"> 


<SeekBar 
    android:id="@+id/pSeekBar" 
    android:layout_width="match_parent" 
    android:layout_height="37dp" /> 
    <ListView 
     android:id="@android:id/list" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_weight="1.0" /> 

    <LinearLayout 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:background="@android:drawable/screen_background_light" 
     android:orientation="vertical" 
     android:padding="10dip"> 

     <TextView 
      android:id="@+id/selectedfile" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:ellipsize="middle" 
      android:gravity="center_horizontal" 
      android:singleLine="true" 
      android:text="Not file selected" 
      android:textColor="@android:color/black" /> 

     <com.yahoo.mobile.client.android.util.rangeseekbar.RangeSeekBar 
      android:id="@+id/rangeSeekBar" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:max="100" 

      android:paddingBottom="10dip" 
      /> 


     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:background="@android:drawable/screen_background_light" 
      android:gravity="center" 
      android:orientation="horizontal"> 

      <EditText 
       android:id="@+id/MinEditText" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" /> 

      <ImageButton 
       android:id="@+id/prev" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:src="@android:drawable/ic_media_previous" /> 

      <ImageButton 
       android:id="@+id/play" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:src="@android:drawable/ic_media_play" /> 

      <ImageButton 
       android:id="@+id/next" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:src="@android:drawable/ic_media_next" /> 


      <EditText 
       android:id="@+id/MaxEdiText" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" /> 
     </LinearLayout> 
    </LinearLayout> 

</LinearLayout> 
+0

avez-vous une image qui va nous montrer ce que vous voulez faire ? Votre description n'est pas vraiment claire !!! – matrix

+0

Je veux exactement trois pouces sur une barre de recherche. Dans lequel le pouce le plus à droite et le pouce le plus à gauche seront utilisés comme Range et le pouce du milieu sera capable de se déplacer entre ces deux plages. –

Répondre

0

u peut utiliser cette bibliothèque est difficile à écrire vous-même

https://github.com/syedowaisali/crystal-range-seekbar

+0

Je l'utilise déjà. Il fournit deux pouces seulement. Je veux placer deux barres de recherche (SeekBar et RangeSeekBar) sur place (l'une sur l'autre). –

+0

Vous devriez éditer cette bibliothèque pour atteindre votre objectif. Vous ne pouvez pas y mettre une autre barre de recherche. –

+0

Comment? Peux-tu me dire s'il te plait. –