Skip to content Skip to sidebar Skip to footer

Can I Create Fragment Listactivity With Compatibility Package V4?

I've been trying to complete tutorial 'Working with fragments' which was designed for android 3.0+ To acomplish that I'm using compatibility package v4 (since my API is 7). However

Solution 1:

Nope, doesn't exist. Stupid support library.

The solution is easy to create but tedious to maintain. Just copy the native ListActivity class into your project, rename it "FragmentListActivity", and let it extend FragmentActivity instead of Activity. No other tweaks are required and the copy is easy. If you are uncertain you can peak at my code, but it's always best to derive the latest.

Same goes for GridActivity I would say.

Solution 2:

Solution 3:

yes you can create the Fragment ListActivity with compatibility with viewpager package v4

Here is the example

another example

Post a Comment for "Can I Create Fragment Listactivity With Compatibility Package V4?"