Android SystemUI glitches in Lollipop

Setting android:hardwareAccelerated=”false” is a kind of extreme solution, as graphical performance is likely to be very bad. If you can pinpoint the view that is misbehaving and causing this issue, a better fix would be to switch it to software rendering instead, via setLayerType(), e.g. view.setLayerType(View.LAYER_TYPE_SOFTWARE, null); Funny thing is, I haven’t experienced any rendering … Read more

How to create ripple effect in simple layout

Set these properties on your layout (if your layout has the default white/light background): android:clickable=”true” android:focusable=”true” android:background=”?attr/selectableItemBackground” You don’t need a custom drawable in this case. However, if your layout has a black/dark background, you’d have to create your own ripple drawable like this one: <?xml version=”1.0″ encoding=”utf-8″?> <!– An white rectangle ripple. –> <ripple … Read more

application content goes behind the navigation bar in android L

Here is the solution. Most of the layouts get solved by adding these properties in values-v21 style.xml <item name=”android:windowTranslucentStatus”>true</item> <item name=”android:windowTranslucentNavigation”>true</item> <item name=”android:fitsSystemWindows”>true</item> for others, I have calculated the hight of navigation bar and add margin to my view . public static int getSoftButtonsBarSizePort(Activity activity) { // getRealMetrics is only available with API 17 and … Read more

notifyDataSetChanged not working on RecyclerView

In your parseResponse() you are creating a new instance of the BusinessAdapter class, but you aren’t actually using it anywhere, so your RecyclerView doesn’t know the new instance exists. You either need to: Call recyclerView.setAdapter(mBusinessAdapter) again to update the RecyclerView’s adapter reference to point to your new one Or just remove mBusinessAdapter = new BusinessAdapter(mBusinesses); … Read more

tech