1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent" >
  5.  
  6. <RelativeLayout
  7. android:id="@+id/page_top"
  8. android:layout_width="match_parent"
  9. android:layout_height="@dimen/top_title_bar"
  10. android:layout_alignParentTop="true"
  11. android:background="@color/red"
  12. android:gravity="center" >
  13.  
  14. <TextView
  15. android:layout_width="wrap_content"
  16. android:layout_height="wrap_content"
  17. android:text="@string/top_bbs_name"
  18. android:textSize="18sp" />
  19. </RelativeLayout>
  20.  
  21. <ScrollView
  22. android:id="@+id/bbs_scroll_home"
  23. android:layout_width="match_parent"
  24. android:layout_height="fill_parent"
  25. android:layout_below="@id/page_top"
  26. android:scrollbars="none" >
  27.  
  28. <LinearLayout
  29. android:layout_width="match_parent"
  30. android:orientation="vertical"
  31. android:layout_height="190dp" >
  32.  
  33. <com.example.com.wp.souyute.ui.view.ImageViewPapger
  34. android:id="@+id/image_viewpager"
  35. android:layout_width="match_parent"
  36. android:layout_height="150dp"
  37. android:background="@color/white" />
  38.  
  39. <com.example.com.wp.souyute.ui.view.MyGridView
  40. android:id="@+id/section_gview"
  41. android:layout_width="match_parent"
  42. android:layout_height="wrap_content"
  43. android:columnWidth="91dp"
  44. android:listSelector="@color/white"
  45. android:numColumns=""
  46. android:stretchMode="columnWidth" />
  47.  
  48. <com.example.com.wp.souyute.ui.view.ListViewForScrollView
  49. android:id="@+id/home_topics"
  50. android:layout_width="match_parent"
  51. android:layout_height="wrap_content"
  52. android:scrollbars="none" />
  53. </LinearLayout>
  54. </ScrollView>
  55.  
  56. <include layout="@layout/fragment_background_progressbar" />
  57.  
  58. </RelativeLayout>

ScrollView 尽量避免嵌套RelativeLayout,非常惨痛的教训的更多相关文章

  1. 尽量少嵌套无用的div;外部文件尽量使用link而不要使用用@import

    最近的工作又学到了很多东西,在这里记录一下. 1,尽量少嵌套无用的div,这个问题领导很严肃的跟我提过很多次,因为我很喜欢用很多div,而且有很多div都是无存在意义的.后来领导给了我一些资料,我看了 ...

  2. ​ScrollView、ListView嵌套

    1.手动设置ListView高度 经过测试发现,在xml中直接指定ListView的高度,是可以解决这个问题的,但是ListView中的数据是可变的,实际高度还需要实际测量.于是手动代码设置ListV ...

  3. ScrollView与ListView嵌套使用,导致ListView下拉失效

    在一次项目开发中,在Scrollv中嵌套进ListView,当触摸ListView范围下拉时,整个展示页面滑动,而不是ListView内容滑动, 也就是说ListView滑动事件被ScrollView ...

  4. 使用ConcurrentLinkedQueue惨痛的教训【转】

    转自:http://blog.csdn.net/jackpk/article/details/49634577 服务端原本有个定时任务对一个集合ArrayList 中的消息做处理. 因为考虑到处理消息 ...

  5. 使用ConcurrentLinkedQueue惨痛的教训

    服务端原本有个定时任务对一个集合ArrayList 中的消息做处理. 因为考虑到处理消息是先进先出原则,所以优化的时候考虑改用ConcurrentLinkedQueue 当时没仔细深入研究过这个集合就 ...

  6. 关于ScrollView嵌套ListView问题

    Android开发之ScrollView中嵌套ListView的解决方案   原文:http://blog.csdn.net/minimicall/article/details/40983331   ...

  7. 四种方案解决ScrollView嵌套ListView问题(转)

    以下文章转自@安卓泡面 在工作中,曾多次碰到ScrollView嵌套ListView的问题,网上的解决方法有很多种,但是杂而不全.我试过很多种方法,它们各有利弊. 在这里我将会从使用ScrollVie ...

  8. ScrollView嵌套ListView的滑动冲突问题,是看大神的方法的,作为学习以后用的到

    在工作中,曾多次碰到ScrollView嵌套ListView的问题,网上的解决方法有很多种,但是杂而不全.我试过很多种方法,它们各有利弊. 在这里我将会从使用ScrollView嵌套ListView结 ...

  9. 四种方案解决ScrollView嵌套ListView问题

    在工作中,曾多次碰到ScrollView嵌套ListView的问题,网上的解决方法有很多种,但是杂而不全.我试过很多种方法,它们各有利弊. 在这里我将会从使用ScrollView嵌套ListView结 ...

随机推荐

  1. Codeforces13C–Sequence(区间DP)

    题目大意 给定一个含有N个数的序列,要求你对一些数减掉或者加上某个值,使得序列变为非递减的,问你加减的值的总和最少是多少? 题解 一个很显然的结果就是,变化后的每一个值肯定是等于原来序列的某个值,因为 ...

  2. python —print

    今天开始学python了,“装X”安装了最新版本python 3.4.1 然后,print “hello world!" 就出错了... 一搜原来... python v3.0以后的版本pr ...

  3. 【三支火把】---C指针总结

    好久没写博客了,重新学习C语言了的基础课程,发现很多东西都忘记的差不多了,闲来无事,总结一下关于指针的知识,希望能帮到像我一样的菜鸟们: 指针,众所周知是C语言的精华所在,不懂指针的话,你就不要说你学 ...

  4. UOJ#191. 【集训队互测2016】Unknown

    题意:维护一个数列,每个元素是个二维向量,每次可以在后面加一个元素或者删除一个元素.给定P(x,y),询问对于[l,r]区间内的元素$S_i$,$S_i \times P$的最大值是多少. 首先简单地 ...

  5. javascript中bind,apply,call的相同和不同之处

    javasctipt中bind,apply,call的相同点是: 1,都是用来改变this的指向; 2,都可以通过后续参数进行传参; 3,第一个参数都是指定this要指向的对象; 不同点: 1,调用方 ...

  6. Atom实例

    示例[编辑] 一个Atom文档: <?xml version="1.0" encoding="utf-8"?> <feed xmlns=&qu ...

  7. C++ CheckListBox

    实现过程 CCheckListBox    listbox1;     listbox1.AddString("葡萄");     listbox1.AddString(" ...

  8. nginx模块编程之获取客户ip及端口号

    ngx_request_t结构体中有一个connection定义,该定义指向一个ngx_connection_t的结构体: 结构体定义如下: struct ngx_connection_s { voi ...

  9. VisJS 随机图

    <!doctype html> <html> <head> <title>Random nodes</title> <style ty ...

  10. 一个不喜欢读书的Javaer的读书单

    很可惜,从我一开始学技术开始,我就不喜欢看书,严重的时候翻不到两页就会开始狂打瞌睡.很幸运,有互联网能够为我提供很多知识,甚至一些知识从网上看来的会更加权威一些.但是,我的经验告诉我,无论是从功利性的 ...