仿新浪微博客户端--界面设计(1)

来源:互联网 发布:奇妙趋势分析软件 编辑:程序博客网 时间:2024/06/08 01:04

仿新浪微博客户端--界面设计(1)


2013年9月16日新浪微博客户端继续开发

其实这些页面已经做好很久了,因为一直有其他事情要做,所以没太多时间发博客。关于新浪微博客户端的界面我想玩过微博的人都比较熟悉了,新版的客户端界面也发生了很大的变化,我这里也无法做到面面俱到,只能参考着来做咯。事先说明,一本人不太会美工,二这个项目只能当作参考,也是作为小巫学习的一个途径。各位有啥问题,自己想法子解决哈。

先来尝尝鲜吧:



以上五个界面就是主界面的效果图啦,布局其实并不复杂就是有点繁琐罢了,一般由三部分组成,顶部是标题栏,中间是显示列表或内容部分,底部是tabbar栏。

下面一个一个界面来说:

首先介绍底部的tabbar吧

/Wwj_sina_weibo/res/layout/tabbar.xml

<?xml version="1.0" encoding="utf-8"?><TabHost xmlns:android="http://schemas.android.com/apk/res/android"    android:id="@android:id/tabhost"    android:layout_width="match_parent"    android:layout_height="match_parent"     >    <LinearLayout        android:layout_width="match_parent"        android:layout_height="match_parent"        android:orientation="vertical" >        <FrameLayout            android:id="@+id/msg_title"            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:visibility="gone" >        </FrameLayout>        <FrameLayout            android:id="@android:id/tabcontent"            android:layout_width="match_parent"            android:layout_height="0.0dip"            android:layout_weight="1.0" />        <!-- TabHost必须要有 TabWidget 否则要报错,我们这里设置它不可见 -->        <TabWidget            android:id="@android:id/tabs"            android:layout_width="fill_parent"            android:layout_height="wrap_content"            android:layout_weight="0.0"            android:visibility="gone" />        <!-- 底部按钮 -->        <RadioGroup            android:id="@+id/main_radio"            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_gravity="bottom"            android:gravity="center_horizontal"            android:orientation="horizontal"             android:background="@drawable/tabbar_background">            <RadioButton                android:id="@+id/tabbar_home"                style="@style/main_tab_bottom"                android:layout_marginTop="2.0dip"                android:drawableTop="@drawable/tabbar_home_selector"                android:tag="tabbar_home"                android:text="@string/home" />            <RadioButton                android:id="@+id/tabbar_message"                style="@style/main_tab_bottom"                android:layout_marginTop="2.0dip"                android:drawableTop="@drawable/tabbar_message_selector"                android:tag="tabbar_message"                android:text="@string/message" />            <RadioButton                android:id="@+id/tabbar_me"                style="@style/main_tab_bottom"                android:layout_marginTop="2.0dip"                android:drawableTop="@drawable/tabbar_selfinfo_selector"                android:tag="tabbar_me"                android:text="@string/me" />            <RadioButton                android:id="@+id/tabbar_discove"                style="@style/main_tab_bottom"                android:layout_marginTop="2.0dip"                android:drawableTop="@drawable/tabbar_discove_selector"                android:tag="tabbar_discove"                android:text="@string/discove" />            <RadioButton                android:id="@+id/tabbar_more"                style="@style/main_tab_bottom"                android:layout_marginTop="2.0dip"                android:drawableTop="@drawable/tabbar_more_selector"                android:tag="tabbar_more"                android:text="@string/more" />        </RadioGroup>    </LinearLayout></TabHost>


这里要说明一下,好像自Android3.0后,为了适应大屏幕的出现,增加了Fragment这个组件,是依赖与Activity的,一个Activity可以有多个Fragment,这样可以实现多交互效果。现在TabActivity都被抛弃了,高版本的SDK基本上不用了,只有低版本的SDK才会用,现在基本上用Fragments来代替这个类。在这里我也不用Fragments来代替它了,反正高版本的会兼容低版本的。


/Wwj_sina_weibo/res/layout/home.xml

微博列表界面

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:id="@+id/ll_home_layout"    android:layout_width="match_parent"    android:layout_height="match_parent"    android:orientation="vertical" >    <!-- 标题头 -->    <include        android:id="@+id/freelook_title_home"        layout="@layout/home_title" />    <!-- 自定义的圆形进度条 -->    <include        android:id="@+id/loginprogres"        layout="@layout/progress" />    <!-- 自定义刷新列表,下拉刷新 -->    <com.wwj.sina.weibo.view.PullToRefreshListView        android:id="@+id/weibolist"        android:layout_width="match_parent"        android:layout_height="match_parent"        android:fastScrollEnabled="true" /></LinearLayout>

