Dont have Blank Activity with Fragment in my Android Studio

+1 Ayan Tiwari · January 14, 2016
Recently downloaded and installed the latest version of android studio but when i start a new activity
Blank activity with fragment option is not present

Post a Reply

Replies

Oldest  Newest  Rating
0 Ayan Tiwari · January 18, 2016
Thanks a lot sir.
Problem resolved.
Maybe i should get my glasses checked up :P
0 Sandra A · May 25, 2016
I have installed Android Studio 2.1.1 and would like to start a new activity with fragment, but i do not see a 'Use a Fragment' option with the empty activity in the latest version though it was there in Android Studio 1.5. 
0 Gary Whitney · May 26, 2016
Sandra
You are right. Studio 2.0 doesn't have that template any more.
I canthink of 3 options.
1. Use the Basic Activity Template and check the "Use a fragment" box  (see David's image)
2. Use an empty activity and create a new class that extends fragment. This is what I did in the editor pane of  the image below.
3. Use the template in the new -> fragment -> fragment (blank) below. I didn't do this I was just showing how to get to it.
/images/forum/upload/2016-05-26/d72b390f2c84cc69f86c6c52f57343d5.png
0 David Frenzel · January 14, 2016
It is for me - as well using the latest version of AS. Maybe you used empty activity instead of blank? These sound similar but are actually different!

http://i64.tinypic.com/14j2r79.png
  • 1

Java / Android Development

126,459 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator