Posts

Showing posts from December, 2017

Custom MenuItem with Notification on it

Image
Step 1: (build.gridle Module: app) Add dependency Compile ‘com.android.support:appcompact-v7:26.1.0’ Step 2: (values/styles.xml) In styles.xml copy the current style and paste and change name of it and also change parent to NoActionBar i.e. parent="Theme.AppCompat.Light.DarkActionBar"> Note : This is important because we have to set ToolBas as our ActonBar so we should remove it by this style <style name="noActionBar" parent="Theme.AppCompat.Light.NoActionBar">         <!-- Customize your theme here. -->         <item name="colorPrimary">@color/colorPrimary</item>         <item name="colorPrimaryDark">@color/colorPrimaryDark</item>         <item name="colorAccent">@color/colorAccent</item>     </style> Step 3: (AndroidManifest.xml) Se...