<bdo id='tsJbB'></bdo><ul id='tsJbB'></ul>

    <small id='tsJbB'></small><noframes id='tsJbB'>

  • <i id='tsJbB'><tr id='tsJbB'><dt id='tsJbB'><q id='tsJbB'><span id='tsJbB'><b id='tsJbB'><form id='tsJbB'><ins id='tsJbB'></ins><ul id='tsJbB'></ul><sub id='tsJbB'></sub></form><legend id='tsJbB'></legend><bdo id='tsJbB'><pre id='tsJbB'><center id='tsJbB'></center></pre></bdo></b><th id='tsJbB'></th></span></q></dt></tr></i><div id='tsJbB'><tfoot id='tsJbB'></tfoot><dl id='tsJbB'><fieldset id='tsJbB'></fieldset></dl></div>
  • <tfoot id='tsJbB'></tfoot>

        <legend id='tsJbB'><style id='tsJbB'><dir id='tsJbB'><q id='tsJbB'></q></dir></style></legend>
      1. android回收器视图中的水平和垂直滚动

        Horizontal and vertical scrolling in android recycler view(android回收器视图中的水平和垂直滚动)
              <tfoot id='8Xnfb'></tfoot>
                • <bdo id='8Xnfb'></bdo><ul id='8Xnfb'></ul>
                    <tbody id='8Xnfb'></tbody>
                • <small id='8Xnfb'></small><noframes id='8Xnfb'>

                  <i id='8Xnfb'><tr id='8Xnfb'><dt id='8Xnfb'><q id='8Xnfb'><span id='8Xnfb'><b id='8Xnfb'><form id='8Xnfb'><ins id='8Xnfb'></ins><ul id='8Xnfb'></ul><sub id='8Xnfb'></sub></form><legend id='8Xnfb'></legend><bdo id='8Xnfb'><pre id='8Xnfb'><center id='8Xnfb'></center></pre></bdo></b><th id='8Xnfb'></th></span></q></dt></tr></i><div id='8Xnfb'><tfoot id='8Xnfb'></tfoot><dl id='8Xnfb'><fieldset id='8Xnfb'></fieldset></dl></div>
                • <legend id='8Xnfb'><style id='8Xnfb'><dir id='8Xnfb'><q id='8Xnfb'></q></dir></style></legend>

                  本文介绍了android回收器视图中的水平和垂直滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  I have a requirement where I need to have horizontal scrolling and vertical scrolling in a recycler view. It is based on the type of data that is coming from server. If the response from server is having first element as an array, i need that to be in a horizontal scrolling list and if the second element is a single object, then i need to show it in card. Similarly the order changes and should reflect in the UI. How can I achieve this.

                  解决方案

                  LayoutManager is the class that layout views in RecyclerView. So change recyclerView.setLayoutManager(LayoutManager) if you want to change layout. In your case, if you use LinearLayoutManager, do this by calling:

                  LinearLayoutManager layoutManager = ...
                  recyclerView.setLayoutManager(layoutManager);
                  
                  //when you want horizontal
                  layoutManager.setOrientation(context, LinearLayoutManager.HORIZONTAL);
                  
                  //when you want vertical
                  layoutManager.setOrientation(context, LinearLayoutManager.VERTICAL);
                  

                  这篇关于android回收器视图中的水平和垂直滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How can I use CClistview in COCOS2d Android?(如何在 COCOS2d Android 中使用 CClistview?)
                  cocos2d-android: how to display score(cocos2d-android:如何显示分数)
                  Sqlite database not copied from asset folder Android(Sqlite 数据库未从资产文件夹 Android 复制)
                  SQLite Database Copy Appears Corrupted When Generated by Device and not Emulator(SQLite 数据库副本在由设备而不是模拟器生成时出现损坏)
                  Android file copy(安卓文件拷贝)
                  Android how to detect Copy event of Edittext in android(Android如何在android中检测Edittext的Copy事件)

                        <tbody id='ONFff'></tbody>
                      <i id='ONFff'><tr id='ONFff'><dt id='ONFff'><q id='ONFff'><span id='ONFff'><b id='ONFff'><form id='ONFff'><ins id='ONFff'></ins><ul id='ONFff'></ul><sub id='ONFff'></sub></form><legend id='ONFff'></legend><bdo id='ONFff'><pre id='ONFff'><center id='ONFff'></center></pre></bdo></b><th id='ONFff'></th></span></q></dt></tr></i><div id='ONFff'><tfoot id='ONFff'></tfoot><dl id='ONFff'><fieldset id='ONFff'></fieldset></dl></div>
                        <bdo id='ONFff'></bdo><ul id='ONFff'></ul>
                        <legend id='ONFff'><style id='ONFff'><dir id='ONFff'><q id='ONFff'></q></dir></style></legend>

                      • <tfoot id='ONFff'></tfoot>
                      • <small id='ONFff'></small><noframes id='ONFff'>