这几天没事做了一个简单的菜单布局,在这里我没有添加任何的功能只是做了一个简单的布局。看着还可以,就想着与大家分享一下。

代码如下:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/LinearLayout1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".MainActivity" >

<LinearLayout
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:orientation="horizontal"
        android:background="@drawable/beijing" >

<LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_marginTop="4dp"
            android:layout_marginLeft="25dp"
            android:orientation="vertical" >

<ImageView
                android:id="@+id/imageView1"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_marginTop="5dp"
                android:layout_marginLeft="5dp"
                android:src="@drawable/ic_launcher" />
            
            <TextView
                android:id="@+id/textView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="微信"
                android:textSize="10sp"
                android:layout_marginLeft="12dp"/>

</LinearLayout>

<LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_marginLeft="35dp"
            android:layout_marginTop="4dp"
            android:orientation="vertical" >

<ImageView
                android:id="@+id/imageView1"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_marginLeft="5dp"
                android:layout_marginTop="5dp"
                android:src="@drawable/ic_launcher" />

<TextView
                android:id="@+id/textView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="8dp"
                android:text="通讯录"
                android:textSize="10sp" />
        </LinearLayout>

<LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_marginTop="4dp"
            android:layout_marginLeft="35dp"
            android:orientation="vertical" >

<ImageView
                android:id="@+id/imageView2"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_marginTop="5dp"
                android:layout_marginLeft="5dp"
                android:src="@drawable/ic_launcher" />

<TextView
                android:id="@+id/textView2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="发现" 
                android:textSize="10sp"
                android:layout_marginLeft="12dp"/>

</LinearLayout>

<LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_marginTop="4dp"
            android:layout_marginLeft="35dp"
            android:orientation="vertical" >

<ImageView
                android:id="@+id/imageView3"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_marginTop="5dp"
                android:layout_marginLeft="5dp"
                android:src="@drawable/ic_launcher" />

<TextView
                android:id="@+id/textView3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="10sp"
                android:layout_marginLeft="14dp"
                android:text="我" />

</LinearLayout>

</LinearLayout>

</LinearLayout>

说明:在这里主要练习的是空间之间的布局。还有就是空间之间是如何跟好的联系起来的。

1、首先用LinearLayout进行分块,使得将整个的布局,变成一个一个使用的块,然后就是添加控件了,ImageView使图片视图控件,TextView是文字视图控件。

是由一个图片控件和一个文字视图控件组成的,并且在一个LinearLayout里面。

  效果图如下:

android微信简单界面的更多相关文章

  1. [模拟Android微信]主界面

    首先看很像模仿: 走出来: 实现过程: 依赖类库:actionbarsherlock 用actionbarsherlock来实现顶部的搜索的效果. tab用的是Viewpaper实现的. 详细细节: ...

  2. Android ActionBar应用实战,高仿微信主界面的设计

    转载请注明出处:http://blog.csdn.net/guolin_blog/article/details/26365683 经过前面两篇文章的学习,我想大家对ActionBar都已经有一个相对 ...

  3. android 仿微信聊天界面,以及语音录制功能

    extends:http://104zz.iteye.com/blog/1709840 本例为模仿微信聊天界面UI设计,文字发送以及语言录制UI. 1先看效果图:     第一:chat.xml设计 ...

  4. [Android] Android 手机下 仿 微信 客户端 界面 -- 微聊

    Android 手机下 仿 微信 客户端 界面 -- 微聊 (包括聊天列表 + 聊天对话页 + 朋友圈列表页 + 我的/发现 列表页) 项目演示: 功能说明: 1)底部标签切换 (TabHost + ...

  5. Android:日常学习笔记(8)———开发微信聊天界面

    Android:日常学习笔记(8)———开发微信聊天界面 只做Nine-Patch图片 Nine-Patch是一种被特殊处理过的PNG图片,能够指定哪些区域可以被拉升,哪些区域不可以.

  6. 转-Android微信支付

    http://blog.fangjie.info/android微信支付/ Android微信支付 2014-08-09 一.使用微信官方的提供的demo里的appid等 1.微信接口上手指南:(从“ ...

  7. Android Fragment 简单实例

    Android上的界面展示都是通过Activity实现的.Activity实在是太经常使用了.我相信大家都已经很熟悉了,这里就不再赘述. 可是Activity也有它的局限性,相同的界面在手机上显示可能 ...

  8. Android微信登录、分享、支付

    转载需要著名出处: http://blog.csdn.net/lowprofile_coding/article/details/78004224 之前写过微信登录分享支付第一版: http://bl ...

  9. Android APP 简单高效的禁用横竖屏切换

    默认情况下,Android APP的界面会随着手机方向的改变而改变,当手机处于竖屏状态,APP的界面也处于竖屏状态,而当手机处于横屏状态,APP也会自动切换到横屏状态.一般情况下APP的界面都是为竖屏 ...

随机推荐

  1. C# 4.0 新特性之并行运算(Parallel)

    介绍C# 4.0 的新特性之并行运算 Parallel.For - for 循环的并行运算 Parallel.ForEach - foreach 循环的并行运算 Parallel.Invoke - 并 ...

  2. CentOS5.5 下编译安装 LAMP

    大纲 1.安装gcc编译器 2.卸载rpm安装的http和mysql软件 3.编译安装php依赖包 4.安装apache软件 5.安装mysql软件 6.安装php软件 7.安装memcache ph ...

  3. poj3140Contestants Division

    链接 这叫树形DP吗..?断开某条边 求剩下两颗树数权值和的差最小 dfs一遍 枚举边 查了n久 wa n次  dp数组没初始化.. 在poj上1A感觉应该挺爽 #include <iostre ...

  4. -_-#【减少 DOM 访问】“离线”更新节点,再将它们添加到树中

    Minimize DOM Access javascript 之 DOM 优化 <!DOCTYPE html> <html> <head> <meta cha ...

  5. apache开源项目--ibatis

    iBATIS一词来源于“internet”和“abatis”的组合,是一个由Clinton Begin在2001年发起的开放源代码项目.最初侧重于密码软件的开发,现在是一个基于Java的持久层框架.i ...

  6. c#集合类的线程安全

    即位于System.Collections命名空间下的集合,如Hashtable,ArrayList,Stack,Queue等.其均提供了线程同步的一个实现 集合线程同步的问题 public clas ...

  7. LoadRunner 你不知道的事之——内存使用

    LoadRunner的使用相信大家很熟悉,但是可能很少有人去关注一个Vuser 在以线程模式和进程模式下的内存开销情况,下面通过个人的试验得出一组数据供大家参考,只有你真正了解了,才能做的更深入. 测 ...

  8. Problem - 433C - Codeforces解题报告

    对于这题本人刚开始的时候的想法是:先把最大两数差的位置找到然后merge计算一个值再与一连串相同的数做merge后计算一个值比较取最大值输出:可提交后发现不对,于是本人就搜了一下正解发现原来这题的正确 ...

  9. kernel网址

    http://www.kernel.org HTTP https://www.kernel.org/pub/ FTP ftp://ftp.kernel.org/pub/ http://www.oldl ...

  10. bzoj 1226 [SDOI2009]学校食堂Dining(状压DP)

    Description 小F 的学校在城市的一个偏僻角落,所有学生都只好在学校吃饭.学校有一个食堂,虽然简陋,但食堂大厨总能做出让同学们满意的菜肴.当然,不同的人口味也不一定相同,但每个人的口味都可以 ...