LoginSignup
0
0

More than 3 years have passed since last update.

Android ViewPager ページ指定

Last updated at Posted at 2020-10-28
// adapterには、表示用の配列またはArrayListが設定されていること
viewPager.setAdapter(adapter);

// positionにページのindex値を指定
// 遅延処理をしないと、index値が1~4の場合、0ページが表示されてしまう
viewPager.postDelayed(() -> viewPager.setCurrentItem(position), 50);

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0