Android – Making activity full screen with status bar on top of it

I know that the guy asking the question may have found his own solution but for the people who are still looking for a solution this is a very simple solution but one thing it has a limitation till Kitkat so a condition is added if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); }

What are the default color values for the Holo theme on Android 4.0?

If you want the default colors of Android ICS, you just have to go to your Android SDK and look for this path: platforms\android-15\data\res\values\colors.xml. Here you go: <!– For holo theme –> <drawable name=”screen_background_holo_light”>#fff3f3f3</drawable> <drawable name=”screen_background_holo_dark”>#ff000000</drawable> <color name=”background_holo_dark”>#ff000000</color> <color name=”background_holo_light”>#fff3f3f3</color> <color name=”bright_foreground_holo_dark”>@android:color/background_holo_light</color> <color name=”bright_foreground_holo_light”>@android:color/background_holo_dark</color> <color name=”bright_foreground_disabled_holo_dark”>#ff4c4c4c</color> <color name=”bright_foreground_disabled_holo_light”>#ffb2b2b2</color> <color name=”bright_foreground_inverse_holo_dark”>@android:color/bright_foreground_holo_light</color> <color name=”bright_foreground_inverse_holo_light”>@android:color/bright_foreground_holo_dark</color> <color name=”dim_foreground_holo_dark”>#bebebe</color> <color … Read more

How do I style appcompat-v7 Toolbar like Theme.AppCompat.Light.DarkActionBar?

The recommended way to style the Toolbar for a Light.DarkActionBar clone would be to use Theme.AppCompat.Light.DarkActionbar as parent/app theme and add the following attributes to the style to hide the default ActionBar: <style name=”AppTheme” parent=”Theme.AppCompat.Light.DarkActionBar”> <item name=”windowActionBar”>false</item> <item name=”windowNoTitle”>true</item> </style> Then use the following as your Toolbar: <android.support.design.widget.AppBarLayout android:layout_width=”match_parent” android:layout_height=”wrap_content” android:theme=”@style/ThemeOverlay.AppCompat.Dark.ActionBar”> <android.support.v7.widget.Toolbar android:id=”@+id/toolbar” android:layout_width=”match_parent” android:layout_height=”?attr/actionBarSize” … Read more

Android: making a fullscreen application

You are getting this problem because the activity you are trying to apply the android:theme=”@android:style/Theme.Holo.Light.NoActionBar.Fullscreen”> to is extending ActionBarActivity which requires the AppCompat theme to be applied. Extend your activity from Activity rather than from ActionBarActivity You might have to change your Java class accordingly little bit. If you want to remove status bar too … Read more

Implementing user choice of theme

I actually have this feature in my application and additionally, I allow users to change theme at runtime. As reading a value from preferences takes some time, I’m getting a theme id via globally accessible function which holds cached value. As already pointed out – create some Android themes, using this guide. You will have … Read more

Change background popupMenu in Android

the following styles working perfectly for me. <style name=”popupMenuStyle” parent=”Theme.AppCompat.Light.DarkActionBar”> <item name=”android:textColor”>@color/color_white</item> <item name=”android:itemBackground”>@color/color_red</item> </style> here, parent should be the AppTheme parent and in your code use these lines. Context wrapper = new ContextThemeWrapper(context, R.style.popupMenuStyle); PopupMenu popup = new PopupMenu(wrapper, v); i hope it will work.

How to set Toolbar text and back arrow color

Chances are you are extending from the wrong parent. If not, you can try adding the style to the toolbar layout directly, if you want to override the theme’s settings. In your toolbar layout: <android.support.v7.widget.Toolbar xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” android:id=”@+id/toolbar” android:layout_width=”match_parent” android:layout_height=”?attr/actionBarSize” android:minHeight=”?attr/actionBarSize” app:theme=”@style/ToolBarStyle” app:popupTheme=”@style/ToolBarPopupStyle” android:background=”@color/actionbar_color” /> In your styles: <!– ToolBar –> <style name=”ToolBarStyle” parent=”Theme.AppCompat”> <item … Read more