Questions tagged [android-cardview]

CardView is a widget used to show complex lists and cards in your app, it has material design style by default.

CardView is a widget used to show complex lists and cards in your app, it has material design style by default. CardView extends the FrameLayout class and lets you show information inside cards that have a consistent look on any app. CardView widgets can have shadows and rounded corners.

Useful links

2320 questions
11
votes
2 answers

Show RecyclerView in popup window

I have a RecyclerView, when RecyclerView item clicked, want to open a popup window which contains another RecyclerView. It is almost done, but in popup window, cardviews don't appear. I can't figure out why, can any one help? 1- My Main RecyclerView…
ysfcyln
  • 2,857
  • 6
  • 34
  • 61
11
votes
1 answer

Designing CardView while it's Parent is ConstraintLayout?

I messed up while editing RelativeLayout inside Cardview that contains Relativelayout ! ConstraintLayout will change wrap_content of relative layout to 0 and adds tools:layout_editor_absoluteX="10dp" all textview inside Relative layout…
LOG_TAG
  • 19,894
  • 12
  • 72
  • 105
11
votes
2 answers

Aligning items in cardview

I want my card to look like the following I kept my layout like this
11
votes
2 answers

What is the best way to do sliding images in cardview inside recycler?

I have a RecyclerView with Cardviews. I want sliding images inside this CardView, just like in OLX app. What is the best way to do so? I think about puting viewpager inside cardview. Is it ok or maybe I should try something else? I did it with…
SERG
  • 3,907
  • 8
  • 44
  • 89
11
votes
4 answers

Can one use cardview for listview item and how

I would like to implement CardView in my app so that all ListView items are CardViews. Is it as simple as encapsulating a ListView item XML in CardView?
Munez NS
  • 1,011
  • 1
  • 12
  • 31
11
votes
1 answer

RecyclerView Adapter and ViewHolder update dynamically

I am trying to make an app that will be loading news from the network and will be updating dynamically. I am using a RecyclerView and CardView to display the content. I use Jsoup to parse sites. I don't think that my code is needed because my…
11
votes
2 answers

No adapter attached; skipping layout

logcat error : No adapter attached; skipping layout I changed the context argument with getActivity(), but the app is still not running. public class FragmentActivity extends Fragment { private RecyclerView mRecyclerView; private…
11
votes
1 answer

Ripples not showing with selectableItemBackground as foreground on a CardView with a Android 5.0 device

I'm running this on a Nexus 5. Here's part of the code for my CardView: CardView cardView = new CardView(getActivity()); cardView.setRadius(4); LinearLayout.LayoutParams lp = new…
11
votes
2 answers

Android RecyclerView LayoutManager Exception

Hi I'm having an issue with the new Android Lollipop RecyclerView It keeps crashing with the following exception: Attempt to invoke virtual method 'void…
Bin power93
  • 127
  • 1
  • 1
  • 8
10
votes
1 answer

Material Design - Expanding (Transition) a Card to full screen

I'm struggling to implement the expand feature of the card view described by the Material Design for Android. In their design guidelines they show off different layouts for the Card component, but one example shows a card transition to fullscreen…
eja
  • 4,677
  • 3
  • 21
  • 30
10
votes
1 answer

MaterialCardview requires Theme.AppCompat

I'm trying to test my skills on new Google Material components. But for now I am encountering a problem with MaterialCardView The building process tells me The style on this component requires your app theme to be Theme.AppCompat [..] at…
Thibaud Renaux
  • 280
  • 1
  • 17
10
votes
3 answers

Using ConstraintLayout in CardView

Is it possible to use ConstraintLayout inside CardView for so that I can inflate it for a RecyclerView? Current layout is like this but I want to display it inside a CardView. https://i.stack.imgur.com/MeArp.png Reference XML…
Taran Vohra
  • 207
  • 1
  • 3
  • 11
10
votes
2 answers

Elevation animation on click on CardView

I want to add the elevation animation to my android.support.v7.widget.CardView, just like the material style Buttons do. I've tried to set a StateListAnimator: android:stateListAnimator="@anim/selector_raise" which points to my selector in…
manfcas
  • 1,933
  • 7
  • 28
  • 47
10
votes
3 answers

Rounded corners cardView don't work in RecyclerView - Android?

My android device is 4.3 and don't work round corner of cardView :
user4813855
10
votes
2 answers

How to add rounded corner as a background of Recyclerview in Android

I have a list. And I want to add a background like round corner to it. So the list is like a big card view. How can I implement this just like Google Translate. The rounded background can scroll as the listview does. So The shape.xml solution does…
penghaitao
  • 226
  • 1
  • 3
  • 11