-2

I'm new to android. I saw this slideshow and I like it , I don't know how can I make something like this. enter image description here

it has two arrows ,it changes the image every x second.

I couldn't find library like this. Could you help me to find a library or a way to make something like this ?

thanks you

user3718930
  • 381
  • 1
  • 8
  • 19

1 Answers1

3
              ViewPagerAdapter adapter = new ViewPagerAdapter(MainActivity.this,SIZE);
           myPager = (ViewPager) findViewById(R.id.yourViewPager);
              myPager.setAdapter(adapter);
              myPager.setCurrentItem(0);

              // Timer for automatic sliding
              timer  = new Timer();
              timer.schedule(new TimerTask() {
            @Override
            public void run() {
                runOnUiThread(new Runnable() {
                    @Override
                    public void run() {
                        if(count<= SIZE){
                              myPager.setCurrentItem(count);
                              count++;
                              }else{
                                     count = 0;
                                     myPager.setCurrentItem(count);
                              }
                    }
                });
            }
        }, 100, 1000);
       }

For more details

http://saurabhsharma123k.blogspot.in/2014/03/viewpager-for-horizental-screen-slides.html