上课前

<?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. arcgis javascript api 事件的监听及移除

    On Style Events 方式 var mapExtentChange = map.on("extent-change", changeHandler); function ...

  2. 深入探究JFreeChart

    1 简介 JFreeChart 是 SourceForge.net 上的一个开源项目,它的源码和 API 都可以免费获得. JFreeChart 的功能非常强大,可以实现饼图 ( 二维和三维 ) ,  ...

  3. easyui的datebox控件如何只要年月不要日谢谢知道的说一下

    例子2015-01 格式easyui-datebox 加上 data-options="formatter:myformatter,parser:myparser"function ...

  4. spring.factories

    在Spring Boot中有一种非常解耦的扩展机制:Spring Factories.这种扩展机制实际上是仿照Java中的SPI扩展机制来实现的. Java SPI机制SPI的全名为Service P ...

  5. 2080 特殊的质数肋骨 USACO (深度优先搜索)

    农民约翰的母牛总是产生最好的肋骨. 你能通过农民约翰和美国农业部标记在每根肋骨上的数字认出它们. 农民约翰确定他卖给买方的是真正的质数肋骨,是因为从右边开始切下肋骨,每次还剩下的肋骨上的数字都组成一个 ...

  6. mysql函数之截取字符串

    文章摘取自http://www.cnblogs.com/zdz8207/p/3765073.html 练习截取字符串函数(五个) mysql索引从1开始 一.mysql截取字符串函数 1.left(s ...

  7. [转]Python shutil 模块

    转自: https://www.cnblogs.com/wuzhiblog/p/6535527.html https://www.cnblogs.com/caibao666/p/6433864.htm ...

  8. PAT A1113 Integer Set Partition (25 分)——排序题

    Given a set of N (>1) positive integers, you are supposed to partition them into two disjoint set ...

  9. QT显示url图片

    QT 显示网络图片我目前的办法就是先下载下来 然后显示  如果有好的办法请相互交流一下 需要调用的头文件 #include <QNetworkAccessManager> #include ...

  10. win10升级至专业版

    前几天脑子一热,买了个电脑,默认系统还是那简单的win10家庭版.作为一个IT从业者,家庭版是很难受的,因为没有组策略....会导致在装一些软件的时候无法修改.所以来动手吧,方式有几种,这里都大概说说 ...