模拟新闻 APP 的界面 1)写 ListView 之前先写布局: 这里有两种 Item 的布局: 1 <??> 2 <RelativeLayout ="http://schemas.android.com/apk/res/android&qu ...
模拟新闻 APP 的界面
1)写 ListView 之前先写布局:
这里有两种 Item 的布局:
1 <??> 2 <RelativeLayout ="http://schemas.android.com/apk/res/android" 3 android:layout_width="match_parent" 4 android:layout_height="100dp" 5 android:padding="10dp"> 6 7 8 <ImageView 9 android:layout_width="100dp"10 android:layout_height="60dp"11 android:id="@+id/imageView"12 android:background="@mipmap/ic_launcher"13 android:layout_centerVertical="true"14 android:layout_alignParentRight="true" />15 16 <TextView17 android:layout_width="wrap_content"18 android:layout_height="wrap_content"19 android:text="New Text"20 android:id="@+id/tv_title"21 android:maxLines="3"22 android:layout_marginRight="10dp"23 android:layout_alignParentTop="true"24 android:layout_alignParentLeft="true"25 android:layout_toLeftOf="@+id/imageView" />26 27 <TextView28 android:layout_width="wrap_content"29 android:layout_height="wrap_content"30 android:textAppearance="?android:attr/textAppearanceSmall"31 android:text="Small Text"32 android:id="@+id/tv_time"33 android:layout_alignParentBottom="true"34 android:layout_alignParentLeft="true"/>35 </RelativeLayout>
海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com
原标题:Android之ListViewViewPager模拟新闻界面
关键词:Android
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。