D
D
DarkByte20152016-10-17 12:22:10
Java
DarkByte2015, 2016-10-17 12:22:10

How to make your own TitleBar?

How to make your own TitleBar ? Googled, there are really a lot of answers, but everywhere it is very difficult, and often also in English. I can't figure it out. Explain in a simple way please!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rou1997, 2016-10-17
@Rou1997

This is called ActionBar, to make it customizable you need the AppCompat library, in Android Studio projects are created with this library by default, just make the necessary changes to theme in styles.xml, an example from my code, then figure it out yourself:

<!-- Application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
   		<item name="actionBarStyle">@style/MyActionBar</item>
    </style>
    
    <style name="MyActionBar" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
      <item name="background">@drawable/toolbar_bg</item>
  </style>

These are your problems, you generally need to get used to English from the first day.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question