0

私はhttp://android-developers.blogspot.in/2011/08/horizontal-view-swiping-with-viewpager.htmlのようなものを実装したいと思います。
私のメインビューはcards.Howの反対側にある2つのビューでViewflipperである私は、今私のレイアウトviewflipperレイアウトのviewpagerを実装することができ、このです:?ビューページ内のViewFlipper

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout android:id="@id/FlashCardFront" android:background="#3500ffff style="@style/Fill" 
xmlns:android="http://schemas.android.com/apk/res/android"> 
<ViewFlipper android:id="@+id/flipper" style="@style/Fill" android:layout_margin="8.0dip">  
<LinearLayout android:id="@+id/front" android:orientation="vertical" android:background="#ffffffff" style="@style/Fill"> 
    <LinearLayout style="@style/FillWrap.LL.FlashCard_Header"> 

     <ImageButton 
android:id="@+id/back" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:onClick="true" 
android:src="@drawable/left_arrow" 
android:background="#00000000" 
/> 

     <TextView android:id="@id/TV_CardNo" android:text="0000" android:layout_weight="1.0" style="@style/Wrap.Text_RightTop" /> 

     <ImageButton 
      android:id="@+id/next" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_weight="0.14" 
      android:background="#00000000" 
      android:onClick="true" 
      android:src="@drawable/right_arrow" /> 

     </LinearLayout> 

     <LinearLayout android:id="@id/LL_Card" style="@style/FillWrap.LL.FlashCard_Body"> 
     <TextView android:id="@id/TV_Word" android:text="Word" style="@style/FillWrap.Text_FlashCard_Word" /> 
     </LinearLayout> 

     <LinearLayout style="@style/FillWrap.LL.FlashCard_Footer"> 
     <RatingBar android:id="@id/RB_Stars_Front" android:progressDrawable="@drawable/ratings_bar" android:numStars="1" android:stepSize="1.0" style="@style/Wrap" /> 
    </LinearLayout> 
</LinearLayout> 
<LinearLayout android:orientation="vertical" android:background="#ffffffff" style="@style/Fill"> 

    <LinearLayout android:id="@id/RearHeader" style="@style/FillWrap.LL.FlashCard_Header"> 
      <ImageButton 
android:id="@+id/rear_back" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:onClick="true" 
android:src="@drawable/left_arrow" 
android:background="#00000000" 
/> 
     <TextView android:id="@id/TV_CardNo" android:text="0000" android:layout_weight="1.0" style="@style/Wrap.Text_RightTop" /> 
     <ImageButton 
      android:id="@+id/rear_next" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_weight="0.14" 
      android:background="#00000000" 
      android:onClick="true" 
      android:src="@drawable/right_arrow" />  
    </LinearLayout> 
    <LinearLayout android:id="@id/LL_Card1" style="@style/FillWrap.LL.FlashCard_Body"> 
    <ImageView android:id="@+id/image" android:layout_width="fill_parent" android:layout_height="fill_parent"></ImageView>  </LinearLayout> 
    <LinearLayout style="@style/FillWrap.LL.FlashCard_Footer"> 
       <TextView android:id="@id/TV_Meaning" android:text="Meaning" style="@style/FillWrap.Text_FlashCard_Meaning" /> 
    </LinearLayout> 
</LinearLayout> 
</ViewFlipper> 

+0

何を試しましたか?あなたはそのページを続けましたか? ViewPagerをレイアウトのトップレベルの親ビューとして追加するとどうなりますか? – FoamyGuy

+0

@Tim ViewPlipperの上にViewPagerを作成するとレイアウトが失われます。 – Maxsteel

答えて

0

ありスタイルページは、viewpagerindicatorというライブラリを使って実現されています... Jake Whartonによって行われました....どのように動作するか確認してください。

関連する問題