/Wwj_sina_weibo/res/layout/home_title.xml

<?xml version="1.0" encoding="utf-8"?><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:id="@+id/home_title_layout"    android:layout_width="match_parent"    android:layout_height="wrap_content"    android:background="@drawable/titlebar_bg_nor" ><Button    android:id="@+id/btn_home_post_weibo"    android:layout_width="wrap_content"    android:layout_height="wrap_content"    android:layout_gravity="left|center_vertical"    android:layout_marginLeft="5.0dip"    android:background="@drawable/widget_edit_icon" /><TextView     android:id="@+id/tv_home_name"    android:layout_width="200dp"    android:layout_height="wrap_content"    android:layout_gravity="center"    android:gravity="center"    android:text="@string/xiaowu"    android:textColor="@color/title_text_color"    android:textSize="@dimen/title_text_size"/><FrameLayout     android:layout_width="wrap_content"    android:layout_height="wrap_content"    android:layout_gravity="right|center_vertical">    <ProgressBar         android:id="@+id/progressbar_home_reload"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_gravity="center"        style="?android:attr/progressBarStyleSmall"        android:visibility="gone"        />    <Button        android:id="@+id/btn_home_reload"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:background="@drawable/title_reload"        /></FrameLayout></FrameLayout>

/Wwj_sina_weibo/res/layout/progress.xml

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:id="@+id/show_progress_layout"    android:layout_width="fill_parent"    android:layout_height="fill_parent"    android:background="@color/white"    android:gravity="center"    android:orientation="horizontal"    android:visibility="gone" >    <ProgressBar        android:id="@+id/progressBar"        style="?android:attr/progressBarStyleLarge"        android:layout_width="30dip"        android:layout_height="30dip"        android:indeterminateDrawable="@drawable/progressbar" />    <TextView        android:id="@+id/progress_tv"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:text="@string/loadinfo"        android:textColor="@color/black" /></LinearLayout>

/Wwj_sina_weibo/res/layout/message.xml

消息界面

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:id="@+id/ll_home_layout"    android:layout_width="match_parent"    android:layout_height="match_parent"    android:orientation="vertical"     android:background="@drawable/titlebar_bg_nor">    <!-- 标题头 -->    <include        android:id="@+id/freelook_home_message"        layout="@layout/message_title" />    <ListView        android:id="@+id/msglist"        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:cacheColorHint="#00000000"        android:divider="#FCCC"        android:dividerHeight="1.0dip"         >    </ListView></LinearLayout>

这里是为了方便以后的扩展,添加了一个ListView来消息列表。

/Wwj_sina_weibo/res/layout/message_title.xml

<?xml version="1.0" encoding="utf-8"?><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:id="@+id/home_title_layout"    android:layout_width="match_parent"    android:layout_height="wrap_content"    android:background="@drawable/titlebar_bg_nor" >    <TextView        android:id="@+id/tv_msg_name"        android:layout_width="200dp"        android:layout_height="wrap_content"        android:layout_gravity="center"        android:gravity="center"        android:text="@string/message"        android:textColor="@color/title_text_color"        android:textSize="@dimen/title_text_size" />    <FrameLayout        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_gravity="right|center_vertical" >        <Button            android:id="@+id/btnWritePrivateMsg"            android:layout_width="wrap_content"            android:layout_height="40dp"            android:layout_marginRight="10dip"            android:background="@drawable/ic_btn_send"            android:text="@string/message_box_write_msg"            android:textSize="12sp" />    </FrameLayout></FrameLayout>

/Wwj_sina_weibo/res/layout/selfinfo.xml

