android-cardview

Different width of layout inside RecyclerView and normal LinearLayout

我是研究僧i 提交于 2019-12-02 00:09:30
问题 I have a card view class which looks like: public class CardTest extends LinearLayout { public CardTest(Context context) { super(context); LayoutInflater.from(getContext()).inflate(R.layout.card_main, this); } } the card_main.xml is like: <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_height="wrap_content" android:layout_width="fill_parent" android

Different width of layout inside RecyclerView and normal LinearLayout

故事扮演 提交于 2019-12-01 20:29:22
I have a card view class which looks like: public class CardTest extends LinearLayout { public CardTest(Context context) { super(context); LayoutInflater.from(getContext()).inflate(R.layout.card_main, this); } } the card_main.xml is like: <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_height="wrap_content" android:layout_width="fill_parent" android:orientation="vertical" > <android.support.v7.widget.CardView android:layout_height="wrap_content"

Unable to remove extra space between CardView items - Scrollable RecyclerView

时光总嘲笑我的痴心妄想 提交于 2019-12-01 18:16:20
Folks, I am out of options while attempting to removing extra space between cardview items in my recyclerview below is the current output. Please suggest. <android.support.v7.widget.CardView android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#303030" android:id="@+id/cv" android:layout_marginTop="2dip" android:layout_marginBottom="2dip" card_view:cardUseCompatPadding="true" card_view:cardElevation="5dp" android:foreground="?android:attr/selectableItemBackground" > <RelativeLayout android:layout_width="match_parent" android:layout_height="80dp" android

Importing CardView and RecyclerView (Android 5.0) in my existing project (eclipse)

怎甘沉沦 提交于 2019-12-01 14:59:00
I want to import CardView and RecyclerView in my existing project. I am using ECLIPSE. I read other answers in stackoverflow but all of them are for Android Studio. ve Can anyone please help me ? The error I am receiving is : CardView cannot be resolved to a type. Update: Commonwares answer helped me solve this. But now I have another error. (Error inflating class and android.support.v7.widget.CardView). Please someone help me. They are also available as Android library projects now, in extras/android/support/v7/ of your SDK installation. Make a copy of those projects elsewhere on your hard

Recycler view not populate any data on my screen

我怕爱的太早我们不能终老 提交于 2019-12-01 14:28:34
My main activity shows an empty RecyclerView . My CardView is not displayed. The data is stored in a Firebase Database but is not displayed for some reason. I have also searched the web but nothing helped me. I tried everything listed on web as well as on Stack Overflow. MainActivity.java public class MainActivity1 extends AppCompatActivity { private RecyclerView mQuestionList; private CardView mCardVieww; private DatabaseReference mDatabase; private FirebaseAuth mAuth; private FirebaseAuth.AuthStateListener mAuthListener; private DatabaseReference mDatabaseUsers; private LinearLayoutManager

Importing CardView and RecyclerView (Android 5.0) in my existing project (eclipse)

心不动则不痛 提交于 2019-12-01 13:47:18
问题 I want to import CardView and RecyclerView in my existing project. I am using ECLIPSE. I read other answers in stackoverflow but all of them are for Android Studio. ve Can anyone please help me ? The error I am receiving is : CardView cannot be resolved to a type. Update: Commonwares answer helped me solve this. But now I have another error. (Error inflating class and android.support.v7.widget.CardView). Please someone help me. 回答1: They are also available as Android library projects now, in

Recycler view not populate any data on my screen

安稳与你 提交于 2019-12-01 12:25:51
问题 My main activity shows an empty RecyclerView . My CardView is not displayed. The data is stored in a Firebase Database but is not displayed for some reason. I have also searched the web but nothing helped me. I tried everything listed on web as well as on Stack Overflow. MainActivity.java public class MainActivity1 extends AppCompatActivity { private RecyclerView mQuestionList; private CardView mCardVieww; private DatabaseReference mDatabase; private FirebaseAuth mAuth; private FirebaseAuth

RecyclerView adapter is showing blank cardview

安稳与你 提交于 2019-12-01 08:35:44
I have a nasty issue on sub api21 devices. I am using a RecyclerView.Adapter adapter to inflate android.support.v7.widget.CardView . The idea is that the cards will only add information that is present to the cards. If no information is present the card wont show at all. So I create these cards programatically. Here are screen shots on api21 and api19 Notice how api19 shows cards with no values in them. I believe the issue is cause by the adapter calling onCreateViewHolder with no values. Is there a way to bypass onCreate? or onBind? Or is there a way to have sub api21 handle cards a little

RecyclerView adapter is showing blank cardview

女生的网名这么多〃 提交于 2019-12-01 07:01:49
问题 I have a nasty issue on sub api21 devices. I am using a RecyclerView.Adapter adapter to inflate android.support.v7.widget.CardView . The idea is that the cards will only add information that is present to the cards. If no information is present the card wont show at all. So I create these cards programatically. Here are screen shots on api21 and api19 Notice how api19 shows cards with no values in them. I believe the issue is cause by the adapter calling onCreateViewHolder with no values. Is

Issue with CardView and OnClickListener in RecyclerView

笑着哭i 提交于 2019-12-01 06:25:00
问题 I am using CardView layout as Row for RecyclerView. However I am facing issue in attaching OnClickListener to the layout. I am using following layout <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" android:id="@+id/card_view" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="@dimen/unit_5" android:clickable="true" android:longClickable="true"