Group Group Group Group Group Group Group Group Group Forums

Android: An Introduction to Material Design

In this tutorial you'll learn how to integrate Material Design into an existing app and create delightful interactions using the new animation APIs.

This is a companion discussion topic for the original entry at

Very nice tutorial. keep sharing <a href=“” target="_blank" rel="dofollow”>

When using Android Studio, how are you to know that RecyclerView and CardView exist? They don’t show up in the Palette for Widgets, Containers, etc. I understand that you can include them directly into the XML editor, but that means I have to already know what tools are available before I start designing my app.


It’s a great question. And you are right - Android Studio doesn’t list it the Palette either which is not helpful. RecyclerView and CardView are recent UI additions to Android and probably the reason they haven’t made it on that list yet. One does However the Android Team at Ray Wenderlich is coming up with great tutorials ( that teach developers the most common types of tools used in developing Android apps. You can also stay updated via Android Developer site ( and blog ( I hope this helps.


You are explaining too much,tutorial wise it’s fine but i found this one.I love this blog article about Material Design it’s to the point and also not wasted my time.

very nice article.Keep it up good work :slight_smile:

because this tutorial was written for beginner, so she explained every step very carefully.

In the section
Activity Transitions With Shared Elements
You need to mention to remove


before pasting the said code in onItemClickListener() in MainActivity.

In “Using the Palette API in the List”:
Palette.generateAsync(photo, new Palette.PaletteAsyncListener() {
should be updated to
Palette.from(photo).generate(new Palette.PaletteAsyncListener() {

Hey there. I’ve been struggling by doing this project since i’m still kind of new at using material design. Could you give me a hand to know what’s my problem here?

and this is the other part.

Hey there, what is missing in this project?

I am getting the following error

Shared element must not be null

This is the code.

TravelListAdapter.OnItemClickListener onItemClickListener = new TravelListAdapter.OnItemClickListener() {
        public void onItemClick(View view, int position) {
            Intent intent = new Intent(MainActivity.this, DetailActivity.class);
            intent.putExtra(DetailActivity.EXTRA_PARAM_ID, position);

            ImageView placeImage = (ImageView) view.findViewById(;
            LinearLayout placeNameHolder = (LinearLayout) view.findViewById(;
            Pair<View, String> imagePair = Pair.create((View) placeImage, "tImage");
            Pair<View, String> holderPair = Pair.create((View) placeNameHolder, "tNameHolder");

            ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(MainActivity.this, imagePair, holderPair);
            ActivityCompat.startActivity(MainActivity.this, intent, options.toBundle());

Thanks for this material design code. But how to run this code below lollipop. I tried a lot but getting problem in DetailActivity i.e. savedInstanceState is null always. Please provide the same code which is backward compatible.

Sound like the method “getItemCount()” will trigger creation of the new list each time it gets called, could you please elaborate?

This tutorial is more than six months old, so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]