个人资料界面

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="match_parent"    android:layout_height="wrap_content"    android:orientation="vertical" >    <!-- 头布局 -->    <include        android:id="@+id/freelook_title_selfinfo"        android:layout_height="match_parent"        layout="@layout/selfinfo_title" />    <ScrollView        android:layout_width="match_parent"        android:layout_height="match_parent" >        <LinearLayout            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:orientation="vertical" >            <!-- 用户头像及用户名布局 -->            <RelativeLayout                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:layout_gravity="center_horizontal"                android:layout_marginLeft="20dp"                android:layout_marginRight="20dp" >                <FrameLayout                    android:layout_width="wrap_content"                    android:layout_height="115dp"                    android:layout_marginBottom="1dp"                    android:layout_marginLeft="20dp"                    android:layout_marginTop="5dp" >                    <ImageView                        android:id="@+id/user_portrait"                        android:layout_width="114dp"                        android:layout_height="114dp"                        android:layout_margin="3dp"                        android:contentDescription="@string/empty"                        android:scaleType="centerInside"                        android:src="@drawable/portrait" />                    <ImageView                        android:layout_width="114dp"                        android:layout_height="wrap_content"                        android:layout_margin="3dp"                        android:contentDescription="@string/empty"                        android:scaleType="centerInside"                        android:src="@drawable/portrait_round" />                </FrameLayout>                <Button                    android:id="@+id/btnEdit"                    android:layout_width="wrap_content"                    android:layout_height="wrap_content"                    android:layout_alignParentBottom="true"                    android:layout_alignParentRight="true"                    android:layout_marginRight="20dp"                    android:background="@drawable/attend_do"                    android:text="@string/edit" />            </RelativeLayout>            <!-- 用户地址和登录布局 -->            <LinearLayout                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:layout_margin="10dp"                android:gravity="center_horizontal"                android:orientation="vertical" >                <FrameLayout                    android:layout_width="match_parent"                    android:layout_height="wrap_content"                    android:layout_gravity="center_horizontal"                    android:layout_marginBottom="1dp" >                    <ImageButton                        android:layout_width="wrap_content"                        android:layout_height="wrap_content"                        android:layout_gravity="center_horizontal"                        android:background="@null"                        android:contentDescription="@string/empty"                        android:src="@drawable/list_above_nor" />                    <RelativeLayout                        android:layout_width="match_parent"                        android:layout_height="wrap_content"                        android:layout_gravity="center_vertical"                        android:layout_marginLeft="15dp"                        android:layout_marginRight="15dp" >                        <TextView                            android:id="@+id/tv_address"                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:layout_alignParentLeft="true"                            android:layout_alignParentTop="true"                            android:layout_marginLeft="10dp"                            android:text="@string/address"                            android:textColor="#ff333333"                            android:textSize="22sp" />                        <TextView                            android:id="@+id/tv_userAddress"                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:layout_toRightOf="@+id/tv_address"                            android:text="@string/userAddress"                            android:textColor="#ff333333"                            android:textSize="22sp" />                    </RelativeLayout>                </FrameLayout>                <FrameLayout                    android:layout_width="match_parent"                    android:layout_height="wrap_content"                    android:layout_gravity="center_horizontal"                    android:layout_marginBottom="1dp" >                    <ImageButton                        android:layout_width="wrap_content"                        android:layout_height="wrap_content"                        android:layout_gravity="center_horizontal"                        android:background="@null"                        android:contentDescription="@string/empty"                        android:src="@drawable/list_above_nor" />                    <RelativeLayout                        android:layout_width="match_parent"                        android:layout_height="wrap_content"                        android:layout_gravity="center_vertical"                        android:layout_marginLeft="15dp"                        android:layout_marginRight="15dp" >                        <TextView                            android:id="@+id/loginnum"                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:layout_alignParentLeft="true"                            android:layout_alignParentTop="true"                            android:layout_marginLeft="10dp"                            android:paddingTop="5dp"                            android:text="@string/loginNum"                            android:textColor="#ff333333"                            android:textSize="22sp" />                        <TextView                            android:id="@+id/tv_loginNum"                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:layout_alignParentBottom="true"                            android:layout_toRightOf="@+id/loginnum"                            android:text="@string/loginNum2"                            android:textColor="#ff333333"                            android:textSize="22sp" />                    </RelativeLayout>                </FrameLayout>            </LinearLayout>            <!-- 微博话题 粉丝条数布局 -->            <LinearLayout                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:gravity="center_horizontal" >                <RelativeLayout                    android:layout_width="match_parent"                    android:layout_height="wrap_content"                    android:gravity="center_horizontal" >                    <!-- 关注 -->                    <FrameLayout                        android:id="@+id/fl_attend"                        android:layout_width="wrap_content"                        android:layout_height="wrap_content" >                        <ImageButton                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:layout_gravity="center_horizontal"                            android:background="@null"                            android:contentDescription="@string/empty"                            android:src="@drawable/bg_panel_above_left" />                        <LinearLayout                            android:layout_width="match_parent"                            android:layout_height="match_parent"                            android:gravity="center"                            android:orientation="vertical" >                            <TextView                                android:id="@+id/user_attention_num"                                android:layout_width="wrap_content"                                android:layout_height="wrap_content"                                android:paddingTop="2dp"                                android:text="@string/zero"                                android:textColor="@color/blue"                                android:textSize="20sp" >                            </TextView>                            <TextView                                android:layout_width="wrap_content"                                android:layout_height="wrap_content"                                android:gravity="center_vertical"                                android:text="@string/attention"                                android:textColor="#ff333333"                                android:textSize="20sp" >                            </TextView>                        </LinearLayout>                    </FrameLayout>                    <!-- 微博 -->                    <FrameLayout                        android:id="@+id/fl_twitter"                        android:layout_width="wrap_content"                        android:layout_height="wrap_content"                        android:layout_toRightOf="@+id/fl_attend" >                        <ImageButton                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:layout_gravity="center_horizontal"                            android:background="@null"                            android:contentDescription="@string/empty"                            android:src="@drawable/bg_panel_above_right" />                        <LinearLayout                            android:layout_width="match_parent"                            android:layout_height="match_parent"                            android:gravity="center"                            android:orientation="vertical" >                            <TextView                                android:id="@+id/user_weibo_num"                                android:layout_width="wrap_content"                                android:layout_height="wrap_content"                                android:paddingTop="2dp"                                android:text="@string/zero"                                android:textColor="@color/blue"                                android:textSize="20sp" >                            </TextView>                            <TextView                                android:layout_width="wrap_content"                                android:layout_height="wrap_content"                                android:gravity="center_vertical"                                android:text="@string/weibo"                                android:textColor="#ff333333"                                android:textSize="20sp" >                            </TextView>                        </LinearLayout>                    </FrameLayout>                    <!-- 粉丝 -->                    <FrameLayout                        android:id="@+id/fl_fans"                        android:layout_width="wrap_content"                        android:layout_height="wrap_content"                        android:layout_below="@+id/fl_attend" >                        <ImageButton                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:layout_gravity="center_horizontal"                            android:background="@null"                            android:contentDescription="@string/empty"                            android:src="@drawable/bg_panel_below_right" />                        <LinearLayout                            android:layout_width="match_parent"                            android:layout_height="match_parent"                            android:gravity="center"                            android:orientation="vertical" >                            <TextView                                android:id="@+id/user_fans_num"                                android:layout_width="wrap_content"                                android:layout_height="wrap_content"                                android:paddingTop="2dp"                                android:text="@string/zero"                                android:textColor="@color/blue"                                android:textSize="20sp" >                            </TextView>                            <TextView                                android:layout_width="wrap_content"                                android:layout_height="wrap_content"                                android:gravity="center_vertical"                                android:text="@string/fans"                                android:textColor="#ff333333"                                android:textSize="20sp" >                            </TextView>                        </LinearLayout>                    </FrameLayout>                    <!-- 话题 -->                    <FrameLayout                        android:id="@+id/fl_topic"                        android:layout_width="wrap_content"                        android:layout_height="wrap_content"                        android:layout_below="@+id/fl_twitter"                        android:layout_toRightOf="@+id/fl_fans" >                        <ImageButton                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:layout_gravity="center_horizontal"                            android:background="@null"                            android:contentDescription="@string/empty"                            android:src="@drawable/bg_panel_below_right" />                        <LinearLayout                            android:layout_width="match_parent"                            android:layout_height="match_parent"                            android:gravity="center"                            android:orientation="vertical" >                            <TextView                                android:id="@+id/user_topic_num"                                android:layout_width="wrap_content"                                android:layout_height="wrap_content"                                android:paddingTop="2dp"                                android:text="@string/zero"                                android:textColor="@color/blue"                                android:textSize="20sp" >                            </TextView>                            <TextView                                android:layout_width="wrap_content"                                android:layout_height="wrap_content"                                android:gravity="center_vertical"                                android:text="@string/topic"                                android:textColor="#ff333333"                                android:textSize="20sp" >                            </TextView>                        </LinearLayout>                    </FrameLayout>                </RelativeLayout>            </LinearLayout>            <!-- 底部收藏和黑名单 -->            <LinearLayout                android:id="@+id/Userfavlin"                android:layout_width="fill_parent"                android:layout_height="wrap_content"                android:layout_margin="10dp"                android:gravity="center_horizontal"                android:orientation="vertical" >                <FrameLayout                    android:layout_width="fill_parent"                    android:layout_height="wrap_content"                    android:layout_marginBottom="1dp"                    android:gravity="center_horizontal" >                    <ImageButton                        android:id="@+id/user_fav_bt"                        android:layout_width="wrap_content"                        android:layout_height="wrap_content"                        android:layout_gravity="center_horizontal"                        android:background="@null"                        android:contentDescription="@string/empty"                        android:src="@drawable/circle_list_top" />                    <RelativeLayout                        android:layout_width="fill_parent"                        android:layout_height="wrap_content"                        android:layout_gravity="center_vertical"                        android:layout_marginLeft="15dp"                        android:layout_marginRight="15dp"                        android:orientation="horizontal" >                        <ImageView                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:layout_alignParentRight="true"                            android:layout_centerVertical="true"                            android:layout_marginRight="15dp"                            android:contentDescription="@string/empty"                            android:src="@drawable/triangle" />                        <TextView                            android:id="@+id/user_collect_num"                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:layout_alignParentTop="true"                            android:layout_marginLeft="20dp"                            android:layout_toRightOf="@+id/textView1"                            android:text="@string/zero"                            android:textColor="@color/blue"                            android:textSize="22sp" >                        </TextView>                        <TextView                            android:id="@+id/textView1"                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:layout_alignParentLeft="true"                            android:layout_alignParentTop="true"                            android:layout_marginLeft="10dp"                            android:text="@string/favorites"                            android:textColor="#ff333333"                            android:textSize="22sp" />                    </RelativeLayout>                </FrameLayout>                <FrameLayout                    android:layout_width="match_parent"                    android:layout_height="wrap_content"                    android:gravity="center_horizontal" >                    <ImageButton                        android:layout_width="wrap_content"                        android:layout_height="wrap_content"                        android:layout_gravity="center_horizontal"                        android:background="@null"                        android:contentDescription="@string/empty"                        android:src="@drawable/circle_list_bottom" />                    <RelativeLayout                        android:layout_width="match_parent"                        android:layout_height="wrap_content"                        android:layout_gravity="center_vertical"                        android:layout_marginLeft="15dp"                        android:layout_marginRight="15dp"                        android:orientation="horizontal" >                        <TextView                            android:id="@+id/user_blacklist_num"                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:layout_alignParentTop="true"                            android:layout_marginLeft="22dp"                            android:layout_toRightOf="@+id/tv_blacklist"                            android:text="@string/zero"                            android:textColor="@color/blue"                            android:textSize="22sp" >                        </TextView>                        <ImageView                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:layout_alignParentRight="true"                            android:layout_centerVertical="true"                            android:layout_marginRight="15dp"                            android:contentDescription="@string/empty"                            android:src="@drawable/triangle" />                        <TextView                            android:id="@+id/tv_blacklist"                            android:layout_width="wrap_content"                            android:layout_height="wrap_content"                            android:layout_alignParentLeft="true"                            android:layout_alignParentTop="true"                            android:layout_marginLeft="10dp"                            android:text="@string/blacklist"                            android:textColor="#ff333333"                            android:textSize="22sp" />                    </RelativeLayout>                </FrameLayout>            </LinearLayout>        </LinearLayout>    </ScrollView></LinearLayout>

