android-cardview

What's the difference between the CardView from com.google.android.material and android.support.v7.widget

[亡魂溺海] 提交于 2020-05-25 11:24:03
问题 I'd like to know the difference between both widgets android.support.v7.widget.CardView which is added using Android Studio IDE components palette and com.google.android.material.card.MaterialCardView which is used on Material Design documentation. Are they two libraries that contains the same widget? Which one should I use and how to take this decision? I tried to read more the developers.android documentation, but the docs on developer.android are really big with many version and I'm yet a

What's the difference between the CardView from com.google.android.material and android.support.v7.widget

蹲街弑〆低调 提交于 2020-05-25 11:24:03
问题 I'd like to know the difference between both widgets android.support.v7.widget.CardView which is added using Android Studio IDE components palette and com.google.android.material.card.MaterialCardView which is used on Material Design documentation. Are they two libraries that contains the same widget? Which one should I use and how to take this decision? I tried to read more the developers.android documentation, but the docs on developer.android are really big with many version and I'm yet a

CardView suddenly turned black

淺唱寂寞╮ 提交于 2020-05-25 07:54:07
问题 I've got a problem with the CardView in the RecyclerView . My CardView suddenly became black and my RatingBar became blue. I'm using the InfiniteRecyclerView but changing it to the simple RecyclerView has no effect. I can change the CardView 's background colour to white but the RatingBar will still be blue. This is an example of what is happening: Black CardView I use the normal RecyclerView in another activity within a fragment with the same adapter and it looks just fine. Here is an

CardView suddenly turned black

爱⌒轻易说出口 提交于 2020-05-25 07:52:04
问题 I've got a problem with the CardView in the RecyclerView . My CardView suddenly became black and my RatingBar became blue. I'm using the InfiniteRecyclerView but changing it to the simple RecyclerView has no effect. I can change the CardView 's background colour to white but the RatingBar will still be blue. This is an example of what is happening: Black CardView I use the normal RecyclerView in another activity within a fragment with the same adapter and it looks just fine. Here is an

CardView: How do I add a gradient background while maintaining the radius

别说谁变了你拦得住时间么 提交于 2020-05-13 04:22:51
问题 I want to re-create the image below with a CardView. To achieve this, I created a gradient file (btn_gradient.xml) and then proceeded to create the CardView. CardView implementation: <android.support.v7.widget.CardView android:layout_width="match_parent" android:layout_height="44dp" android:layout_margin="25dp" app:cardElevation="0dp" app:cardCornerRadius="4dp" app:cardPreventCornerOverlap="false"> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android

CardView: How do I add a gradient background while maintaining the radius

感情迁移 提交于 2020-05-13 04:21:26
问题 I want to re-create the image below with a CardView. To achieve this, I created a gradient file (btn_gradient.xml) and then proceeded to create the CardView. CardView implementation: <android.support.v7.widget.CardView android:layout_width="match_parent" android:layout_height="44dp" android:layout_margin="25dp" app:cardElevation="0dp" app:cardCornerRadius="4dp" app:cardPreventCornerOverlap="false"> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android

Margin between items in recycler view Android

女生的网名这么多〃 提交于 2020-04-29 06:08:51
问题 Hi I am Following this tutorial: http://www.journaldev.com/10024/android-recyclerview-and-cardview-example-tutorial Now I am facing a weird issue the margin between each CardView item inside RecyclerView is way too much. ISSUE How to reduce the Margin between each item of CardView placed inside RecyclerView ? 回答1: I faced similar issue, with RelativeLayout as the root element for each row in the recyclerview. To solve the issue, find the xml file that holds each row and make sure that the

Margin between items in recycler view Android

五迷三道 提交于 2020-04-29 06:07:21
问题 Hi I am Following this tutorial: http://www.journaldev.com/10024/android-recyclerview-and-cardview-example-tutorial Now I am facing a weird issue the margin between each CardView item inside RecyclerView is way too much. ISSUE How to reduce the Margin between each item of CardView placed inside RecyclerView ? 回答1: I faced similar issue, with RelativeLayout as the root element for each row in the recyclerview. To solve the issue, find the xml file that holds each row and make sure that the

How do you display 24 hour time format in hourly increments on a time slider in android?

孤者浪人 提交于 2020-03-03 11:45:06
问题 I have a 2 step question here: 1) How do I display a time slider UI which scrolls horizontally upon touch in a 24-hour format? 2) How do I divide it into a 24 hour format with each slot consisting of a 1 hour slot each? The time slot is divided into hourly increments, such that only 8 hours are visible at a time ( but it's actually a 24 hour time slider which scrolls horizontally) Also, I am planning to make it such that based on the start and end time returned by the JSON I am using, it

CardView and RecyclerView divider behaviour

北城以北 提交于 2020-02-24 17:02:50
问题 I am trying to use RecyclerView with CardView as an single item of the list. I want to implement horizontal list, with LayoutManager it is really easy. So I started to implement it. It seems that everything works, but not as I expected here is the result using CardView as an list item. Looks pretty good, but I haven't set any paddings, dividers and rounded corners. Here is my XML for card view item. <?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.CardView xmlns:android="http