您的位置:首页 > 移动开发 > Android开发

KJFrameForAndroid 资料——KJViewPager用法样例

2016-07-15 10:22 477 查看
<org.kymjs.kjframe.widget.KJViewPager
android:id="@+id/scrollLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:visibility="visible" >

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:background="@drawable/welcome_1" />

<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/welcome_2" />

<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/welcome_3" />

<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/welcome_4" />

<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/welcome_1" >

<Button
android:id="@+id/startBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="90.0dip"
android:background="@drawable/selector_btn_welcome"
android:text="开启音乐之旅"
android:textColor="#ffffff"
android:textSize="18sp" />
</RelativeLayout>
</org.kymjs.kjframe.widget.KJViewPager>




scrollLayout = (KJViewPager) findViewById(R.id.scrollLayout);
count = scrollLayout.getChildCount();
imgs = new ImageView[count];
for (int i = 0; i < count; i++) {
imgs[i] = (ImageView) pointLayout.getChildAt(i);
imgs[i].setEnabled(true);
imgs[i].setTag(i);
}
currentItem = 0;
imgs[currentItem].setEnabled(false);
scrollLayout.setOnViewChangeListener(this);

public class FirstInstallActivity extends KJActivity implements
OnViewChangeListener {}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: