`
zhangfy068
  • 浏览: 143949 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

手机QQ UI界面分析

 
阅读更多

一、设置界面。

采用PerferenceActivity 与Perference完美配置在一起。

类似android自身的设置界面也是采用此种方式。

 配置Activity,指定了一个主题

        <!--  配置这个属性表示切换横竖屏的时候,不会调用oncreate()方法而是调用onConfigchanges -->
        <activity android:name=".SettingActivity"
                  android:label="设置与帮助"
                  android:theme="@style/Default"
                  android:configChanges="keyboardHidden|orientation" >

 

顶部是使用自定义WindowTitle,也可以先获得第一个ScreenPrefernces,然后自行添加的headView 

//Light改变了  "消息通知"这一栏的明亮程度

<style name="Default.NoTitleBar" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:textColorPrimaryInverse">@color/traffic_txt</item>   
        <item name="android:windowBackground">@color/window_bg</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowTitleStyle">@style/CustomWindowTitleText</item> 
        <item name="android:windowTitleBackgroundStyle">@style/CustomWindowTitleBackground</item>
        <item name="android:checkboxStyle">@style/customCheckBox</item>
        <item name="android:listViewStyle">@style/customListView</item>

 设置的配置文件。

<PreferenceScreen
	xmlns:android="http://schemas.android.com/apk/res/android">
	
    <PreferenceCategory android:title="消息通知"> 
        <CheckBoxPreference android:title="开启声音" android:key="开启声音" android:summary="当有新消息通知时播放声音提示" android:summaryOn="选中了我" android:summaryOff="没选中我" android:defaultValue="false"/>
        <CheckBoxPreference android:title="开启震动" android:key="开启震动" android:summary="当有新消息通知时震动提示" android:defaultValue="true" />    
    </PreferenceCategory>
    
    <PreferenceCategory android:title="图片接收">	
        <CheckBoxPreference android:title="自动接收图片" android:key="自动接收图片" android:summary="GPRS,3G网络下自动接收并显示图片" android:defaultValue="false" >
         </CheckBoxPreference>       
    </PreferenceCategory>
    
    <PreferenceCategory android:title="显示" >  
        <CheckBoxPreference android:title="开启横屏模式" android:key="开启横屏模式" android:defaultValue="true" />
        <CheckBoxPreference android:title="显示系统栏挂机图标" android:key="显示系统栏挂机图标" android:summary="后台运行时,在系统栏显示程序图标" android:defaultValue="true" />
        <PreferenceScreen android:title="更换皮肤">
            <intent android:targetPackage="com.genius.demo" android:targetClass="com.genius.demo.SkinActivity" />
        </PreferenceScreen>
        
    </PreferenceCategory>
    
    <PreferenceCategory android:title="辅助功能">
        <CheckBoxPreference android:title="开启截屏功能" android:key="开启截屏功能" android:summary="摇晃手机即可截图(在QQ外截图需root权限)" android:defaultValue="false" />
        <CheckBoxPreference android:title="上报我的地理位置" android:key="上报我的地理位置" android:summary="上报地理位置信息以便附近的人能够找到我" android:defaultValue="false" />
        <PreferenceScreen android:title="查看流量统计" android:summary="使用手机QQ所产生的上行和下行流量">
            <intent android:targetPackage="com.genius.demo" android:targetClass="com.genius.demo.TrafficStatActivity" />
        </PreferenceScreen>

    </PreferenceCategory>
    
    <PreferenceCategory android:title="帮助">
        <PreferenceScreen android:title="反馈建议" android:summary="反馈建议">
            <intent android:action="android.intent.action.VIEW" android:data="http://wap.3g.qq.com/g/s?aid=wapsupport&amp;amp;fid=647" />
        </PreferenceScreen>
        <PreferenceScreen android:title="好友设置" android:summary="好友设置">
            <intent android:targetPackage="com.genius.demo" android:targetClass="com.genius.demo.FriendInfoActivity" />
        </PreferenceScreen>
    </PreferenceCategory>
</PreferenceScreen>

 

 

二、查看流量统计

 


 
 

 

页面布局
 中间的 采用include的形式进去的。里面采用的布局是一个tableLayout。注意到中间的矩形周边有圆角没。那是采用shape作为背景的。

 

table布局文件

<?xml version="1.0" encoding="UTF-8"?>
<!-- shape_bg作为背景配置 -->
<TableLayout 
	android:background="@drawable/shape_bg" 
	android:paddingLeft="6.0dip" 
	android:paddingTop="5.0dip" 
	android:paddingRight="6.0dip" 
	android:paddingBottom="5.0dip" 
	android:layout_width="fill_parent" 
	android:layout_height="wrap_content" 
	android:layout_marginLeft="8.0dip" 
	android:layout_marginTop="0.0dip" 
	android:layout_marginRight="8.0dip" 
	android:layout_marginBottom="9.0dip"
	
    xmlns:android="http://schemas.android.com/apk/res/android">
    
    
    <TableRow>
        <TextView android:textSize="14.0sp" android:textColor="@color/traffic_txt" android:padding="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" android:layout_weight="1.0" />
        <TextView android:textSize="14.0sp" android:textColor="@color/traffic_txt" android:padding="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="发送" android:layout_weight="1.0" />
        <TextView android:textSize="14.0sp" android:textColor="@color/traffic_txt" android:padding="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="接收" android:layout_weight="1.0" />
    </TableRow>
    <TableRow>
        <TextView android:textSize="14.0sp" android:textColor="@color/traffic_txt" android:padding="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="基础聊天" android:layout_weight="1.0" />
        <TextView android:textSize="14.0sp" android:textColor="@color/traffic_data" android:padding="5.0dip" android:layout_width="fill_parent" android:id="@+id/base_send_trafic" android:text="34 KB" android:layout_height="wrap_content" android:layout_weight="1.0" />
        <TextView android:textSize="14.0sp" android:textColor="@color/traffic_data" android:padding="5.0dip" android:layout_width="fill_parent" android:id="@+id/base_recv_trafic" android:text="15 KB" android:layout_height="wrap_content" android:layout_weight="1.0" />
    </TableRow>
    <TableRow>
        <TextView android:textSize="14.0sp" android:textColor="@color/traffic_txt" android:padding="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="图片" android:layout_weight="1.0" />
        <TextView android:textSize="14.0sp" android:textColor="@color/traffic_data"  android:padding="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="0 bytes" android:layout_weight="1.0" />
        <TextView android:textSize="14.0sp" android:textColor="@color/traffic_data"  android:padding="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="0 bytes" android:layout_weight="1.0" />
    </TableRow>
    <TableRow>
        <TextView android:textSize="14.0sp" android:textColor="@color/traffic_txt" android:padding="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="语音" android:layout_weight="1.0" />
        <TextView android:textSize="14.0sp" android:textColor="@color/traffic_data" android:padding="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="0 bytes" android:layout_weight="1.0" />
        <TextView android:textSize="14.0sp" android:textColor="@color/traffic_data" android:padding="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="0 bytes" android:layout_weight="1.0" />
    </TableRow>
    <TableRow>
        <TextView android:textSize="14.0sp" android:textColor="@color/traffic_txt" android:padding="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="视频" android:layout_weight="1.0" />
        <TextView android:textSize="14.0sp" android:textColor="@color/traffic_data" android:padding="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="0 bytes" android:layout_weight="1.0" />
        <TextView android:textSize="14.0sp" android:textColor="@color/traffic_data" android:padding="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="0 bytes" android:layout_weight="1.0" />
    </TableRow>
    <TableRow>
        <TextView android:textSize="14.0sp" android:textColor="@color/traffic_txt" android:padding="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="小计" android:layout_weight="1.0" />
        <TextView android:textSize="14.0sp" android:textColor="@color/traffic_data" android:text="34 KB" android:id="@+id/total_send_trafic"  android:padding="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" />
        <TextView android:textSize="14.0sp" android:textColor="@color/traffic_data" android:text="15 KB" android:id="@+id/total_recv_trafic" android:padding="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" />
    </TableRow>
</TableLayout>

 shape_bg.xml

<?xml version="1.0" encoding="UTF-8"?>
<shape android:shape="rectangle"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@android:color/white" />
<!--边框的粗细与颜色-->
    <stroke android:width="1.0dip" android:color="#ffe0e0e0" />
    <corners android:radius="4.0dip" />
</shape>

 
 三、好友资料界面

 使用多个LinerLayout来控制。。每个LinerLayout设置一个边界距离。

 

 

 

  • 大小: 234.9 KB
  • 大小: 50.1 KB
  • 大小: 100.8 KB
  • 大小: 101.1 KB
分享到:
评论

相关推荐

    安卓手机的ui界面

    安卓手机的ui界面,安卓手机的ui界面,

    时尚手机界面UI设计素材

    ui设计。 时尚手机界面UI设计素材

    手机UI界面设计器,可以用来快速搭建手机界面

    本软件是个简易手机UI界面设计器,可以用来快速简洁的进行手机UI设计,并生成效果图片。 当你在设计手机界面时,产生了1个绝佳的创意idear,但是周围又没有PhotoShop,这时候这个小巧的软件,就能帮助你快速的搭建...

    Android精仿QQ设置界面.rar

    Android精仿QQ设置界面,只是仿的界面,包括了对android ui界面中一些基本组件的使用,比如checkbox等,这个设置界面参考了手机QQ Android版听功能布局、界面布局,编程者可参考本示例,将此界面编写技巧应用于其它...

    HTML5+CSS3手机菜单隐藏显示UI界面

    手机浏览器中可点击展开类似qq隐藏显示功能 很好用

    android仿QQUI布局

    高仿androidQQ的登陆界面,内附有UI界面图

    Delphi仿QQUI全部源码.zip

    用delphi FMX(FireMonkey)开发的仿 QQ框架界面,可直接编译到手机或桌面端,是学习delphi跨平台开发移动应用的好东西

    高仿QQ2017界面

    项目为安卓平台的一款模仿腾讯QQ的即时通讯APP,整体框架为目前大多数优质应用主流框架(侧滑菜单+底部导航),UI框架可供绝大数应用直接引用,主要模仿腾讯QQ,实现了发送文本与图片功能,应用界面十分漂亮,可供...

    最新版PHP域名授权验证更新系统 v2.6.8 完整源码全新的UI界面 添加了授权搜索功能

    最新版PHP授权验证更新系统 v2.6.8 完整源码全新的UI界面 添加了授权搜索功能更新功能如下: 1、修改了双重验证方式 2、添加了授权搜索功能 3、添加防止客户站重复升级4、零度中国整理教程 2017-6-13 -----修改了...

    一路走来!-手机QQ游戏2008~2009UI设计分享

    最初在2008版本之前,这个项目都没有UI设计的加入,所有UI界面都是开发自己拼图绘制而成,虽然不是很美观,但是基本功能还是比较完善,依托公司这个大的平台,有一定的用户基数。接触:刚接触需求的时候还未入职,...

    MIE J2ME UI库 v1.0

    MIE还可以动态的更换皮肤,通过对配置文件的处理,设计出一套套不同风格的UI界面。 由于时间及个人能力有限,目前MIE还不支持触屏,这会在后期的升级中完善;MIE目前测试通过的手机主要是诺基亚和支持J2ME的MTK手机...

    Android仿QQ用户帐号登录界面效果.rar

    Android仿QQ用户帐号登录界面效果,附上完整的源代码,本实例中的实现方法比较简单,主要是调用一张图片来实现登录界面,另外还添加了一些按钮的美化效果,虽然很简单的例子,但对于android手机界面编程打基础,是挺...

    Android仿QQ微信登录界面效果.rar

    一个界面设计方面的例子,Android仿QQ微信登录界面效果,主要是基于对布局main.xml上控件的操作,模拟出了微信整体的登录界面样式和风格,包括了登录时的弹框和提示,以及文字变颜色等功能,是学习android手机界面...

    Android仿手机QQ侧拉删除 侧滑菜单 消息拖动 下拉刷新等功能.rar

    Android仿手机QQ侧拉删除 侧滑菜单 消息拖动 下拉刷新等功能,这些小功能可很好的应用于你的手机UI界面的设计中,让左面板在主面板的下面,所以我们自定义的控件SlideLayout继承FrameLayout.一般自定义控件会涉及到三...

    【视频4】Android Studio工具使用介紹.avi

    1.本套课程包括Android的核心UI界面设计和后端代码实现,将内容显示在UI界面中。 2.重要涉及UI界面多种点击事件,数据获取,列表,网络接口请求数据,多线程,Handler数据传递,Json数据解析及LitePal数据库使用。 3...

    ae软件ui动效制作手机动效.aep

    ae手机动销的制作。有各种精美软件动效的制作,和三个主体软件各自的动效,三个软件无缝连接。是本人的期末大作业。适合初学者参考借鉴,只是比较基础,没有太多的花里胡哨。希望广大读者喜欢

    【视频2】移动应用开发-JDK安装

    1.本套课程包括Android的核心UI界面设计和后端代码实现,将内容显示在UI界面中。 2.重要涉及UI界面多种点击事件,数据获取,列表,网络接口请求数据,多线程,Handler数据传递,Json数据解析及LitePal数据库使用。 3...

    【视频3】Android Studio安裝.avi

    1.本套课程包括Android的核心UI界面设计和后端代码实现,将内容显示在UI界面中。 2.重要涉及UI界面多种点击事件,数据获取,列表,网络接口请求数据,多线程,Handler数据传递,Json数据解析及LitePal数据库使用。 3...

    【视频1】移动应用开发-android课程介绍

    1.本套课程包括Android的核心UI界面设计和后端代码实现,将内容显示在UI界面中。 2.重要涉及UI界面多种点击事件,数据获取,列表,网络接口请求数据,多线程,Handler数据传递,Json数据解析及LitePal数据库使用。 3...

Global site tag (gtag.js) - Google Analytics