Monday, 17 October 2016

Here Is a Small Tutorial For Add custom Toolbar to our Android Application

The Most of the android Application have there own tool bar because you can customize it with different color combinations.so if you wants to add a custom tool bar follow the following code.

1.Start new project name it custom toolbar

2.Choose Empty activity As a MainActivity.

3.Then Finish.

4.After That go to res-value-style.

5.Change Application theme to

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> 

6.After that create a new Layout Resource file or xml file by right click on res folder and


7.Copy the code in tool_bar.xml

8.Include toolbar in activity_main.xml.

9.Initialize Toolbar Object in MAinActivity.java

10.setSupportActionBar is toolbar.

11.Run The project 

No comments:

Post a Comment