的问题是,该教程使用RecyclerView,我有另一种看法,我想使用的只是一个简单的ScrollView具有相对的观点:

xmlns:app="http://schemas.android.com/apk/res-auto"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

app:layout_behavior="@string/appbar_scrolling_view_behavior">

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:paddingLeft="20dp"

android:paddingRight="20dp" >

android:id="@+id/loggedInTitle"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_alignParentLeft="true"

android:layout_below="@+id/separator1"

android:layout_marginLeft="10dp"

android:layout_marginTop="15dp"

android:text="@string/profile_logged_in_with_title"

android:textSize="18sp" />

android:id="@+id/loggedInPlatformLogo"

android:layout_width="95dp"

android:layout_height="30dp"

android:layout_alignBottom="@+id/loggedInTitle"

android:layout_centerHorizontal="true"

android:layout_marginBottom="-4dp"

android:layout_marginLeft="30dp"

android:layout_toRightOf="@+id/loggedInTitle"

android:background="@drawable/facebook_logo"

android:gravity="center_horizontal|center_vertical" />

android:id="@+id/separator2"

android:layout_width="match_parent"

android:layout_height="1dp"

android:layout_alignLeft="@+id/separator1"

android:layout_below="@+id/loggedInTitle"

android:layout_marginTop="17dp"

android:background="@android:color/darker_gray" />

android:id="@+id/homeIcon"

android:layout_width="30dp"

android:layout_height="30dp"

android:layout_alignLeft="@+id/loggedInTitle"

android:layout_below="@+id/separator2"

android:layout_marginTop="10dp"

android:background="@drawable/home_icon" />

android:id="@+id/homeTitle"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_alignBottom="@+id/homeIcon"

android:layout_marginBottom="4dp"

android:layout_marginLeft="15dp"

android:layout_toRightOf="@+id/homeIcon"

android:text="@string/profile_home_title"

android:textSize="18sp"

android:textStyle="bold" />

android:id="@+id/homeAddressEdit"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_alignLeft="@+id/homeIcon"

android:layout_below="@+id/homeIcon"

android:layout_marginTop="2dp"

android:ems="10"

android:hint="@string/profile_home_address_hint"

android:inputType="textAutoComplete"

android:textSize="16sp" />

android:id="@+id/separator3"

android:layout_width="match_parent"

android:layout_height="1dp"

android:layout_alignLeft="@+id/separator1"

android:layout_below="@+id/homeAddressEdit"

android:layout_marginTop="8dp"

android:background="@android:color/darker_gray" />

android:id="@+id/workIcon"

android:layout_width="30dp"

android:layout_height="30dp"

android:layout_alignLeft="@+id/homeIcon"

android:layout_below="@+id/separator3"

android:layout_marginTop="10dp"

android:background="@drawable/work_icon" />

android:id="@+id/workTitle"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_alignBottom="@+id/workIcon"

android:layout_marginBottom="4dp"

android:layout_marginLeft="15dp"

android:layout_toRightOf="@+id/workIcon"

android:text="@string/profile_work_title"

android:textSize="18sp"

android:textStyle="bold" />

android:id="@+id/workAddressEdit"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_alignLeft="@+id/workIcon"

android:layout_below="@+id/workIcon"

android:layout_marginTop="2dp"

android:ems="10"

android:hint="@string/profile_work_address_hint"

android:inputType="textAutoComplete"

android:textSize="16sp" />

android:id="@+id/separator4"

android:layout_width="match_parent"

android:layout_height="1dp"

android:layout_alignLeft="@+id/separator1"

android:layout_below="@+id/workAddressEdit"

android:layout_marginTop="8dp"

android:background="@android:color/darker_gray" />

android:id="@+id/privacyIcon"

android:layout_width="30dp"

android:layout_height="30dp"

android:layout_alignLeft="@+id/workIcon"

android:layout_below="@+id/separator4"

android:layout_marginTop="13dp"

android:background="@drawable/privacy_icon" />

android:id="@+id/privacyTitle"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_alignBottom="@+id/privacyIcon"

android:layout_marginBottom="4dp"

android:layout_marginLeft="15dp"

android:layout_toRightOf="@+id/privacyIcon"

android:text="@string/profile_privacy_title"

android:textSize="18sp"

android:textStyle="bold" />

android:id="@+id/privacySpinner"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_alignLeft="@+id/privacyIcon"

android:layout_below="@+id/privacyIcon"

android:layout_marginBottom="4dp"

android:layout_marginTop="-3dp"

android:entries="@array/profile_privacy_settings"

android:prompt="@string/profile_privacy_title" />

于是,我就代替RecyclerView在该教程的布局xml引用了这个视图,但结果是我无法滚动视图。 我想这是因为ScrollView与灵活的空间模式不兼容。

下一页尝试尝试上述ScrollView布局转换适配器才能使用RecyclerViewfollowing this Android Developers example,但我不知道该怎么做,因为我得到了太多的元素结合和示例由简单的阵列字符串。

