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....
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...
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....
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...
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...
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....
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...
android,appcompat,appcompat-v7-r22.1,appcompatactivity
Using android.support.v4.view.LayoutInflaterCompat solves the problem.