【问题标题】:How we can create a horizontal listview without using a recyclerview?我们如何在不使用 recyclerview 的情况下创建水平列表视图?
【发布时间】:2019-05-09 23:29:42
【问题描述】:
 ListView listview = new ListView(context);

        LinearLayout.LayoutParams layout_190 = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
        listview.setLayoutParams(layout_190);
        listview.setAdapter(adapterViewAndroid);
        relativeLayout_716.addView(listview);

【问题讨论】:

    标签: android android-layout listview android-recyclerview android-listview


    【解决方案1】:

    你不能使用listView横向显示项目,你应该使用github.com/MeetMe/Android-HorizontalListView中的recyclerView或者自定义listView

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-05-07
      • 1970-01-01
      • 2018-09-12
      • 1970-01-01
      • 1970-01-01
      • 2015-05-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多