0

I am new to android. I have to use actionbar in my app.at the same time I have to use custom theme also.whenever I have tried to use action bar,it shows null poiter exception because of my custom theme.because I have used parent="android:Theme" in my custom theme. How can I use custom theme in action bar?

  • show you style.xml and code file – Suhail Mehta Jun 05 '14 at 05:25
  • try this `parent="@android:style/Widget.Holo.ActionBar"` – M D Jun 05 '14 at 05:26
  • #simple plan just now: I need to use my custome theme as app theme – user3709680 Jun 05 '14 at 05:28
  • [http://stackoverflow.com/questions/9533975/action-bar-custom-style-in-my-case?rq=1](http://stackoverflow.com/questions/9533975/action-bar-custom-style-in-my-case?rq=1) – M D Jun 05 '14 at 05:29
  • #simple plan just now: I can able to customize action bar.that is not my problem.my problem is I have to use use custome theme(Mytheme) in my full app.but when I use action bar then I can'tuse my custometheme.because it shows null poiter exception. Can you help me? – user3709680 Jun 05 '14 at 05:32
  • generate your required `ActionBar` theme from here and http://jgilfelt.github.io/android-actionbarstylegenerator/ and copy xml in your style.xml – Ahmed Nawaz Jun 05 '14 at 05:44
  • #ahmed nawaz: then how can I add that Actionbar into my form? Because I am using android.app.Actionbar. but I don't know how to set. Actionbar from style.xml – user3709680 Jun 05 '14 at 05:49

2 Answers2

1

Use this.

  1. Android Art Generator Studio

2.Choose the color and download the .zip file with the required set of drawables.

  1. Then, just extract the zip file and paste the contents in your source folder.

  2. On top of your Graphical layout of your activity, click on AppTheme and select project themes and choose the one you just downloaded.

0

You have to create custom actionbar theme using this method,

Link of Custom Action Bar.

Community
  • 1
  • 1
none
  • 176
  • 1
  • 7