Android Lollipop Calendar listener not called.

Android lollipop date picker issue
Android lollipop date picker issue

Hi Guys,

This is my yet another post. Recently in one of my projects I faced an issue specific to Android 5.0 lollipop. The Date Picker View, OnDateChangedListener was never getting called.

While selecting the date, the change was being reflected on the view, but no call to the listener was made, and some other folks also faced the same issue. Check this stackoverflow question.

Solution:

As a workaround, I just checked the current values of picker after every interval.


@Override
public void onAttachedToWindow(){
if(android.os.Build.VERSION.SDK_INT>=android.os.Build.VERSION_CODES.LOLLIPOP)
check();
super.onAttachedToWindow();
}

You can use my class directly from here.

Have a nice day.

Strange fragment overlapping issue in Android Lolipop

Recently I faced a strange issue with Android 5.0.  One of my apps Plan Shaadi is using lots of fragments.
On Android 5.0 suddenly fragments with white colour background were overlapping.

Android app fragment overlap issue.
Android app fragment overlap issue.

The weird thing was that this was happening with only certain colours, when I tried black it was working good.

As a workaround to it, I tried setting white colour in the java file, and to my surprise it worked, there is no overlapping now.

Andorid 5.0 transparency issue workaround fix
Andorid 5.0 transparency issue workaround fix

Here is the result.

Android transparency issue fixed
Android transparency issue fixed

So the overall cause of this issue is unknown, but since it was working properly on all other Android versions, I am considering something wrong with this version, or may be some thing of which we are not aware yet.

Thanks