Fragment and Activity in Android Studio 2.1.1

If you have been using Android Studio > 1.5, a while ago, we might have been pampered by the automatic creation of new project with Fragment built-in ready for immediate development. Such luxury is helpful, but it also may taken away the understanding of how we can actually add fragments to a new project manually. This will happen when you have upgraded Android Studio to 2.1.1, and are not familar with the latest changes to the user interface.

You no longer can create a project using the Blank activity with fragment option. But after some search, the option is now slightly different: you need to create a basic activity (not blank!) [Fig 1], and when it comes to the options [Fig 2], remember to select the Use Fragment options. Now you have the luxury again.

 

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.