文档介绍:Android 开发我的新浪微博客户端-阅读微博 UI 篇()
上一篇完成了微博列表的功能,本篇接着做预读微博的功能,本篇主要讲讲 UI
部分的实现,最终实现的效果如上图所示。整个显示页面从上往下分为四部分,
第一部分顶部工具条、第二部分作者头像和名称、第三部分微博正文、第四部分
功能按钮区。
新建名为 作为阅读微博的页面,再 res/layout 目录下新建
名为 的 Layout,代码如下:
代码
<?xml version="" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas./apk/res/android"
android:id="@+id/layout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="3px">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="***@drawable/logo_ss">
</ImageView>
<TextView
android:id="@+id/showName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="#343434"
android:text="阅读微博"
android:textSize="16px">
</TextView>
<ImageButton
android:id="@+id/returnBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/homeBtn"
android:background="***@drawable/bnt_return_selector">
</ImageButton>
<ImageButton
android:id="@+id/homeBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
a