2016-07-21 7 views

答えて

2

あなたはこのライブラリをチェックする必要があります。WheelView

は、Javaコード

であなたのxml

<com.lukedeighton.wheelview.WheelView 
    android:id="@+id/wheelview" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    app:wheelColor="@color/grey_400" 
    app:rotatableWheelDrawable="false" 
    app:selectionAngle="90.0" 
    app:wheelPosition="bottom" 
    app:wheelOffsetY="60dp" 
    app:repeatItems="true" 
    app:wheelRadius="276dp" 
    app:wheelItemCount="14" 
    app:wheelPadding="13dp" 
    app:wheelItemRadius="43dp"/> 

セットアダプタにカスタムビューを追加するには、build.gradleに

dependencies { 
    compile 'com.github.lukedeighton:wheelview:0.3.1' 
} 

を依存関係を追加

wheelView.setAdapter(new WheelAdapter() { 
    @Override 
    public Drawable getDrawable(int position) { 
     //return drawable here - the position can be seen in the gifs above 
    } 

    @Override 
    public int getCount() { 
     //return the count 
    } 
}); 

enter image description here

+0

お返事ありがとうございます。私はそれをチェックします。 –

+1

素敵なライブラリ..そしてまた私は1つの良いライブラリを見つけました... https://github.com/ogaclejapan/ArcLayout WheelVIewライブラリの –

+0

私は自分自身の表示項目を設定できません。画像ドロワブルのみをホイールアダプタに設定できます。その中にアイテムを表示する方法を設定します。私もtextview値を設定する必要があるので。 –

関連する問題