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 trialaybars tokta
4,491 PointsWhite Bar occurs in the actionBar
i am using the latest android studio there are lots of differences between the version which is used in this video and mine.I did every step to remove actionBar but what i get is this ; http://prntscr.com/8tdd0x
2 Answers
Bob Boursaw
2,047 PointsI ran in to the same thing and did the following.
I opened the activity_main layout in the designer and deleted each item I didn't want (the bit white bar at the top and some email looking icon), which was accomplished by simply clicking on them to ensure they were highlighted and then and then clicked the delete button.
After this, I opened up the main_activity.java file and removed all methods with the exception of the onCreate method.
After doing this, I ran my app and had a completely blank full screen view.
Nika Kemularia
964 PointsI did so and it worked for me:
in XML design view I deleted objects, which I didn't want. in java file I deleted all things which was connected to this toolbar and fab:
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
The problem, why bob had white screen was because you had no set content view and deleted it with onCreate method. That's why was no any contentView. I don't know Java, I learn everything from this tutorial, maybe there are some different solutions too, but this worked for me