-2

我正试图找到一个方式在android做下面的设计。但我无法找到解决方案。谁能给我一个解决方案?Horizo​​ntall滚动卡片视图与突出的相邻片段

enter image description here

+3

使用'ViewPager'。 – Rohit5k2

+0

使用'viewpager'或'horizo​​ntalScrollView'或'horizo​​ntalRecyclerView' – Madhur

+0

我试过这种方式,但它没有给我想要的结果。所以如果你有任何例子,请分享 –

回答

1

试试这个库为您的应用程序,让您的Horizo​​ntall滚动卡片视图

AppIntro是一个Android库,可以帮助您为应用做一个很酷的介绍,就像Google应用中的介绍一样。

AppIntro git

enter image description here

-1

你应该使用RecyclerView与水平布局。您可以设置水平布局RecyclerView如下方法:

LinearLayoutManager layoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false); 

RecyclerView myRList = (RecyclerView) findViewById(R.id.my_recycler_view); 
myRList.setLayoutManager(layoutManager); 

一个很好的指南使用RecyclerView:Using the RecyclerView

+0

我试了一下。但问题是它给我一个全屏水平视图。我希望它成为演出的形象。 –

+0

您可以为此设置RecyclerView的边距。 你能分享你的xml吗? –