How to pass click event from custom action bar to current page of android ViewPager? -


i have activity android.support.v4.view.viewpager , custom actionbar. there three(0,1,2) pages in viewpager page 1 set default page , user can slide left , right. 1 fragment class used show ui each of pages,which has webview shows html data can collapsed , viewed on button click in webview. there button in action, , i'm required collapse , show these data on webviewon click of button in actionbar. i've done problem items on viewing page of viewpager not toggling on click of button in actionbar, while page on left or right of working well. how can solve problem? correct method of doing this?

  1. you need write 3 interfaces in 3 fragments.
  2. you need register 3 fragments pager adapter/activity.
  3. whenever click on actionbar button check active/current page in viewpager.
  4. perform click operation on registered interface on basis of active/current page/fragment.

Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -