上课前

<?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. ES5数组的遍历方式

    /* 遍历数组 */ var arr=[1,2,3,43,55,66,77,99]; /* 遍历数组 function(item,index) */ arr.forEach(function(item ...

  2. 布局:高度已知,布局一个三栏布局,左栏和右栏宽度为200px,中间自适应

    需求:高度已知为200px,写出三栏布局,左栏和右栏各位200px,中间自适应,如下图所示: 方法一:float浮动布局 原理是:定义三个区块,需要注意的是中间的区块放在右边区块的下面,统一设置高度为 ...

  3. Redis本身是单线程线程安全的内存数据库,但是不代表你的使用就是线程安全的

    网上一个错误示例:https://www.cnblogs.com/Simeonwu/p/7881100.html,部分代码如下: package com.me.config; import redis ...

  4. kafka TimeoutException 超时问题解决

    1.报错:: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.NotLeaderForPartition ...

  5. k8s mysql 单点部署

    参考官网:https://kubernetes.io/docs/tasks/run-application/run-replicated-stateful-application/ 20-nproc. ...

  6. vue - 状态管理器 Vuex

    状态管理 vuex是一个专门为vue.js设计的集中式状态管理架构.状态?我把它理解为在data中的属性需要共享给其他vue组件使用的部分,就叫做状态.简单的说就是data中需要共用的属性.

  7. ethereum/EIPs-1077 Executable Signed Messages

    https://github.com/alexvandesande/EIPs/blob/ee2347027e94b93708939f2e448447d030ca2d76/EIPS/eip-1077.m ...

  8. HttpMessageNotReadableException(一)

    1.今天移动端调用接口时候出现下面异常 org.springframework.http.converter.HttpMessageNotReadableException: JSON parse e ...

  9. 如何屏蔽在Skyline的TerraExplorer中加载Shape或者KML等数据时的缓冲提示信息

    在使用TerraExplorer软件或者二次开发自定义打开FLY工程时,以及在已有的FLY工程中导入其他矢量数据,如SHP.WFS图层.KML图层时,总会看到类似下图的提示信息: 有些用户问,如何能屏 ...

  10. LVDS原理及设计指南--以及衍生的B-LVDS-M-LVDS--CML-LVPECL电平等

    LVDS是一种低摆幅的差分信号技术,它使得信号能在差分PCB 线对或平衡电缆上以几百Mbps的速率传输,其低压幅和低电流驱动输出实现了低噪声和低功耗.      IEEE 在两个标准中对LVDS 信号 ...