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 an Interactive Story App (Retired) User Input Hiding the ActionBar with an App Theme

I have a purple bar at the top and an email icon which I cannot get rid off. I am using android 6.0. help please

I cannot get rid of the purple action bar and an email icon which is in the bottom right hand corner of the screen

1 Answer

If this is when you create a new project try creating it with an Empty activity instead of a Blank activity. Otherwise you can go through the code deleting the relevant bits in the activity and xml. Remove anything that refers to FloatingActionButton and ToolBar in your MainActivity and activity_main.xml.

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();
        }
    });

Thank you! I had the same email icon on the same course, and this fixed it.