/Wwj_sina_weibo/res/layout/searchinfo.xml

发现界面

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:id="@+id/search_title_layout"    android:layout_width="match_parent"    android:layout_height="wrap_content"    android:background="@drawable/titlebar_bg_nor"    android:orientation="vertical" >    <include        android:id="@+id/title"        layout="@layout/search_title" />    <include        android:id="@+id/search"        layout="@layout/searchpre" />    <ListView        android:id="@+id/searchweibolist"        android:layout_width="match_parent"        android:layout_height="match_parent"        android:cacheColorHint="#00000000"        android:divider="#FCC"        android:dividerHeight="1.0dip"        android:listSelector="#00000000" >    </ListView></LinearLayout>

/Wwj_sina_weibo/res/layout/search_title.xml

<?xml version="1.0" encoding="utf-8"?><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:id="@+id/search_title_layout"    android:layout_width="match_parent"    android:layout_height="wrap_content"    android:background="@drawable/titlebar_bg_nor" >    <TextView        android:id="@+id/tv_search_name"        android:layout_width="200dp"        android:layout_height="wrap_content"        android:layout_gravity="center"        android:gravity="center"        android:text="@string/xiaowu"        android:textColor="@color/title_text_color"        android:textSize="@dimen/title_text_size" />    <FrameLayout        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_gravity="right|center_vertical"        >        <ProgressBar            android:id="@+id/titleprogressBar"            style="?android:attr/progressBarStyleLarge"            android:layout_width="30dip"            android:layout_height="30dip"            android:indeterminateDrawable="@drawable/progressbar"            android:visibility="gone" />        <ImageView            android:id="@+id/title_bt_right"            android:layout_width="wrap_content"            android:layout_height="wrap_content"             android:contentDescription="@string/empty"/>    </FrameLayout></FrameLayout>

