Menu
  • HOME
  • TAGS

diffrence between Appcompact activity and actionbar activity [duplicate]

android,android-activity,appcompat,appcompatactivity

ActionBarActivity is now deprecated. As of version 22.1 of the support library you should use AppCompatActivity. Chris Banes (one of the authors of the AppCompat library) covered the refactor in detail here....

How to setContentView before super.onCreate while using AppCompat v22.1.0?

android,appcompat,setcontentview,appcompatactivity

Since you want to get some ui elements in the super method, you have to find a way to define the layout in the superclass. It is the reason because you are getting an NPE as described in the other answers. You can use the setContentView() in the superclass, using...

NullPointerException on AppCompatActivity setContentView

java,android,nullpointerexception,appcompat-v7-r22.1,appcompatactivity

So, I have been able to track the problem. Apparently the custom view that I use for the FAB really needs to have the class attribute: class="mbanje.kurt.fabbutton.FabButton" Thanks anyway for your time guys....

Changing title text color for ActionBar in AppCompatActivity theme

android,appcompatactivity

You just need to paste this and change your colors in this XML with your own <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="colorPrimaryDark">#cc0986ff</item> <item name="colorPrimary">#ff0c84e8</item> <item name="android:textColorPrimary">#fdfff2</item> <item name="android:windowBackground">@android:color/white</item> <item name="android:editTextColor">@android:color/background_dark</item> <item...

Do not request Window.FEATURE_ACTION_BAR issue

java,android,xml,appcompatactivity

Using Theme.AppCompat.Light tells Android that you want the framework to provide an ActionBar for you. However, you are creating your own ActionBar (a Toolbar), so you are giving the framework mixed signals as to where you want the ActionBar to come from. Since you are using a Toolbar, you want...

What to use instead of getSupportActionBar() in Library 22?

android,toolbar,appcompatactivity

getSupportActionBar().setDisplayShowHomeEnabled(true); Should say if (getSupportActionBar() != null) { getSupportActionBar().setDisplayShowHomeEnabled(true); } getSupportActionBar() can return null so you the hint is telling you about this....

How could change style theme of actionbar in contextual menu mode

android,android-toolbar,appcompatactivity

I managed to achieve the requirement with following change in the style of Activity, <style name="AppTheme.Toolbar" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/primary</item> <item name="colorPrimaryDark">@color/primaryDark</item> <item name="colorAccent">@color/accent</item> <item name="android:textColorPrimary">@android:color/white</item> <item name="windowActionModeOverlay">true</item> <item...

Using a custom LayoutInflater.Factory with AppCompatDelegate

android,appcompat,appcompat-v7-r22.1,appcompatactivity

Using android.support.v4.view.LayoutInflaterCompat solves the problem.