实现 ViewFlipper 跑马灯 效果

android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

    android:layout_width="match_parent"
    android:layout_height="30dp"
    android:layout_gravity="center"
    android:layout_marginTop="15dp"
    android:autoStart="true"
    android:flipInterval="2000"
    android:background="#fff"
    >
            android:id="@+id/text_pao"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="50dp"
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:marqueeRepeatLimit="marquee_forever"
        android:singleLine="true"
        android:text="小米(MI)Air 13.3英寸全金属轻薄笔记本"
        android:textColor="#000000"
        android:textSize="18dp" />
            android:id="@+id/text_pao2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="50dp"
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:marqueeRepeatLimit="marquee_forever"
        android:singleLine="true"
        android:text="联想(Lenovo)拯救者R720 15.6英寸游戏笔记本电"
        android:textColor="#000000"
        android:textSize="18dp" />


你可能感兴趣的:(移动安卓开发)