/Wwj_sina_weibo/res/layout/searchpre.xml

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:id="@+id/search_title_layout"    android:layout_width="match_parent"    android:layout_height="wrap_content"    android:orientation="vertical" >    <LinearLayout        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:background="@color/white"        android:orientation="horizontal"        android:paddingLeft="5.0dip"        android:paddingRight="5.0dip" >        <RelativeLayout            android:layout_width="match_parent"            android:layout_height="wrap_content" >            <AutoCompleteTextView                android:id="@+id/AutoCompleteTextView01"                style="@style/my_AutoCompleteText_style"                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:completionThreshold="1"                android:hint="@string/soso"                android:paddingLeft="25dp"                android:singleLine="true" />            <Button                android:id="@+id/btnSearch"                android:layout_width="wrap_content"                android:layout_height="wrap_content"                android:layout_alignParentRight="true"                android:layout_alignParentTop="true"                android:background="@drawable/search_button_bg" >            </Button>        </RelativeLayout>    </LinearLayout>    <LinearLayout        android:layout_width="match_parent"        android:layout_height="match_parent"        android:background="@color/white"        android:orientation="vertical"        android:paddingLeft="5dp"        android:paddingRight="5dp" >        <RadioGroup            android:id="@+id/main_radio"            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_gravity="bottom"            android:gravity="center"            android:orientation="horizontal" >            <RadioButton                android:id="@+id/rbSearchWeibo"                style="@style/search_radiobutton_weibo"                android:checked="true"                android:drawableLeft="@drawable/search_radio_1"                android:tag="radio_button0"                android:text="@string/search_weibo"                android:textSize="17.0sp" />            <RadioButton                android:id="@+id/rbSearchUser"                style="@style/search_radiobutton_user"                android:drawableLeft="@drawable/search_radio_2"                android:tag="radio_button1"                android:text="@string/search_user"                android:textSize="17.0sp" />        </RadioGroup>    </LinearLayout></LinearLayout>



