I am a beginner in android development,so can anybody help me create horizontal list of imageview like shown in the picture.It should be such that the image in the middle is in selected state and details about it can be shown and the list can be scrolled horizontally.
Asked
Active
Viewed 1,117 times
3 Answers
0
You could use a RecyclerView
a good tutorial for this can be found here: http://stacktips.com/tutorials/android/android-recyclerview-example
To make the RecyclerView
horizontal use this lines:
LinearLayoutManager layoutManager
= new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);
yourRecyclerView.setLayoutManager(layoutManager);

Katharina
- 1,612
- 15
- 27
-
how can i get the centre imageview to be highlighted?Actually I need to show details of the imageview that is in the center.So can you help me with that? – Abhinav422 Nov 07 '16 at 16:03
0
like what Tanis.7x said in another question here , it's easier to use RecyclerView with LinearLayoutManager set to horizontal, it will be look like google play store grid, hope it help :).

Community
- 1
- 1

Eko Putra Pratama
- 377
- 3
- 10
0
You can use a library just add compile 'com.github.moondroid.coverflow:library:1.0'
and in your xml
<it.moondroid.coverflow.components.ui.containers.FeatureCoverFlow
android:id="@+id/coverflow"
android:layout_width="match_parent"
android:layout_height="match_parent"
coverflow:coverHeight="@dimen/cover_height"
coverflow:coverWidth="@dimen/cover_width"
coverflow:maxScaleFactor="1.5"
coverflow:reflectionGap="0px"
coverflow:rotationThreshold="0.5"
coverflow:scalingThreshold="0.5"
coverflow:spacing="0.6" />
and in your java add this
mCoverFlow = (FeatureCoverFlow) findViewById(R.id.coverflow);
mCoverFlow.setAdapter(mAdapter);
mCoverFlow.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
//TODO CoverFlow item clicked
}
});
mCoverFlow.setOnScrollPositionListener(new FeatureCoverFlow.OnScrollPositionListener() {
@Override
public void onScrolledToPosition(int position) {
//TODO CoverFlow stopped to position
}
@Override
public void onScrolling() {
//TODO CoverFlow began scrolling
}
});
for more details you can find more lib hear

Neelay Srivastava
- 1,041
- 3
- 15
- 46
-
gradle files not able to compile, says,failed to resolve com.github..moondroid.coverflow:library:jar – Abhinav422 Nov 08 '16 at 02:10
-
Hey,I am getting nullpointerexception at dispatchdraw(Canvas canvas) method of FeatureCoverFlow when using it in xml. Can you help me with that? – Abhinav422 Nov 09 '16 at 10:36
-
@Abhinav422 bro can you share the code where you are getting the error – Neelay Srivastava Nov 09 '16 at 15:51
-
http://stackoverflow.com/questions/40493279/why-am-i-getting-nullpointerexception-when-using-moondroid-coverflow here is the link – Abhinav422 Nov 09 '16 at 17:13