S
S
Sergey Shilovsky2018-09-01 22:18:35
Android
Sergey Shilovsky, 2018-09-01 22:18:35

Why not use cardView as root element?

In all the examples and tutorials that I have seen, cardView is used as a child element:

<LinearLayout>
    <android.support.v7.widget.CardView/>
</LinearLayout>

Or
<RelativeLayout >
    <android.support.v7.widget.CardView/>
</RelativeLayout >

I made the root cardView and did not see any difference, so why do they do it in the tutorials?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
aol-nnov, 2018-09-02
@aol-nnov

patamushta:
1) 85% of tutorials do not stand up to criticism
2) a rare screen consists of one CardView (add some kind of navigation drawer, fab thread, a search bar that disappears when scrolling, or something else - the issue will be resolved by itself)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question