Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Self-Destructing Message Android App Starting the App Setting Up the Project

If I am using android studio, when first creating my application, would I use "Blank Activity with Fragments"or blank?

Should i utilize the "Blank activity" or "Blank Activity with Fragments"?

4 Answers

I am using android studio version 0.8.14

In the window where you choose your activity, scroll down to the bottom and you will see the "tabbed activity" option. Choose that and click next. In the next page, choose the "Action bar Tabs (with viewpager)" from the Navigation style drop down menu.

i am using the android studio 1.1, and i choose exactly as mentioned above but i dint get tab . how should i implement a main activity with tab and swipe. Please help. Thanks

For the Ribbit application, you should choose "Tabbed Activity" to follow along as close as possible. Choosing that option instead of "Activity" or "Activity with Fragment" will add some boilerplate code to create the tabs so that you don't have to write it yourself.

Andre Colares
Andre Colares
5,437 Points

In Android Studio select TABBED ACTIVITIY (is the last one)>click next>Change the field Navigation Style to: Action Bar Tabs (With Viewpager).

Thats all!

Rebecca Rich
PLUS
Rebecca Rich
Courses Plus Student 8,592 Points

I personally always start with Blank Activity, as it is the base canvas for creating an activity. From there you can add in Fragments if you plan to include them.