android – 我想像scrollview一样google play store

我需要像滚动视图水平视图的游戏商店,但我无法实现它.

我已经尝试过此代码,如果可能请提供链接.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >
   <horizontalscrollview 
   android:id="@+id/horizontalscrollview1" 
   android:layout_width="fill_parent" 
   android:layout_height="wrap_content"
   android:fillViewport="true"
   android:scrollbars="horizontal" >
<GridView
    android:layout_width="500dp"
    android:layout_height="400dp"
    android:id="@+id/gridview"
    android:columnWidth="300dp"
    android:numColumns="3"
    android:horizontalSpacing="10dp"
    android:scrollbars="horizontal">
</GridView>
 </horizontalscrollview>
</RelativeLayout>

我想在我的应用程序中使用这种类型的View请查看截图:

解决方法

你可以使用RecylerView.

linearlayoutmanager linearlayoutmanager = new linearlayoutmanager(getActivity());    
    linearlayoutmanager.setorientation(linearlayoutmanager.HORIZONTAL);

    RecylerView.setLayoutManager(linearlayoutmanager);

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...