Android仿仿QQ空间主页面的实现空间主页面的实现
今天模仿安卓QQ空间,效果如下:
打开程序的启动画面和导航页面我就不做了,大家可以模仿微信的那个做一下,很简单。这次主要做一下主页面的实现,下面
是主页面的布局:
代码如下:
<?xml version=”1.0″ encoding=”utf-8″?>
<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”
android:layout_width=”fill_parent”
android:layout_height=”fill_parent”
android:background=”@android:color/white”
android:orientation=”vertical” >
<include
android:id=”@+id/top_layout”
layout=”@layout/main” />
</LinearLayout>
里面引用了main这个布局文件,它的xml文件为:
代码如下:
<?xml version=”1.0″ encoding=”utf-8″?>
<RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android”
android:layout_width=”match_parent”
android:layout_height=”match_parent” >
<RelativeLayout
android:layout_width=”fill_parent”
android:layout_height=”40dip”
android:layout_alignParentTop=”true”
android:background=”@drawable/navbar_bg” >
<TextView
android:id=”@+id/titltext”