你的位置:首页 > 软件开发 > 操作系统 > Android自定义控件5

Android自定义控件5

发布时间:2016-09-28 22:00:18
本文地址:http://www.cnblogs.com/wuyudong/p/5918021.html,转载请注明源地址。本文开始实现轮播图广告系列,这篇文章首先实现让图片滑动起来(ViewPager),效果如下:首先实现布局<RelativeLayout ="h ...

Android自定义控件5

本文地址:http://www.cnblogs.com/wuyudong/p/5918021.html,转载请注明源地址。

本文开始实现轮播图广告系列,这篇文章首先实现让图片滑动起来(ViewPager),效果如下:

Android自定义控件5

首先实现布局

<RelativeLayout ="http://schemas.android.com/apk/res/android"  ="http://schemas.android.com/tools"  android:layout_width="match_parent"  android:layout_height="match_parent"  tools:context=".MainActivity" >  <RelativeLayout    android:layout_width="match_parent"    android:layout_height="160dp" >    <android.support.v4.view.ViewPager      android:id="@+id/viewpager"      android:layout_width="match_parent"      android:layout_height="match_parent" />    <LinearLayout      android:layout_width="match_parent"      android:layout_height="40dp"      android:layout_alignParentBottom="true"      android:background="#66000000"      android:gravity="center_horizontal"      android:orientation="vertical"      android:padding="5dp" >      <TextView        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:singleLine="true"        android:text="和谐社会,和谐社会,和谐社会,和谐社会"        android:textColor="@android:color/white" />      <LinearLayout        android:id="@+id/ll_point_container"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_marginTop="5dp"        android:orientation="horizontal" >      </LinearLayout>    </LinearLayout>  </RelativeLayout></RelativeLayout>

原标题:Android自定义控件5

关键词:Android

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录