Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DialogFragment display a list of icons with paging

In my app, users can send an icon/gift to other users. I want to show a DialogFragment popup that includes paging of available icons.

For example, I have a total of 15 icons to display. I want to show 6 icons per page, which means i should have 3 "pages" to swipe through horizontally.

Similar pager

I tried using a FragmentPagerAdapter and RecyclerView with GridLayout for the icons. But it's not really working like i want it.

How can this be implemented using a PagerAdapter without any fragments?

like image 228
TareK Khoury Avatar asked Nov 08 '16 12:11

TareK Khoury


1 Answers

If you dont want to use fragments then try with a normal activity with a dialog theme. eg; <activity android:name="your_activity_name" android:theme="@android:style/Theme.Dialog" />

like image 151
NIPHIN Avatar answered Oct 13 '22 11:10

NIPHIN