android-cardview

How to use RecyclerView and CardView

南楼画角 提交于 2019-11-28 01:34:06
I don't have much experience in android development and try to implement RecyclerView in my application. The version of android studio does not have Android L neither there is option to install. Everytime it says android.support.widget.v7.RecyclerView in not used and disabled it from import packages. I give refrences in layout file also in Gradle.build but my problem is still there anyone help please? Abhishek Follow this line CardView and RecyclerView in Material Design http://icetea09.com/blog/2014/12/19/android-cardview-and-recyclerview-in-material-design/ add these into the dependencies :

android listview inside cardview onTouch listener conflict / sensitivity

老子叫甜甜 提交于 2019-11-28 00:58:57
问题 Here's a test project which shows the issue dropbox link: https://www.dropbox.com/sh/8s3v9ydcj6jvpl8/AACZ2VRP2N9R1ec7pxrsAn0ga?dl=0 This is a continuation of the question I had here which was answered but now I am asking about the sensitivity/conflict of onTouch: Android CardView with ListView inside - onTouchListener on CardView not working I have a cardview with a listview inside. I will need the scroll and click item in list view to work too and I want to be able to move the entire

Passing RecyclerView CardView Clicked Item Data To Activity

爱⌒轻易说出口 提交于 2019-11-27 22:20:31
问题 I have a question about passing clicked cardview data to activity, and here the full story : I have an Activity called "Details", which contains 2 TextViews in it's layout, Title & Description . I have setup a fragment ( tab_1 ) which contain the recyclerview codes and the the items data, each item of those contain : title & description . What i want : When the user click the item, it will open the Details Activity, and change Details layout title, with clicked item title, and the same for

Android CardView remove padding

限于喜欢 提交于 2019-11-27 19:41:17
how do I get rid of this strange padding in the layout below: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="@color/ColorPrimaryDark"> <android.support.v7.widget.CardView android:layout_width="fill_parent" android:layout_height="wrap_content" card_view:cardCornerRadius="10dp" android:layout_marginTop="9dp" android:layout_marginLeft="9dp" android

Pull to refresh recyclerview android

喜你入骨 提交于 2019-11-27 18:20:39
Hi I've a tabbed activity, and in the first tab I fetch data from server and show it in a recyclerview within card views. For fetching the data from server I use the volley library. I want to implement the Pull to refresh to load the data (so whenever I pull it has to do the request to the network). And I want also to disable the network request whenever I switch between tabs (because when I change tab focus in my app it starts to fetching data) I want to do the network request only 1 time (when user log in first time) and then others requests maneged only by pull to refresh. Here's my

How to know when the RecyclerView has finished laying down the items?

只谈情不闲聊 提交于 2019-11-27 18:06:31
I have a RecyclerView that is inside a CardView . The CardView has a height of 500dp, but I want to shorten this height if the RecyclerView is smaller. So I wonder if there is any listener that is called when the RecyclerView has finished laying down its items for the first time, making it possible to set the RecyclerView 's height to the CardView 's height (if smaller than 500dp). andrino I also needed to execute code after my recycler view finished inflating all elements. I tried checking in onBindViewHolder in my Adapter, if the position was the last, and then notified the observer. But at

Can one use cardview for listview item and how

做~自己de王妃 提交于 2019-11-27 18:03:26
问题 I would like to implement CardView in my app so that all ListView items are CardView s. Is it as simple as encapsulating a ListView item XML in CardView ? 回答1: Yes. Underneath CardView is just a simple FrameLayout that you could just inflate into a ListView (or RecyclerView ). Here's an example: <android.support.v7.widget.CardView android:id="@+id/ly_root" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas

Make ImageView fit width of CardView

家住魔仙堡 提交于 2019-11-27 17:35:11
I have a CardView with rounded corners, I want to have an ImageView at the top like shown in the example taken from the material design guidelines below. <android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto" android:id="@+id/card_view" android:layout_width="wrap_content" android:layout_height="wrap_content" card_view:cardCornerRadius="4dp"> <!-- ... --> </android.support.v7.widget.CardView> Then inside the CardView I have this ImageView <ImageView android:id="@+id/imageView" android:layout_width="fill_parent" android:layout_height="150dp" android:layout

Cardview shadow not appearing in lollipop devices?

时光毁灭记忆、已成空白 提交于 2019-11-27 13:53:25
Am using the cardview in my android app. However the shadow is not showing. Here is the xml layout The default optionsmenu shadow also not showing. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:card_view="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ECEDF0" android:orientation="vertical" > <android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"

Expand/collapse animation in CardView

∥☆過路亽.° 提交于 2019-11-27 13:11:17
问题 I try to do something like this : I managed to do my cardViewAdapter but I block to enlarge my cards. I resumed the code of this response (Here the name of the class is : CardsAnimationHelper ) to do the animation but it's superimposed. Before expand: After expand: I solved the problem above but if on my cardView I display 10 elements at the same time for a list of 50. If I expand the first, the numbers 11,21,31,41 will also expand. Do you have a trick for this not to happen? I have reflected