Android Tutorial Android 5.0 Information and Resource Thread

Android 5.0 Lollipop is a pretty big update hence the major version number upgrade.
I wanted to make a thread to combine Android 5 SDK related resources since it is such a big update.
At the moment it is a bunch of links, but i will try to sanitize and organize it.

Feel free to add more information, and I will try to add it to the first post.

API Level: 21

Some important changes:
Lollipop uses ART by default which implements Ahead-of-time compilation. Previous versions of ART were buggy so it is worth testing your app on an L device if you can find one.
There are some changes in Notifications, so your notifications will look different on L devices (setColor, Setting up custom sounds, setVisibilty for privacy)
Also getRecentTasks is deprecated (invalidates my MSOS library).

  • Major Features
  • New APIs
  • Deprecated APIs
  • Material Design
    • Design Discussion
    • Backporting
  • Backporting/AppCompat
    • Toolbar vs Actionbar
    • Classes in Compatibility Libraries (CardView, RecyclerView)
    • Other third party libs
  • General Resources
  • B4A Libraries and Resources

Major Features

- Material Design
- Notifications (scope/sync)
- OpenGL ES 3.1 + Android Extension Pack
- Camera API + Media Playback + MediaBrowser
- Bluetooth LE Peripheral mode
- Job Scheduler for better power consumption
- App Usage stats

Official Page:
Official Blog:
Full set of changes:

New APIs
Here is a non-exhaustive list of the new apis:
BitmapDrawable: Theming/tinting:
ObjectAnimator: Animating on colors and paths:
externalStorage APIs:

