上课前

<?xml version="1.0" encoding="utf-8"?>
    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"  
     android:layout_width="fill_parent"  
     android:layout_height="fill_parent"  
     android:fadingEdge="vertical">  
    <RelativeLayout  
      android:layout_width="fill_parent"   
      android:layout_height="wrap_content">

<ImageButton
                android:id="@+id/byButton1"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_alignParentLeft="true"
                android:layout_alignParentTop="true"
                android:src="@drawable/empty_p" />

<ImageButton
                android:id="@+id/byButton2"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_below="@+id/byButton1"
                android:src="@drawable/empty_p" />

<ImageButton
                android:id="@+id/byButton3"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_below="@+id/byButton2"
                android:src="@drawable/empty_p" />

<ImageButton
                android:id="@+id/byButton4"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_below="@+id/byButton3"
                android:src="@drawable/empty_p" />

<ImageButton
                android:id="@+id/byButton5"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_below="@+id/byButton4"
                android:src="@drawable/empty_p" />

<ImageButton
                android:id="@+id/byButton6"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_below="@+id/byButton5"
                android:src="@drawable/empty_p" />

<ImageButton
                android:id="@+id/byButton7"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_below="@+id/byButton6"
                android:src="@drawable/empty_p" />

<ImageButton
                android:id="@+id/byButton8"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_below="@+id/byButton7"
                android:src="@drawable/empty_p" />

<ImageButton
                android:id="@+id/byButton9"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_below="@+id/byButton8"
                android:src="@drawable/empty_p" />          
        
    </RelativeLayout>  
    </ScrollView>

上完课后知道用Listview适配器便可达到我想要的

最新一课 老师指点用Listview适配器的更多相关文章

  1. Android—万能ListView适配器

    ListView是开发中最常用的控件了,但是总是会写重复的代码,浪费时间又没有意义. 最近参考一些资料,发现一个万能ListView适配器,代码量少,节省时间,总结一下分享给大家. 首先有一个自定义的 ...

  2. android之ListView,详细介绍实现步骤,举例,自定义listview适配器

    android之ListView,详细介绍实现步骤,举例,自定义listview适配器 本文来源于www.ifyao.com禁止转载!www.ifyao.com android中如何使用listVie ...

  3. 自定义ListView适配器

    继承BaseAdapter类 覆盖以下4个方法: @Override public int getCount() { return users.size(); } @Override public O ...

  4. 自定义ListView适配器Adapter引用布局文件的情况下实现点击列表项时背景颜色为灰色

    listview控件设置适配器的时候,如果使用自定义的adapter,比如MyArrayAdapter extends ArrayAdapter<String> 如果listitem布局文 ...

  5. Android开发之适配器-ListView适配器的重复数据

    适配器是Android中的数据与View视图的桥梁,作用就是将数据通过适配器显示到对应的View视图上. 工作中,在用ListView做适配器数据时候,有些人肯定碰见过,如何优化效率,但是又出现重复数 ...

  6. 代码优化>>>Android ListView适配器三级优化详解

    转载本专栏每一篇博客请注明转载出处地址,尊重原创.此博客转载链接地址:点击打开链接  http://blog.csdn.net/qq_32059827/article/details/52718489 ...

  7. 【SpringMVC笔记】第三课 处理器映射器+处理器适配器

    第二课的例子中,在springmvc.xml中配置使用了第一种处理器映射器和处理器适配器,如下所示. <!-- 配置第一种处理器映射器 BeanNameUrlHandlerMapping --& ...

  8. ListView适配器Adapter介绍与优化

    一.ListView与Adapter的关系 ListView是Android开发过程中较为常见的组件之一,它将数据以列表的形式展现出来.一般而言,一个ListView由以下三个元素组成: 1.View ...

  9. [Rosa]Android ListView 适配器原理及优化(转)

    ListView的Adapter的作用如下图所示:   Adapter的作用就是ListView界面与数据之间的桥梁,当列表里的每一项显示到页面时,都会调用Adapter的getView方法返回一个V ...

随机推荐

  1. vs2008内存泄露检測得到完美解决

    版权声明:原创文章.转载请注明出处.本博新地址www.iaccepted.net https://blog.csdn.net/IAccepted/article/details/27646679 Vi ...

  2. 理解 JavaScript 中的 for…of 循环

    什么是 for…of 循环 for...of 语句创建一个循环来迭代可迭代的对象.在 ES6 中引入的 for...of 循环,以替代 for...in 和 forEach() ,并支持新的迭代协议. ...

  3. 《深入理解Java虚拟机》笔记(转)

    文章来自http://www.cnblogs.com/tianchi/archive/2012/11/11/2761631.html 在C里面我们想执行一段自己编写的机器指令的方法大概如下: type ...

  4. 崩 oj 1768 最大子矩阵

    描述 已知矩阵的大小定义为矩阵中所有元素的和.给定一个矩阵,你的任务是找到最大的非空(大小至少是1 * 1)子矩阵.比如,如下4 * 4的矩阵0 -2 -7  0 9  2 -6  2 -4  1 - ...

  5. 安装win10操作系统的设备将要突破10亿台

    导读 该公司最初的目标是在发布后的三年内在 10 亿台设备上运行 Windows 10. 据微软高管梅赫迪 (Yusuf Mehdi) 周四在 Twitter 上透露,目前已经有 8 亿多台设备安装了 ...

  6. 【Codeforces 467D】Fedor and Essay

    Codeforces 467 D 题意:给\(m​\)个单词,以及\(n​\)个置换关系,问将\(m​\)个单词替换多次后其中所含的最少的\(R​\)的数量以及满足这个数量的最短总长度 思路:首先将置 ...

  7. [TPYBoard - Micropython之会python就能做硬件 开篇]会python就能做硬件!

    转载请注明:@小五义http://www.cnblogs.com/xiaowuyiQQ群:64770604 会python就能做硬件! 在写这套教程之前,首先感觉山东萝卜电子科技有限公司(turnip ...

  8. CDH hive-1.1.0-cdh5.10.0 安装

    又重新安装Hive,记录一下吧: hadoop早已经装上了. cdh5的hive下载地址: http://archive.cloudera.com/cdh5/cdh/5/ 下载文件:hive-1.1. ...

  9. BZOJ3149 CTSC2013 复原 搜索

    传送门 \(N \leq 20\)很适合暴搜-- 第二问最大独立集裸题,\(O(2^NN)\)的算法都能过-- 考虑第一问,使用搜索寻找可行解 每一次枚举一条弦的两个端点,通过位运算计算与其相交的弦的 ...

  10. CSS-Photoshop投影与CSS中box-shadow的转换

    box-shadow是给元素块添加周边阴影效果基本语法是: {box-shadow:[inset] x-offset y-offset blur-radius spread-radiuscolor} ...