215 Android ToolBar Tutorial |

slidenerd · 185K views · 2014 · 10:59

Open on YouTube

Software practice, open source & careersUX & UI designtutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as a step-by-step walkthrough for setting up a Toolbar in place of the ActionBar, and askers often cite it as the tutorial they were following when something broke.

Recommended by 4 people across 3 different months, 2014 to 2016.

What it is

A 2014 slidenerd tutorial from an Android Material Design series that shows how to replace the default ActionBar with an AppCompat v7 Toolbar. It uses a NoActionBar theme, a separate app_bar.xml layout pulled in with <include>, and setSupportActionBar() in the Activity.

What people said

Recommends Kostas Drak · 2014-12 · Stack Overflow · on “Google i/o app: where it sets toolbar_actionbar”

Take a look at this guy over here [this video] . He explains it perfectly. Google Documentation: [LINK] [LINK] Here is Google Design Spec you can take a look: [LINK] Hope it helps!!!

Recommends silverFoxA · 2015-04 · Stack Overflow · on “Replacing ActionBar with a toolbar”

You want toolbar so that you can customise it to whatever color you want ryt? If thats the case here is a wonderful tutorial for that Click here [this video] Update 1: Here is the link to viewPager ViewPager [LINK]

Recommends David Read · 2015-04 · Stack Overflow · on “Android Studio - Sliding Tabs appear below action bar instead of on action bar”

To answer my own question, it will take a few steps to achieve this. First you need to create your own custom action bar in an seperate XML file. Then you need to apply a "NoActionBar" Theme to the activity that you want to put the action bar with silding tabs in. Then you need to write in Java that you want to set the action bar in that particular activity to your own custom action bar. Then I believe, don't quote me, you need to add the sliding tabs in the action bar layout file along with the view pager. Obviously there are a lot of steps and it is very hard to explain them in this way. SlideNerd has a superb set of video tutorials on how to do this in case you're a visual learner. Custom

Recommends SourabhMore · 2016-02 · Stack Overflow · on “using Action Bar Android development”

Your way is correct but please go through the Slidenerd Material design tutorial. You can create your own toolbar with your specification.Following site help you: Slidenerd toolbar tutorial [this video]

Cites kritya · 2015-03 · Stack Overflow · on “Can't use ActionBarActivity with Theme.Material”

I am following this [this video] and basically copied the code from this tutorial and he does use the Theme.Material and still extend the ActionBarActivity

Cites kritya · 2015-03 · Stack Overflow · on “Can't use ActionBarActivity with Theme.Material”

Getting back to the video, [this video] at [b]10:15[/b] it does looks like material theme to me, while he is still using setSupportActionBar() which you can see at 10:23

Cites Jerryc · 2015-04 · Stack Overflow · on “android why i cannot change the project theme to noactionbar”

<style name="AppTheme" parent="AppTheme.Base"> <!-- Customize your theme here. --> </style> <style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar"> </style> My project minimun sdk is API16. I am following the tutorial [this video] setting the theme to Theme.AppCompat.Light.NoActionBar. If i run the app, null exception shows up... What should i do. Any problem with the gradle file? 04-23 15:03:57.589 2045-2045/com.it.fyp.tab E/AndroidRuntime﹕ FATAL EXCEPTION: main java.lang.RuntimeException: Unable to start activity ComponentInfo{com.it.fyp.tab/com.it.fyp.tab.MainActivity}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)

Cites Sathya Baman · 2015-10 · Stack Overflow · on “Android Material design error”

Hi am learning to create a material design using this tutorial. [this video] and in my design the appbar has a padding on all the sides. can someone help me remove this padding and make the app look like a real app bar. Here is my screen [LINK] app_bar <?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.Toolbar xmlns:android=" [LINK] " android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#DDDD"> </android.support.v7.widget.Toolbar> Main Activity <RelativeLayout xmlns:android=" [LINK] " xmlns:tools=" [LINK] " android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" android:

Cites Vaidas · 2016-08 · Stack Overflow · on “AppCompatActivity with Toolbar: menu items not showing on Toolbar”

After a day of research on how to switch to AppCompat Toolbar finally found the solution. Two must do steps (No 2 being the one that nobody talks about): I.) couple good resources on how to set up Toolbar can be found in this video Toolbar Tutorial [this video] and also in this StackOverflow: toolbar button [LINK] II.) MAKE SURE YOU PLACE THIS CODE AT THE BOTTOM OF onCreate(): toolbar= (Toolbar) findViewById(R.id.job_list_toolbar); setSupportActionBar(toolbar); if(getSupportActionBar()!=null) { getSupportActionBar().setDisplayShowHomeEnabled(true); } My problem was that I had some code in onCreate() that modified the toolbar buttons. That code needed to be run before toolbar was opened. If only f

Cites udana manoj · 2016-10 · Stack Overflow · on “The overflow menu icon in Toolbar”

I m using the appCompat v7:24.2.1 and I just took a simple Tutorial about materials. I just cant figure out how to get the Overflaw menu in the right-side of the toolbar that created. The tutorial that i used.. [this video] Custom app_bar <android.support.v7.widget.Toolbar xmlns:android=" [LINK] " android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#F44336" > main.xml <RelativeLayout xmlns:android=" [LINK] " xmlns:tools=" [LINK] " android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.ud.materialdesigntest.MainActivity"> <!-- Was inside the RelativeLayout Tag android:paddingBottom