的问题是,该教程使用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. 面试阿里,被一大总监全程质疑前公司
  2. python中魔法方法__str__与__repr__的区别
  3. 复制多级文件夹【应用】
  4. 对dropout的理解详细版
  5. hdu4027Can you answer these queries?
  6. BeanUtils对象之间的复制
  7. ❤️Mybatis编程界的能手—使用注解开发(建议收藏)
  8. Python: 字符串
  9. python网盘开发_python实现网盘自动化操作(GUI版)
  10. python自动化webdriver_轻松自动化---selenium-webdriver(python) (六)
  11. Windows10删除hiberfil.sys
  12. Python+pywin32批量读取带密码的Excel文件数据导出为CSV文件
  13. 安卓自动滑屏脚本_定时滑动屏幕工具脚本下载-定时上下滑动屏幕工具(手机模拟)软件下载v3.1-单游网...
  14. linux群晖文件路径,如何访问本地网络中 Synology NAS 上的文件 (NFS)
  15. 公网域名解析(转自华为云)
  16. 哪些学校不让用matlab,新一轮制裁?部分高校被禁止使用matlab,科学无国界就是一句笑话...
  17. 宇视阿宇NVR支持缓存补录吗?
  18. Unity3D 图片空间和内存占用分析
  19. Java程序员应该看的14本Java书籍!
  20. 地方(少数民族)节假日

热门文章

  1. 《Web漏洞防护》读书笔记——第5章,数据安全
  2. state 全局值 设置 和获取
  3. Android开发遇到的问题
  4. 网易七鱼 Android 高性能日志写入方案
  5. HAL层三类函数及其作用
  6. java后端路由中转
  7. SpringMVC防止表单重复提交
  8. 毕业生的商业软件开发之路 ---- 商业软件开发基础
  9. 如何查看Linux的系统是64位的还是32位的
  10. 深入了解“TXTSETUP.SIF”