Android腾讯微薄客户端开发九:博主详情界面篇(广播,听众)
Java代码
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#c0c8d0"
xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout android:id="@+id/user_top" android:paddingTop="5.0dip" android:layout_width="fill_parent" android:layout_height="60.0dip" android:layout_alignParentTop="true" android:layout_centerHorizontal="true">
<ImageView android:id="@+id/user_headicon" android:layout_marginLeft="8.0dip" android:layout_width="45.0dip" android:layout_height="45.0dip" android:layout_alignParentLeft="true"/>
<TextView android:id="@+id/user_nick" android:layout_marginLeft="5.0dip" android:layout_width="wrap_content" android:layout_toRightOf="@id/user_headicon" android:textColor="#384050"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/user_name" android:layout_width="wrap_content" android:layout_marginLeft="10.0dip" android:layout_toRightOf="@id/user_headicon" android:textColor="#687888"
android:layout_height="wrap_content" android:layout_below="@id/user_nick"/>
</RelativeLayout>
<LinearLayout android:paddingLeft="10.0dip" android:paddingRight="10.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:layout_below="@id/user_top">
<ImageView android:background="#a0b0b0" android:layout_width="fill_parent" android:layout_height="1.0dip" android:scaleType="fitCenter"/>
<RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="10.0dip">
<GridView android:gravity="center" android:listSelector="@drawable/listitem_selector" android:id="@+id/user_grid" android:background="@drawable/userinfo_grid_bg" android:layout_width="fill_parent" android:layout_height="wrap_content" android:numColumns="3"/>
</RelativeLayout>
<RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="10.0dip" android:background="@drawable/panel_bg">
<TextView android:id="@+id/user_sex" android:layout_marginLeft="5.0dip" android:layout_alignParentLeft="true" android:layout_width="wrap_content"android:textSize="12.0sp" android:textColor="#788080"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/user_age" android:layout_toRightOf="@id/user_sex" android:layout_width="wrap_content"android:textSize="12.0sp" android:textColor="#788080"
android:layout_height="wrap_content"/>
<TextViewandroid:id="@+id/user_location" android:layout_toRightOf="@id/user_age" android:layout_width="wrap_content" android:textSize="12.0sp" android:textColor="#788080"
android:layout_height="wrap_content"/>
<TextViewandroid:id="@+id/user_verifyinfo" android:layout_marginLeft="5.0dip" android:layout_alignParentLeft="true" android:layout_below="@id/user_sex" android:layout_width="fill_parent" android:textSize="12.0sp" android:textColor="#788080"
android:layout_height="wrap_content"/>
</RelativeLayout>
<RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="10.0dip" android:background="@drawable/panel_bg">
<TextView android:text="最新广播:" android:layout_width="fill_parent" android:layout_marginLeft="5.0dip" android:textSize="12.0sp" android:textColor="#788080"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/user_time" android:layout_width="wrap_content" android:layout_marginLeft="3.0dip" android:layout_marginTop="10.0dip" android:textSize="8.0sp" android:textColor="#788080"
android:layout_height="wrap_content" android:layout_alignParentRight="true"/>
<TextView android:id="@+id/user_origtext" android:layout_width="fill_parent" android:layout_marginLeft="5.0dip" android:textSize="12.0sp" android:textColor="#788080"
android:layout_height="wrap_content" android:layout_below="@id/user_time" android:layout_alignParentLeft="true"/>
</RelativeLayout>
</LinearLayout>
<RelativeLayout android:layout_width="fill_parent" android:layout_height="40.0dip" android:layout_alignParentBottom="true">
<Button android:id="@+id/user_back_btn" android:layout_width="40.0dip" android:drawableTop="@drawable/btn_back_selector" android:background="@drawable/bottom_back_bg"
android:layout_height="40.0dip"android:layout_alignParentLeft="true"/>
<LinearLayout android:id="@+id/widget41" android:layout_marginLeft="60.0dip" android:layout_alignParentBottom="true"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_toRightOf="@id/user_back_btn">
<ImageView android:background="#f8f8f8" android:layout_width="1.0dip" android:layout_height="20.0dip" android:scaleType="fitCenter"/>
<Button android:id="@+id/user_dialog_btn" android:layout_width="wrap_content" android:background="@drawable/bottom_bar_bg"
android:layout_height="wrap_content" android:text="对话"/>
<ImageView android:background="#f8f8f8" android:layout_width="1.0dip" android:layout_height="20.0dip" android:scaleType="fitCenter"/>
<Button android:id="@+id/user_message_btn" android:layout_width="wrap_content" android:background="@drawable/bottom_bar_bg"
android:layout_height="wrap_content" android:text="点评"/>
</LinearLayout>
<Button android:id="@+id/user_tohome_btn" android:layout_width="40.0dip"
android:layout_height="40.0dip" android:drawableTop="@drawable/btn_home_selector" android:background="@drawable/bottom_home_bg" android:layout_alignParentRight="true"/>
</RelativeLayout>
</RelativeLayout>
Java代码
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:gravity="center" android:paddingTop="3.0dip" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content">
<LinearLayout android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextView android:id="@+id/userinfo_grid_num" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#586068"/>
<TextView android:id="@+id/userinfo_grid_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#98a0a0"/>
</LinearLayout>
<ImageView android:id="@+id/userinfo_grid_image" android:src="#d0d0d8" android:visibility="invisible" android:layout_width="1.0dip" android:layout_height="30.0dip" android:layout_marginLeft="30.0dip"/>
</LinearLayout>
页:
[1]