Tuesday 12 January 2016

How to make a Gridview with Horizontal scrolling

grid view with horizontal scrolling.jpg
Here for the scrolling Grid View I have use SectionPagerAdapter . Simply what I have done here is that , i have created a Fragment with a layout containing a grid view. And with the help of SectonpagerAdapter the fragment will inflate as many as time can depending upon amount of data we have.
Well my **MainActivity** is as something like this :-
  1. public class MainActivity  {

  2. private ViewPager viewPager;
  3. private SectionPagerAdapter mSectionPagerAdapter;
  4. private ArrayList<GridFragment>fragmentArray;

  5. @Override
  6. public void onCreate(Bundle savedInstanceState)
  7. {
  8.   super.onCreate(savedInstanceState);
  9.   fragmentArray = new ArrayList<GridFragment>();
  10.   getSetupView();
  11.   mSectionPagerAdapter = new SectionPagerAdapter(getSupportFragmentManager());

  12. }
To view the full blog about How to make a Gridview with Horizontal scrolling visit Findnerd.
About Findnerd
FindNerd, a Social Collabaration Tool or Platform or we can say that it is a social network for Developers which will allow IT professional to interact with each other as it is an effective social network for all the web and mobile developers community in the world.
Also Visit findnerd for various Technology Blogs such as iOS, Java, Android Development Blogs etc. and for its various tools such as Session Tracker tool, Desktop Recording Tool, Project Management Tool etc.


No comments:

Post a Comment