类似于淘宝中的淘宝头条
ViewFlipper
布局文件:
<LinearLayout
android:id="@+id/ll_vf"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginBottom="25dp"
android:background="@color/white"
android:gravity="center"
android:paddingLeft="@dimen/content_space_h"
android:paddingRight="@dimen/content_space_h">
<ViewFlipper
android:id="@+id/vf_notice"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
java代码:
@ViewInject(R.id.ll_vf)
private LinearLayout ll_vf;
@ViewInject(R.id.vf_notice)
private ViewFlipper vf_notice;
private int mCurrPos;
private int mCurrPos;
private Timer timer