Deprecated APIs
Non-exhaustive list of deprecated APIs:
("deprecated in API Level 21"

getRecentTasks and getRunningTasks: Was used to find which apps were on top or were run recently. This library becomes partially deprecated due to this: (
Camera.CameraInfo Camera.Parameters: Deprecated in favor of android.hardware.camera2 API for new applications.
Soundpool: (constructor deprecated)
Canvas: (some versions of drawBitmap, clipRegion) :
Actionbar: addTab :

Material Design
Material Design is a new design language and guidelines from Google and they are not entirely related to Android, they extend to any platform. Also, refer to Polymer project.

What is different:
Toolbar replaces the actionbar and is now part of the view hierarchy making it flatter down the structure. Also, Toolbar does not have Tabs as the Actionbar used to, so you have to create your own.
NavigationDrawer now slides over the Actionbar/Toolbar since the Toolbar is now part of the view hierarchy.
Depth, items have a depth defined now relative to each other. A shadow is used to pronounce this.
Animations are used much more for e.g. in ripples or navigation drawer indicator.
Touch feedback and ripples, are now used. The buttons are supposed to be lifted up to meet the touch rather than pressed down.
Activity transitions, these are curruntly not available in any form on pre-L devices.

Material Design Specs:
Material Design for Android:
Holo to material:

Official Material Design Blog posts and Checklist (Great for understanding)
Material Design Checklist
Implementing Material Design

Material design with Actionbar (not toolbar):
Material Design using Support Libs (Toolbar):

Backporting and AppCompat

v7 Support Library
appcompat: Actionbar, Toolbar, Material Themes
CardView: Flexible layout for presenting information
RecyclerView: Efficiently display large amount of data in a smaller window
palette: Allows extracting prominent colors from an image to use in your UI

v17 Leanback Library
Build interfaces for TV

Toolbar vs Actionbar:
The Toolbar is a generalization of the Actionbar. However the Toolbar appears in the normal view hierarchy while the Actionbar was a part of the Activity decor.

Yes, we have removed a load of automatic features from the action bar when you use Theme.Material or appcompat:21. Toolbar is a very focused widget which provides it's core 4/5 things only.

For everything else, you now have the tools to easily implement them yourself:

SplitActionBar: Use a Toolbar or ActionMenuView in your layout and position it at the bottom.
Window Progress Bars: Add your own ProgressBar to the Toolbar (it's a ViewGroup remember).
Tabs: Use one of the many libraries available. I even wrote the SlidingTabs sample which you can use.

Drawer on Top of AB:

Third Party Libs
Group of views:
Menu/SlidingDrawable: (This is ported but requires slide interaction)
Ripple Effect:
EditText: (There is a port of this as well)

General Resources

B4A Related Libraries and Threads

Material Theme Porting:
MSMaterialMenu Library:
RippleEffect Library:
Make B4A Apps Compatible with Android 5:
Material Design Tutorials:
AppCompat Library:
Storage Library:
Last edited:


Licensed User
Longtime User


Well-Known Member
Licensed User
Longtime User
I understand. But if you want the complete the Material Design UI, you should have parallax scrolling for images. Google apps have it. In Play Store while in the app details screen, when you scroll down, you can see the top header image scrolling in parallax mode. In Wikipedia official app too you can see it.

So in short, if there is a big image header as mentioned in Google's material guidelines, it should scroll in parallax mode.


Well-Known Member
Licensed User
Longtime User
No. For using the AppCompat library you have to extend the Activity from "ActionBarActivity" which can be done with the #Extends Attribute in B4A. Then you have to set Theme.AppCompat and you immediately have a Material theme and the ActionBar looks like a Material Design Actionbar (No AppIcon, round overflow dots).

For tinting UI components in pre 5.0 you will have to use AppCompat library (Extend ActionBarActivity and use Theme.AppCompat theme), set targetSdkVersion to 21 AND you have to use XML Layouts with standard components.
There is no tinting for components created with "new xxx" like "new EditText()". Only standard components directly added with LayoutInflater() method get tinted and only if you don't use your own Factory (like in Erels XmlLayoutBuilder library).
So we currently have no chance to get nice design in pre 5.0 with B4A for now if you want to use AppCompat. This is really bad.

Edit: Chris Banes said in a post on his blog that the internal components for Material Design are currently hidden because the implementation is unfinished and this may change in the future. But nobody knows when this "future" is. Then it should be possible to wrap these components in a B4A library to use them directly. But then it will be not so nice to use the B4A-Designer.

The ToolBar is really nice and simple. It is like a B4A Panel with additional support for actions and overflow menu. I think I can show an example next week. You can add everything you want to it like Tabs or a Spinner.
Sorry to be reviving an old thread but I'm a little confused and could do with some clarification regarding Material Design.

The AppCompat library is to allow older Android versions to use some of the newer Material Design features, thus allowing backwards compatability, this I understand. BUT if wanting to develop only for SDK versions 21 and above (looking into the future) then AppCompat is not required. However have I understood correctly that the only way to use the new features of Material Design within a B4A project is to use the AppCompat library?

I'm using the Toolbar at the moment which I prefer over the stdActionBar but want to make sure that currently the only way of using this is to reference the AppCompat library? What is the feeling regarding these new features becoming a core part of B4A in its next release?


Licensed User
Longtime User
Yes, you are correct. There is currently no wrapper library for the native ToolBar, only for the AppCompat version.

I don't think that it makes much sense for now to add API21+ features to B4A. API 21 is available on 3% of the devices for now. Yes, it will grow but like with the other Android versions we can expect API21 to be on most devices in about 2 years. Even Google says AppCompat is the way to go.


Well-Known Member
Licensed User
Longtime User
@corwin42 thanks for the clarification, there's so much information it's often difficult for me to know for sure if I'm doing the right thing or not.

And once again, thanks the the excellent tutorials. They really were appreciated!


Licensed User
Longtime User
Uh, big update to the support library. They did a small step in version number from 22.0 to 22.1 but the changelog is HUGE.

Seems that I have to do a bigger update to the AppCompat library and need to change the tutorials. Much work to do. But there are some features that will make wrapping the Material Design Spinner possible.


Licensed User
Longtime User
Yes, they added some new views didnt they. Does this mean we do not have to resort to the re-inflate view? We can just extend for e.g. AppCompatEditText in the same way as Erel extends EditText.
Another interesting point is the AlertDialog compat builder.
It really annoys me that they take 8 months to deliver this with no roadmap or expectations so most developers devise their own solutions.


Well-Known Member
Licensed User
Longtime User
All those new things, and they are a lot, impressive, Google wants to add elegant design in Android, that's very good.
@Erel , is B4A (in the future) will be compliant with material design and all these new controls, views etc....????
That the big question

Last edited: