android-cardview

Ripple Effect on androidx.cardview.widget.CardView

让人想犯罪 __ 提交于 2020-07-10 03:31:27
问题 I am trying to add ripple effect on click of card view strangely it is not coming up? What could be wrong here? <?xml version="1.0" encoding="utf-8"?> <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/tools" android:id="@+id/card_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:foreground="?android:attr

Ripple Effect on androidx.cardview.widget.CardView

醉酒当歌 提交于 2020-07-10 03:31:20
问题 I am trying to add ripple effect on click of card view strangely it is not coming up? What could be wrong here? <?xml version="1.0" encoding="utf-8"?> <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/tools" android:id="@+id/card_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:foreground="?android:attr

MaterialCardView crashes with material:1.1.0

邮差的信 提交于 2020-07-03 05:52:16
问题 I am using MaterialCardView as my cardview layout. Now, Android-studio started showing me that instead of current implementation "com.google.android.material:material:1.0.0" , I should update to 1.1.0 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/edit_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:orientation="vertical" android

MaterialCardView crashes with material:1.1.0

∥☆過路亽.° 提交于 2020-07-03 05:52:13
问题 I am using MaterialCardView as my cardview layout. Now, Android-studio started showing me that instead of current implementation "com.google.android.material:material:1.0.0" , I should update to 1.1.0 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/edit_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:orientation="vertical" android

MaterialCardView crashes with material:1.1.0

北慕城南 提交于 2020-07-03 05:51:24
问题 I am using MaterialCardView as my cardview layout. Now, Android-studio started showing me that instead of current implementation "com.google.android.material:material:1.0.0" , I should update to 1.1.0 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/edit_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:orientation="vertical" android

How I can clipping vertical line in a CardView?

牧云@^-^@ 提交于 2020-06-29 04:01:25
问题 I want clipping vertical line view in radius CardView like this pic: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.v7.widget.CardView android:layout_width="match_parent" android:layout_height="140dp" android:layout_margin="20dp" app:cardCornerRadius="40dp">

CardView background color always white

与世无争的帅哥 提交于 2020-06-22 05:01:27
问题 I am using RecyclerView with GridLayoutManager and I have each item as CardView. Unfortunately, the CardView here does not seem to change its background color. I tried in layout and programmatically as well but I have tried nothing seems to work. I Have been struggling for quite a while. I appreciate if someone could help me out with this issue. 回答1: If you want to change the card background color, use: app:cardBackgroundColor="@somecolor" like this: <android.support.v7.widget.CardView

CardView background color always white

限于喜欢 提交于 2020-06-22 05:01:05
问题 I am using RecyclerView with GridLayoutManager and I have each item as CardView. Unfortunately, the CardView here does not seem to change its background color. I tried in layout and programmatically as well but I have tried nothing seems to work. I Have been struggling for quite a while. I appreciate if someone could help me out with this issue. 回答1: If you want to change the card background color, use: app:cardBackgroundColor="@somecolor" like this: <android.support.v7.widget.CardView

MaterialCardview requires Theme.AppCompat

点点圈 提交于 2020-06-13 21:45:53
问题 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 com.google.android.material.card.MaterialCardView.<init> With this clue I added style="@style/Theme.AppCompat" & android:theme="@style/Theme.AppCompat" to the MaterialCardView and also to my Activity in the manifest. I tried also to change my Acitivity to

How to run my RecyclerView with CardView in fragment?

久未见 提交于 2020-05-29 11:18:32
问题 I have this code and everytime I tried to run it ..the application is not running not error but not running can anyone please help me to determine what is the reason for getting this kind of problem. because I'm doing RecyclerView with CardView in fragment I have this problem almost a week :( this is my code: public class RecyclerViewAdapter extends RecyclerView.Adapter<RecyclerViewAdapter.MyViewHolder> { private Context mContext ; private List<Book> mData ; public RecyclerViewAdapter(Context