/Wwj_sina_weibo/res/layout/more.xml

更多界面

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:id="@+id/more_title_layout"    android:layout_width="match_parent"    android:layout_height="wrap_content"    android:orientation="vertical"    android:weightSum="1.0" >    <include        android:id="@+id/title"        layout="@layout/more_title" />    <ScrollView        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:fadingEdge="none" >        <LinearLayout            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:gravity="center_vertical"            android:orientation="vertical"            android:paddingBottom="10.0dip"            android:paddingLeft="10.0dip"            android:paddingRight="10.0dip"            android:paddingTop="10.0dip" >            <TableLayout                android:id="@+id/MorePageTableLayout_Favorite"                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:shrinkColumns="0"                android:stretchColumns="0" >                <TableRow                    android:id="@+id/more_page_row0"                    android:layout_width="match_parent"                    android:layout_marginLeft="2.0dip"                    android:layout_marginRight="2.0dip"                    android:background="@drawable/more_item_press"                    android:clickable="true"                    android:paddingBottom="16.0dip"                    android:paddingTop="16.0dip" >                    <TextView                        android:layout_width="wrap_content"                        android:layout_height="match_parent"                        android:drawableLeft="@drawable/mylike"                        android:drawablePadding="10.0dip"                        android:gravity="center_vertical"                        android:includeFontPadding="false"                        android:paddingLeft="17.0dip"                        android:text="@string/myweibo"                        android:textColor="#ff333333"                        android:textSize="16.0sp" />                    <ImageView                        android:layout_width="wrap_content"                        android:layout_height="match_parent"                        android:layout_gravity="right"                        android:contentDescription="@string/empty"                        android:gravity="center_vertical"                        android:paddingRight="20.0dip"                        android:src="@drawable/ic_arrow" />                </TableRow>            </TableLayout>            <TextView                android:layout_width="match_parent"                android:layout_height="wrap_content"                android:layout_marginBottom="10.0dip"                android:layout_marginTop="10.0dip"                android:gravity="center_vertical"                android:paddingLeft="4.0dip"                android:text="@string/mysetting"                android:textColor="#ff888888"                android:textSize="16.0sp" />            <TableLayout                android:id="@+id/MorePageTableLayout_Follow"                android:layout_width="fill_parent"                android:layout_height="wrap_content"                android:paddingLeft="1.0dip"                android:shrinkColumns="0"                android:stretchColumns="0" >                <TableRow                    android:id="@+id/more_page_row1"                    android:layout_width="fill_parent"                    android:layout_marginLeft="2.0dip"                    android:layout_marginRight="2.0dip"                    android:background="@drawable/more_itemtop_press"                    android:clickable="true"                    android:paddingBottom="16.0dip"                    android:paddingTop="16.0dip" >                    <TextView                        android:layout_width="wrap_content"                        android:layout_height="fill_parent"                        android:drawableLeft="@drawable/myfollow"                        android:drawablePadding="10.0dip"                        android:gravity="center_vertical"                        android:includeFontPadding="false"                        android:paddingLeft="17.0dip"                        android:text="@string/user_manger"                        android:textColor="#ff333333"                        android:textSize="16.0sp" />                    <ImageView                        android:layout_width="wrap_content"                        android:layout_height="fill_parent"                        android:layout_gravity="right"                        android:contentDescription="@string/empty"                        android:gravity="center_vertical"                        android:paddingRight="20.0dip"                        android:src="@drawable/ic_arrow" />                </TableRow>                <TableRow                    android:id="@+id/more_page_row2"                    android:layout_width="fill_parent"                    android:layout_marginLeft="2.0dip"                    android:layout_marginRight="2.0dip"                    android:background="@drawable/more_itemmiddle_press"                    android:clickable="true"                    android:paddingBottom="16.0dip"                    android:paddingTop="16.0dip" >                    <TextView                        android:layout_width="wrap_content"                        android:layout_height="fill_parent"                        android:drawableLeft="@drawable/search_friends"                        android:drawablePadding="10.0dip"                        android:gravity="center_vertical"                        android:includeFontPadding="false"                        android:paddingLeft="17.0dip"                        android:text="@string/findfrinends"                        android:textColor="#ff333333"                        android:textSize="16.0sp" />                    <ImageView                        android:layout_width="wrap_content"                        android:layout_height="fill_parent"                        android:layout_gravity="right"                        android:contentDescription="@string/empty"                        android:gravity="center_vertical"                        android:paddingRight="20.0dip"                        android:src="@drawable/ic_arrow" />                </TableRow>                <TableRow                    android:id="@+id/more_page_row3"                    android:layout_width="fill_parent"                    android:layout_marginLeft="2.0dip"                    android:layout_marginRight="2.0dip"                    android:background="@drawable/more_itembottom_press"                    android:paddingBottom="16.0dip"                    android:clickable="true"                    android:paddingTop="16.0dip" >                    <TextView                        android:layout_width="wrap_content"                        android:layout_height="fill_parent"                        android:drawableLeft="@drawable/invite_friends"                        android:drawablePadding="10.0dip"                        android:gravity="center_vertical"                        android:includeFontPadding="false"                        android:paddingLeft="17.0dip"                        android:text="@string/invite_frinends"                        android:textColor="#ff333333"                        android:textSize="16.0sp" />                    <ImageView                        android:layout_width="wrap_content"                        android:layout_height="fill_parent"                        android:layout_gravity="right"                        android:contentDescription="@string/empty"                        android:gravity="center_vertical"                        android:paddingRight="20.0dip"                        android:src="@drawable/ic_arrow" />                </TableRow>            </TableLayout>            <TextView                android:layout_width="fill_parent"                android:layout_height="wrap_content"                android:layout_marginBottom="10.0dip"                android:layout_marginTop="10.0dip"                android:gravity="center_vertical"                android:paddingLeft="4.0dip"                android:text="@string/client"                android:textColor="#ff888888"                android:textSize="16.0sp" />            <TableLayout                android:id="@+id/MorePageTableLayout_Client"                android:layout_width="fill_parent"                android:layout_height="wrap_content"                android:paddingLeft="1.0dip"                android:shrinkColumns="0"                android:stretchColumns="0" >                <TableRow                    android:id="@+id/more_page_row4"                    android:layout_width="fill_parent"                    android:layout_marginLeft="2.0dip"                    android:layout_marginRight="2.0dip"                    android:background="@drawable/more_itemtop_press"                    android:clickable="true"                    android:paddingBottom="16.0dip"                    android:paddingTop="16.0dip" >                    <TextView                        android:layout_width="wrap_content"                        android:layout_height="fill_parent"                        android:drawableLeft="@drawable/setting_mor"                        android:drawablePadding="10.0dip"                        android:gravity="center_vertical"                        android:includeFontPadding="false"                        android:paddingLeft="17.0dip"                        android:text="@string/setting"                        android:textColor="#ff333333"                        android:textSize="16.0sp" />                    <ImageView                        android:layout_width="wrap_content"                        android:layout_height="fill_parent"                        android:layout_gravity="right"                        android:contentDescription="@string/empty"                        android:gravity="center_vertical"                        android:paddingRight="20.0dip"                        android:src="@drawable/ic_arrow" />                </TableRow>                <TableRow                    android:id="@+id/more_page_row5"                    android:layout_width="match_parent"                    android:layout_marginLeft="2.0dip"                    android:layout_marginRight="2.0dip"                    android:background="@drawable/more_itemmiddle_press"                    android:clickable="true"                    android:paddingBottom="16.0dip"                    android:paddingTop="16.0dip" >                    <TextView                        android:layout_width="wrap_content"                        android:layout_height="match_parent"                        android:drawableLeft="@drawable/feed_back"                        android:drawablePadding="10.0dip"                        android:gravity="center_vertical"                        android:includeFontPadding="false"                        android:paddingLeft="17.0dip"                        android:text="@string/addcomment"                        android:textColor="#ff333333"                        android:textSize="16.0sp" />                    <ImageView                        android:layout_width="wrap_content"                        android:layout_height="match_parent"                        android:layout_gravity="right"                        android:contentDescription="@string/empty"                        android:gravity="center_vertical"                        android:paddingRight="20.0dip"                        android:src="@drawable/ic_arrow" />                </TableRow>                <TableRow                    android:id="@+id/more_page_row6"                    android:layout_width="fill_parent"                    android:layout_marginLeft="2.0dip"                    android:layout_marginRight="2.0dip"                    android:background="@drawable/more_itemmiddle_press"                    android:clickable="true"                    android:paddingBottom="16.0dip"                    android:paddingTop="16.0dip" >                    <TextView                        android:layout_width="wrap_content"                        android:layout_height="fill_parent"                        android:drawableLeft="@drawable/moreitems_version"                        android:drawablePadding="10.0dip"                        android:gravity="center_vertical"                        android:includeFontPadding="false"                        android:paddingLeft="17.0dip"                        android:text="@string/checkupdate"                        android:textColor="#ff333333"                        android:textSize="16.0sp" />                    <ImageView                        android:layout_width="wrap_content"                        android:layout_height="fill_parent"                        android:layout_gravity="right"                        android:contentDescription="@string/empty"                        android:gravity="center_vertical"                        android:paddingRight="20.0dip"                        android:src="@drawable/ic_arrow" />                </TableRow>                <TableRow                    android:id="@+id/more_page_row7"                    android:layout_width="fill_parent"                    android:layout_marginLeft="2.0dip"                    android:layout_marginRight="2.0dip"                    android:background="@drawable/more_itembottom_press"                    android:clickable="true"                    android:paddingBottom="16.0dip"                    android:paddingTop="16.0dip" >                    <TextView                        android:layout_width="wrap_content"                        android:layout_height="fill_parent"                        android:drawableLeft="@drawable/about_page_mor"                        android:drawablePadding="10.0dip"                        android:gravity="center_vertical"                        android:includeFontPadding="false"                        android:paddingLeft="17.0dip"                        android:text="@string/about"                        android:textColor="#ff333333"                        android:textSize="16.0sp" />                    <ImageView                        android:layout_width="wrap_content"                        android:layout_height="fill_parent"                        android:layout_gravity="right"                        android:contentDescription="@string/empty"                        android:gravity="center_vertical"                        android:paddingRight="20.0dip"                        android:src="@drawable/ic_arrow" />                </TableRow>            </TableLayout>        </LinearLayout>    </ScrollView></LinearLayout>