为了匹配上面的布局或其他更简单的解决方案(也许RecyclerView不是最好的方向),如果它存在,我真的很感激适配器的样子。

2015-07-11

Jjang

android的适配器用于,在Android中实现适用于RecyclerView的适配器相关推荐

  1. android 加载列表占位,Android Paging库使用详解(小结)

    Android分页包能够更轻易地在RecyclerView里面缓慢且优雅地加载数据. 许多应用从数据源消耗数据, 数据源里面有大量的数据, 但是一次却只展示一小部分. 分页包帮助应用观测和展示大量数据 ...

  2. takephoto 框架_GitHub - Smecking/TakePhoto: 一款用于在Android设备上获取照片(拍照或从相册、文件中选择)、裁剪图片、压缩图片的开源工具库...

    TakePhoto是一款用于在Android设备上获取照片(拍照或从相册.文件中选择).裁剪图片.压缩图片的开源工具库,目前最新版本4.0.2. 3.0以下版本及API说明,详见TakePhoto2. ...

  3. Java泛型应用之打造Android中ListView和GridView万能适配器【CommonAdapter】--超简洁写法

    转载请注明出处:http://blog.csdn.net/linglongxin24/article/details/52813227 [DylanAndroid的csdn博客] 在android中使 ...

  4. 【Android游戏开发二十三】自定义ListView【通用】适配器并实现监听控件!

    本站文章均为 李华明Himi 原创,转载务必在明显处注明: 转载自[黑米GameDev街区] 原文链接: http://www.himigame.com/android-game/374.html L ...

  5. Android进阶笔记09:Android 万能适配器

    1. Android 万能适配器      项目中Listview GridView几乎是必用的组件,Android也提供一套机制,为这些控件绑定数据,那就是Adapter.用起来虽然还不错,但每次都 ...

  6. 2017 github 上android 源码(适合工作中开发)

    转载: http://blog.csdn.NET/a774057695/article/details/49889437 https://github.com/XinRan5312/Android-o ...

  7. Android 平台应用软件开发(学习中)

    Android 中的五种布局 1,LinearLayout(线性布局),RelativeLayout(相对布局),FrameLayout(帧布局),AbsoluteLayout(绝对布局),Table ...

  8. 【转】Android菜单详解——理解android中的Menu--不错

    原文网址:http://www.cnblogs.com/qingblog/archive/2012/06/08/2541709.html 前言 今天看了pro android 3中menu这一章,对A ...

  9. android UI进阶之实现listview中checkbox的多选与记录

    今天继续和大家分享涉及到listview的内容.在很多时候,我们会用到listview和checkbox配合来提供给用户一些选择操作.比如在一个 清单页面,我们需要记录用户勾选了哪些条目.这个的实现并 ...

  10. Android菜单详解——理解android中的Menu

    前言 今天看了pro android 3中menu这一章,对Android的整个menu体系有了进一步的了解,故整理下笔记与大家分享. PS:强烈推荐<Pro Android 3>,是我至 ...

最新文章

  1. ubuntu14.04系统扩容的方法
  2. pycharm调试显示图片
  3. python填写excel-python读写Excel
  4. Java selenium 获取表格数据_Selenium Webdriver如何通过获取Excel输入从表中选择记录...
  5. 禁止复制的网页怎么复制
  6. 二叉树中任意两个节点的距离
  7. linux 第一个内核模块Hello World
  8. 节省50%部署时间的5大KS8服务
  9. java判断优先级代码,Java如何查看线程的优先级?
  10. oracle11 rman全备,Oracle 11g非归档模式下mount状态RMAN究竟能不能进行全备?
  11. spring源码:注册后置处理器
  12. java swf pdf_基于Java SWFTools实现把pdf转成swf
  13. redis 客户端操作命令
  14. 雷达为什么要进行脉冲压缩
  15. u盘文件看得见却打不开_u盘可以显示但是打不开怎么办
  16. 【UVM基础】虚序列器与虚序列(virtual sequencer与virtual sequence)快速上手指南
  17. Using the GNU Compiler Collection 目录翻译
  18. java中between and什么意思,关于 oracle between and的用法!
  19. 宝塔怎么看蜘蛛爬取日志
  20. 关于波特率与字节传输速率计算

热门文章

  1. 架构高并发方案_架构 - 抖音微博等短视频千万级高可用、高并发架构设计
  2. JavaScript的单线程性质以及定时器的工作原理
  3. 深入理解java虚拟机 - 垃圾回收机制(GC)
  4. Python3.2官方文档翻译--标准库概览(一)
  5. STM32 使用DMA+DAC+TIMER 输出正弦波
  6. 家庭洗车APP --- Androidclient开展 之 网络框架包介绍(一)
  7. java初学。加载图片
  8. POJ1159 Palindrome(dp)
  9. MooTools 1.4 源码分析 - Fx
  10. Zookeeper集群leader选举机制