Tuesday, 15 September 2015

android - Best Implementation for OnClickListener with Dynamic Fragments Using FragmentStatePagerAdapter -



android - Best Implementation for OnClickListener with Dynamic Fragments Using FragmentStatePagerAdapter -

new(er) android fragments , developing app 2 areas 80/20 on screen. within 80% area, there's area dedicated fragments, each fragment containing 1 button; number of fragments created dynamically, viewpager layout area created dynamically well. when button pressed within fragment, "item" populated within listview of remaining 20% area (basically choosing item , populating shopping cart).

what best implementation handling onclicklisteners in each of these scenarios:

"selecting" item (button press) within fragment populate listview (shopping cart) item "deleting" (button press) items listview (shopping cart) "checkout" (button press)

i'm using fragmentactivity main activity , fragmentstatepageradapter , custom fragment class.

thanks guidance!

android android-fragments onclicklistener fragmentstatepageradapter

No comments:

Post a Comment