/Wwj_sina_weibo/res/layout/more_title.xml
<?xml version="1.0" encoding="utf-8"?><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:id="@+id/more_title_layout"    android:layout_width="match_parent"    android:layout_height="wrap_content"    android:background="@drawable/titlebar_bg_nor" >    <TextView        android:id="@+id/tv_more_name"        android:layout_width="200dp"        android:layout_height="wrap_content"        android:layout_gravity="center"        android:gravity="center"        android:text="@string/more"        android:textColor="@color/title_text_color"        android:textSize="@dimen/title_text_size" />    <FrameLayout        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_gravity="right|center_vertical"        >        <ProgressBar            android:id="@+id/titleprogressBar"            style="?android:attr/progressBarStyleLarge"            android:layout_width="30dip"            android:layout_height="30dip"            android:indeterminateDrawable="@drawable/progressbar"            android:visibility="gone" />        <ImageView            android:id="@+id/title_bt_right"            android:layout_width="wrap_content"            android:layout_height="wrap_content"             android:contentDescription="@string/empty"/>    </FrameLayout></FrameLayout>


关于主界面的设计就这么些代码了,好像蛮多的,其实完全可以发挥你自己的想象力,把原型做出来。我这里也是为了开发方便,界面不会做太多修改,等之后能获取到微博数据,再考虑美化界面。



原创粉丝点击