1

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

Community
  • 1
  • 1
Renjith
  • 3,274
  • 19
  • 39
  • I would strongly recommend you to use the one from support library. You will get bug fixes with every release of the library itself. – Blackbelt Jun 16 '15 at 07:25

1 Answers1

1

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.

Philio
  • 3,675
  • 1
  • 23
  • 33
  • Thanks Philio for your inputs. For the other question, my issue is whether the activity will get recreated and onActivityResult will be called, if it gets destroyed after a startActivityForResult call? – Renjith Jun 16 '15 at 08:49
  • Probably would make more sense to answer you other question, I'll post an answer there. – Philio Jun 16 '15 at 11:31