1.  gridView.xml中

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/beijing"
android:orientation="vertical" >

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/blacktitle" >

<Button
android:id="@+id/btnbacktui"
android:textColor="@color/textcolor"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_back"
android:text="@string/fanhui" />

<TextView
android:id="@+id/tuiName"
android:textColor="@color/textcolor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:textSize="18sp" />

</RelativeLayout>

<GridView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:verticalSpacing="15dip"
android:horizontalSpacing="5dip"
android:numColumns="3"
android:id="@+id/gridviewId"
/>
</LinearLayout>

2.  adapter.xml中

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

<!-- android:background="@drawable/beijing"  在此文件文件中不需要--> 
<ImageView
android:layout_width="300dip"
android:layout_height="100dip"
android:id="@+id/imageId"
android:layout_gravity="center"
/>
<TextView
android:layout_width="80dip"
android:layout_height="wrap_content"
android:id="@+id/imageTextId"
android:textColor="@color/content"
android:layout_gravity="center"
/>

</LinearLayout>

Android GridView 行间距过大(一页一行)的更多相关文章

  1. android gridview画分割线

    dongyangzhang android gridview画分割线,如图: 1.先上图: 2.具体实现代码: public class LineGridView extends GridView { ...

  2. Android——GridView(网格视图)相关知识总结贴

    Android API中文文档GridView http://www.apkbus.com/android-14131-1-1.html   Android API 中文 (15) —— GridVi ...

  3. Android GridView增加HeaderView和FooterView的实现

    Android GridView增加HeaderView和FooterView的实现 做的项目中遇到一个问题,需要实现一个页面 页面的上面是一个自定义的View和GridView,当向下滚动屏幕的时候 ...

  4. 有史来最大改变 Android 5.0十大新特性

    有史来最大改变 Android 5.0十大新特性 2014.10.16 14:51:31 来源:腾讯数码作者:腾讯数码 ( 0 条评论 )   距离Android系统上一次重大更新不到一年的时间,谷歌 ...

  5. Android和WCF通信 - 大数据压缩后传输

    Android和WCF通信 - 大数据压缩后传输 本帖来源:http://www.cnblogs.com/lykbk/archive/2013/08/15/3259045.html 最近一直在优化项目 ...

  6. Android ViewPager 打造炫酷欢迎页

    Android ViewPager 打造炫酷欢迎页 ViewPager是Android扩展v4包中的类,这个类可以让用户切换当前的View.对于这个类的应用场景,稍加修改就可以应用到多个环境下.比如: ...

  7. - Shell - sort处理大文件(页 1) - ChinaUnix.net

    - Shell - sort处理大文件(页 1) - ChinaUnix.net sort处理大文件

  8. android使用ViewPager实现欢迎引导页

    android使用ViewPager实现欢迎引导页 大多数APP第一次启动的时候,都会有一个引导界面,左右滑动,到最后一张,用户点击才再次进入主界面.当第二次启动的时候,则直接进入主界面. 这种效果一 ...

  9. 转://Linux大内存页Oracle数据库优化

    PC Server发展到今天,在性能方面有着长足的进步.64位的CPU在数年前都已经进入到寻常的家用PC之中,更别说是更高端的PC Server:在Intel和AMD两大处理器巨头的努力下,x86 C ...

随机推荐

  1. Python菜鸟之路:原生Ajax/Jquery Ajax/IFrame Ajax的选用

    原生Ajax Jquery Ajax IFrame Ajax 如果发送的是普通的数据,比如用户简单的输入.选择的值,推荐使用Jquery ,其次用XMLHttpRquest对象,最次使用IFrame ...

  2. chrome命令

    chrome://settings(设置) chrome://extensions(扩展程序) chrome://history(历史记录) chrome://settings/clearBrowse ...

  3. 对比MySQL,你究竟在什么时候更需要MongoDB(转)

    译文:对比MySQL,你究竟在什么时候更需要MongoDB 原文链接: When Should I Use MongoDB rather than MySQL (or other RDBMS): Th ...

  4. 我的Android进阶之旅------>Android关于HttpsURLConnection一个忽略Https证书是否正确的Https请求工具类

    下面是一个Android HttpsURLConnection忽略Https证书是否正确的Https请求工具类,不需要验证服务器端证书是否正确,也不需要验证服务器证书中的域名是否有效. (PS:建议下 ...

  5. DRF(5) - 频率组件、url注册器、响应器、分页器

    一.频率组件 1.使用DRF简单频率控制实现对用户进行访问频率控制 1)导入模块,定义频率类并继承SimpleRateThrottle # 导入模块 from rest_framework.throt ...

  6. ViewConfiguration 和 ViewConfigurationCompat

    Contains methods to standard constants used in the UI for timeouts, sizes, and distances. 一.几个常用的方法 ...

  7. R-CNN for Small Object Detection

    R-CNN for Small Object Detection 文章方法概括 这篇文章主要讨论针对小目标的目标检测 文章为了证明:对传统R-CNN style的方法进行改进,可以用于小目标检测,并且 ...

  8. 浅析造成 JS 内存泄露的几种原因及解决方案

    内存泄露是指一块被分配的内存既不能使用,又不能回收,直到浏览器进程结束.在C++中,因为是手动管理内存,内存泄露是经常出现的事情.而现在流行的C#和Java等语言采用了自动垃圾回收方法管理内存,正常使 ...

  9. Java并发(7):阻塞队列

    在前面我们接触的队列都是非阻塞队列,比如PriorityQueue.LinkedList(LinkedList是双向链表,它实现了Dequeue接口). 使用非阻塞队列的时候有一个很大问题就是:它不会 ...

  10. BZOJ 一句话题解

    菜鸡刷题记录 [题号:题解] 1008:简单排列组合 #include <bits/stdc++.h> using namespace std; #define ll long long ...