How to implement HorizontalScrollView like Gallery?

后端 未结 6 1902
栀梦
栀梦 2020-11-27 10:39

I want to implement Horizontal ScrollView with some features of Gallery, \"enter<

6条回答
  •  自闭症患者
    2020-11-27 11:19

    Here is a good tutorial with code. Let me know if it works for you! This is also a good tutorial.

    EDIT

    In This example, all you need to do is add this line:

    gallery.setSelection(1);
    

    after setting the adapter to gallery object, that is this line:

    gallery.setAdapter(new ImageAdapter(this));
    

    UPDATE1

    Alright, I got your problem. This open source library is your solution. I also have used it for one of my projects. Hope this will solve your problem finally.

    UPDATE2:

    I would suggest you to go through this tutorial. You might get idea. I think I got your problem, you want the horizontal scrollview with snap. Try to search with that keyword on google or out here, you might get your solution.

提交回复
热议问题