android-cardview

Aligning Two LinearLayout Side By Side Inside a CardView

本秂侑毒 提交于 2019-12-25 08:49:54
问题 I am trying to align two TextView s OR LinearLayout s side by side in order to reach this cardView: I have used layout_gravity and layout_weight attributes inorder to solve this situation, but with no luck. I am open to any other suggestions that may accomplish my goal as log as I can generate cardview dynamicaly using BaseAdapter with ListView in the Activity Code. I am looking for XML solution. Here is my xml code: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http:/

How to display image and text from Cardview in another activity onClick?

点点圈 提交于 2019-12-25 03:42:49
问题 I have a sample app from exoguru which contains cardview each card consists of an image and corresponding text .Now how to display that image and text in another activity on clicking that particular card? Here is the screenshot Here is the ViewHolder which contains the onclick for the cardview class ViewHolder extends RecyclerView.ViewHolder{ public ImageView imgThumbnail; public TextView tvNature; public TextView tvDesNature; public ViewHolder(View itemView) { super(itemView); imgThumbnail =

Cardview shadow for ImageView

℡╲_俬逩灬. 提交于 2019-12-24 15:13:03
问题 (1 screenshot - ImageView visibility is visible, 2 screenshot - gone) When using ImageView with CardView we can say that shadow isn't visible at all (especially on the smartphone display) <android.support.v7.widget.CardView android:id="@+id/ImageViewWrapper" android:layout_width="0dp" android:layout_height="0dp" android:elevation="0dp" android:layout_margin="10dp" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:cardCornerRadius="6dp"> <android

Android: How to keep corner radius while setting a background drawable?

六月ゝ 毕业季﹏ 提交于 2019-12-24 14:47:15
问题 <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="wrap_content" android:layout_margin="@dimen/activity_vertical_margin" card_view:cardCornerRadius="12dp" card_view:cardElevation="12dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> ..

onItemClick not working for Card View

爷,独闯天下 提交于 2019-12-24 12:48:21
问题 It uses retrofit 2.0 to fetch the data from the webservice and bind it to the card view. When I click on the card view having image and textviews, on click is not triggering, rather a strange behaviour is at the very corner edges of the card view onclick is triggering. Item_row.xml <?xml version="1.0" encoding="utf-8"?> <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:layout_width=

width and height must be > 0 error when using MPAndroidChart library

家住魔仙堡 提交于 2019-12-24 12:33:42
问题 I wanted to use MPAndroidChartLibrary in my application, but I am experiencing problems which I can't solve on my own. I would like to put the chart into the CardView which is stored inside ListView. CardView's xml looks like this: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" > <android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto" xmlns:android="http:/

Views getting flagged inside CardView

烂漫一生 提交于 2019-12-24 09:04:29
问题 Everything with my android studio was working fine until I came across this weird thing that when I add Views inside a CardView the IDE is warning me telling that for example "TextView is not allowed here". I have done this a thousand times before and It was absolutely fine. Here is a List of the things I have tried 1. Restarted the IDE. 2. Restarted the entire system. 3. Tried the Invalidate Caches/Restart thing. 4. Cleaned the peoject. 5. Verified the support library version and files 6.

Only first CardView of RecyclerView is being Colored

妖精的绣舞 提交于 2019-12-24 07:38:39
问题 I have created an app in Android Studio, using CardViews in RecyclerView in connection with Firebase Realtime database, in which user can check his attendance such that if the user came on a holiday(R,G, Saturday or Sunday) that CardView is colored. But in my code only the first CardView is getting colored. I have checked through Log statements that it's traversing through both R and G's if-else statements. My code is: public class frag2ofAttendanceNew extends Fragment { String

ImageView in CardView not show radius on Android 4.3

為{幸葍}努か 提交于 2019-12-24 02:22:34
问题 Here my layout xml: <?xml version="1.0" encoding="utf-8"?> <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/catalog_item_card_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" card_view:cardCornerRadius="5dp" card_view:cardUseCompatPadding="true"> <android.support.constraint.ConstraintLayout android:layout_width=

on click RecyclerView go to another activity with data in android

我的未来我决定 提交于 2019-12-24 01:13:27
问题 i am using RecyclerVeiw to display some images and on click its should start New Activity showing id, name of the RecyclerView. I implemented the code but its now working, its not clickable. below is my adapter import android.content.Context; import android.content.Intent; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com