Lollipop : draw behind statusBar with its color set to transparent

Method #1: To achieve a completely transparent status bar, you have to use statusBarColor, which is only available on API 21 and above. windowTranslucentStatus is available on API 19 and above, but it adds a tinted background for the status bar. However, setting windowTranslucentStatus does achieve one thing that changing statusBarColor to transparent does not: … Read more

Change status bar color with AppCompat ActionBarActivity

I’m not sure I understand the problem. I you want to change the status bar color programmatically (and provided the device has Android 5.0) then you can use Window.setStatusBarColor(). It shouldn’t make a difference whether the activity is derived from Activity or ActionBarActivity. Just try doing: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window window = getWindow(); … Read more

No shadow by default on Toolbar?

I ended up setting my own drop shadow for the toolbar, thought it might helpful for anyone looking for it: <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_gravity=”top” android:orientation=”vertical”> <android.support.v7.widget.Toolbar android:id=”@+id/toolbar” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:background=”@color/color_alizarin” android:titleTextAppearance=”@color/White” app:theme=”@style/ThemeOverlay.AppCompat.Dark.ActionBar”/> <FrameLayout android:layout_width=”match_parent” android:layout_height=”match_parent”> <!– **** Place Your Content Here **** –> <View android:layout_width=”match_parent” android:layout_height=”5dp” android:background=”@drawable/toolbar_dropshadow”/> </FrameLayout> </LinearLayout> @drawable/toolbar_dropshadow: <?xml version=”1.0″ encoding=”utf-8″?> … Read more

Understanding RecyclerView setHasFixedSize

A very simplified version of RecyclerView has: void onItemsInsertedOrRemoved() { if (hasFixedSize) layoutChildren(); else requestLayout(); } This link describes why calling requestLayout might be expensive. Basically whenever items are inserted, moved or removed the size (width and height) of RecyclerView might change and in turn the size of any other view in view hierarchy might … Read more

Toolbar and Contextual ActionBar with AppCompat-v7

Update: Solution: use the windowActionModeOverlay property. Set this in your theme: <item name=”windowActionModeOverlay”>true</item> and the actionmode will be shown over the action bar instead of pushing it down. (If you’re not using the latest AppCompat then you need to add the “android:” prefix to the property). It basically lets AppCompat know that you have a … Read more

Android lollipop change navigation bar color

It can be done inside styles.xml using <item name=”android:navigationBarColor”>@color/theme_color</item> or window.setNavigationBarColor(@ColorInt int color) http://developer.android.com/reference/android/view/Window.html#setNavigationBarColor(int) Note that the method was introduced in Android Lollipop and won’t work on API version < 21. The second method (works on KitKat) is to set windowTranslucentNavigation to true in the manifest and place a colored view beneath the navigation bar.

“You cannot install this app because another user has already installed an incompatible version on this device”

Refer this , Actually your debug version of the app didnt get uninstalled properly Go to settings > apps > downloaded app list You can see the installed applications in the list (the application may not be in order. or may be towards the very end) Click on the application,go to the overflow menu option … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)