Reputation: 3274
I am using the latest AppCompatActivity (android.support.v7.app
) and in the MainActivity, I am using the normal Fragment(android.app.Fragment)
and getFragmentManager
(instead of getSupportFragmentManager
).
Anyone aware of any problems if we mix Fragments
from support library?
I am facing some weird behavior in my application as posted in below question?
Android parentActivity not getting recreated after startActivityForResult returns
Upvotes: 1
Views: 1294
Reputation: 4185
Although you don't necessarily have to use the support library for fragment support if you're targeting SDK 11 or higher, it's worth using to get material styles from Lollipop on earlier versions of Android. This will give your app a more consistent look and feel.
Do not mix fragments with support fragments, you'll end up with a mess!
In regards to the linked question, your activity doesn't get destroyed when you start another one (regardless of if you call startActivity
or startActivityForResult
). You should be able to hit the back button and return to the previous activity, unless you call finish
on your first activity.
Upvotes: 1