Tag: android-5.0-lollipop

Lollipop CalenderView DatePicker doesn't call OnDateChanged() method

I’m working with a DatePicker and finding that under Android 5.0 it will not call the OnDateChanged() method in its OnDateChangedListener when it’s in CalendarView mode even though a new date has been selected. If android:datePickerMode=”spinner” is set in the DatePicker’s xml tag, the DatePicker will appear as spinners and it will call OnDateChanged() when […]

How to get single preview frame in Camera2 API Android 5.0?

I’m trying to get a preview frame for QR code scanning functionality using Camera2 API. In old Camera API it’s as easy as: android.hardware.Camera mCamera; … mCamera.setPreviewCallback(new Camera.PreviewCallback() { @Override public void onPreviewFrame(byte[] data, Camera camera) { // will be invoked for every preview frame in addition to displaying them on the screen } }); […]

Material Design Transparent ActionBar

I’d like to know if anyone knows how to make an activity with transparent action bar, like the one you have in the new Google Play Store when you go to an app’s page. I don’t care about the scrolling and turning from transparent into solid color background, I just need the action bar transparent. […]

How to Implement 'Data Tables' (material design component) in android?

I have gone through this new design specifications https://www.google.com/design/spec/components/data-tables.html#data-tables-interaction How can we implement all these Structure, Interactions in android. I haven’t found enough documents describing this implementation. Is this only a design language specification. Any helpful documents? Thanks The official document says that “Data tables usually appear in desktop enterprise products.” But I am curious […]

Cast shadow on top of LinearLayout using android:elevation

I have this LinearLayout that is going to be placed on the bottom of an activity layout. I want this LinearLayout to have a 4dp elevation, just like the top toolbar should have, however, since android:elevation places the shadow below the ui component and this specific component (linearLayout) is going to be on the bottom […]

Compatible version of Android JobScheduler – alternative

Is there a library or at least some open source example that provides functionality of new Android-L JobScheduler API. It is not to hard to implement my own version (with very limited functionality) but on the other hand it is not trivial either. So to sum it up is there anything that at least can […]

Android XML: android:elevation vs. app:elevation

When do I use android:elevation and when app:elevation? What’s the difference between those two?

DialogFragment buttons color change in Lollipop

I would like my Fragments to look consistent with the rest of the app and color palette which I applied so I would like to change the colors not only of title, but also of positive/negative buttons: I tried to do this like this, but unfortunetaly it doesn’t work: public void onStart() { super.onStart(); Dialog […]

Animate ImageView between two activities using shared element transitions with ChangeImageTransform

I am trying to animate one ImageView to another position between two activities in Android API level 21. Since “MoveImage” in Android L Preview has been removed, I use “ChangeImageTransform” instead, but the sample code in documents doesn’t work out (the two images animated separately). <transitionSet xmlns:android=”http://schemas.android.com/apk/res/android”> <changeImageTransform> <targets> <target android:targetId=”@id/ivA” /> <target android:targetId=”@id/ivB” /> […]

Android API 21 – TimePicker widget

I’ve got a problem with the TimePicker widget on API 21. Until API 19 the TimePicker was an up-/down-list like iOS, but in 21+ it’s round, like the one in the calendar app. How can I use the old one in 21+, because it breaks my design, if it is the new widget.

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.