<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回收器视图中的水平和垂直滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Android- listview, service mediaplayer, and boolean flags(Android-listview、服务媒体播放器和布尔标志)
                  SharedPreferences amp; boolean(SharedPreferences amp;布尔值)
                  readBooleanArray throws RuntimeException(quot;bad array lengthsquot;)(readBooleanArray 抛出 RuntimeException(“错误的数组长度))
                  CheckBox[] with onClickListener[]?(带有 onClickListener[] 的 CheckBox[]?)
                  Android: How to check if Google is available?(Android:如何检查 Google 是否可用?)
                  android resolve .local (mDNS)(android 解析 .local (mDNS))

                        <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'>