上课前

<?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. [Tomcat]The JRE_HOME environment variable is not defined correctly

    在tomcat的bin目录下,双击startup.bat,闪一下,就没了,后来仔细看了一下黑屏闪的内容如下: the JRE_HOME environment variable is not defi ...

  2. 高精度(x ,/, +, -, %)良心模板

    该模板不是本人的,但是该是加了个头文件哒.不然在某个oj上编译错误. #include <iostream> #include <string> #include <cs ...

  3. (2)HomeAssistant 参数配置

    如果你希望使用其它目录作为配置文件所在地,可以使用以下命令启动home assistant:hass --config path/to/config 在配置目录下,有一个文件configuration ...

  4. kumavis/obj-multiplex

    https://github.com/kumavis/obj-multiplex obj-multiplex多路复用 simple stream multiplexing for objectMode ...

  5. 查看mysql执行的线程,并杀掉他

    文章转自https://www.cnblogs.com/weiok/p/5672238.html 1.进入mysql/bin目录下输入mysqladmin processlist; 2.启动mysql ...

  6. PAT A1028 List Sorting (25 分)——排序,字符串输出用printf

    Excel can sort records according to any column. Now you are supposed to imitate this function. Input ...

  7. Ubuntu系统多屏幕时 触摸屏如何分屏定位

    有很多的使用我们需要在Ubuntu系统中使用多屏幕的情况,但是有的时候是一个屏幕的触摸屏幕,另一个屏幕是非触摸屏幕,但是问题来了, 有的时候在触摸屏幕上点击的时候竟然在非触摸的响应,这种情况非常不友好 ...

  8. Android学习之六种事件响应方法汇总

    java源码如下: 1.MainActivity.java源码 package com.example.responsetest; import android.app.Activity; impor ...

  9. wifidog源码分析 - wifidog原理

    wifidog是一个用于配合认证服务器实现无线网页认证功能的程序,常见的情景就是使用于公共场合的无线wifi接入点,首先移动设备会连接公共wifi接入点,之后会弹出网页要求输入用户名密码,认证过后才能 ...

  10. LED恒流驱动IC汇总

    LED恒流驱动IC汇总 2017年09月22日 11:29:01 阅读数:569 这几天在找LED恒流驱动芯片,无意间在LED网论坛上发现这个帖子,分享给大家! LED恒流IC芯片大盘点        ...