标签:png main center mat ica 分享 android logo linear
界面设计及代码:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.abc.myapplication.MainActivity">
<Button
android:id="@+id/but_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="返回"
tools:layout_editor_absoluteY="466dp"
tools:layout_editor_absoluteX="296dp" />
<ListView
android:id="@+id/vip_lv_1"
android:layout_width="394dp"
android:layout_height="418dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
tools:layout_editor_absoluteX="-5dp"
tools:layout_editor_absoluteY="46dp" />
<TextView
android:id="@+id/textView"
android:layout_width="99dp"
android:layout_height="31dp"
android:text="我的好友"
tools:layout_editor_absoluteX="6dp"
tools:layout_editor_absoluteY="16dp" />
</android.support.constraint.ConstraintLayout>

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="20sp"
android:text="A" />
<ImageView
android:id="@+id/vip_friend_item_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:src="@drawable/dashi" />
<TextView
android:id="@+id/vip_friend_item_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_toRightOf="@+id/vip_friend_item_logo"
android:text="Alex"
android:textSize="20sp" />
<ImageView
android:id="@+id/vip_friend_item_image_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:src="@drawable/sportsmain" />
<TextView
android:id="@+id/textView7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="20sp"
android:text="B" />
<TextView
android:id="@+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_toRightOf="@+id/vip_friend_item_logo"
android:text="Bee"
android:textSize="20sp" />
</LinearLayout>

标签:png main center mat ica 分享 android logo linear
原文地址:http://www.cnblogs.com/wanghao1521/p/7019521.html