Questions tagged [materialcardview]

54 questions
0
votes
2 answers

android - how to put shadow on just the top edge of rounded cardview?

[![my image][1]][1] As. you can see from the image i have a rounded corner shape ..but i want to have a shadow just on the top (there is no where else for it anyway since its covered on the other ends). How can i place a shadow just at the top of…
j2emanue
  • 60,549
  • 65
  • 286
  • 456
0
votes
0 answers

Resize an stretched Vector in ImageView - Android Studio

I've been searching this for a while but didn't found nothing. How can I resize an Vector inside an ImageView? I tried a lot of things but didn't work. The vector is shown stretched like that: My code…
0
votes
0 answers

Android UI MaterialCardView not displaying shadow on all sides

I am using a MaterialCardView to display the following expected layout. IOS screen shot, expected UI But on Android side it looks like this. Android screenshot, shadow does not appear on all sides, mainly on the top This is my code for…
akash89
  • 881
  • 3
  • 12
  • 31
0
votes
0 answers

GridLayout with columns of equal width in Android

I have a GridLayout (4 columns / 8 rows) of MaterialCardViews. Each card has equal layout_columnWeight and layout_rowWeight of 0.25 and their layout_gravity is set to center|fill_horizontal. The cards have a TextView and two ImageViews of width 30dp…
0
votes
0 answers

androidx cardview settings lost when running on emulator

I have a recyclerview with cardview for each item. The layout looks fine from Android Studio design. But when it is running on Emulator and inspecting the layout, some of the cardview settings are changed and the layout is different from design…
Charles Ju
  • 1,095
  • 1
  • 9
  • 28
0
votes
1 answer

Android/Kotlin: How to show an activity as a popup/dialog when clicking on a card from a recyclerview?

I've searched for it everywhere but I didn't found a satisfying answer yet. So, I'd would like to know: How to show an activity as a popup/dialog when clicking on a card from a recyclerview? Is it made straight through the adapter? Do I need a…
0
votes
1 answer

Material Cardview - rounded corner of TabLayout not getting clipped

When I'm putting my TabLayout inside MaterialCardView to make TabLayout rounder but I'm not getting desired result
0
votes
0 answers

A Recycler View or Card View with Swipe Gesture's which slides in a carousel whenever a task is assigned [Android Studio - Kotlin]

I have roughly sketched a design in which under the mainActivity there should be a carousel/card view (With Recycler Spanning) portraying the task details assigned to the user and it should be enabled with swiping gesture where the user would swipe…
0
votes
1 answer

Weird issue with MaterialCardView

I'm trying to make a rounded shape like this : The code below works great on a device with 6.7" as screen size.
0
votes
1 answer

Why only need to set the stroke width to show the stroke in MaterialCardView? Discrepancy with documentation

According to both Android Developer documentation and Material.io, both said I need to set both stroke width and stroke color in order to render the stroke Android Developer documentation "Stroke width can be set using the strokeWidth attribute.…
0
votes
2 answers

Attribute layout_columnWeight not found in MaterialCardView inside Gridlayout

I am using the latest Grid Layout implemented in Gradle as below: implementation 'com.google.android.material:material:1.3.0' Below is my MaterialCardView Inside a GridLayout
0
votes
1 answer

MaterialCardView is cutted off in RecyclerView in RTL mode

I have application with RecyclerView and MaterialCardView in the items. And I see, that my items are cutted off: Here is my items xml file:
Alex D.
  • 1,424
  • 15
  • 40
0
votes
1 answer

MaterialCardView is in front of NavigationView. How can I send it behind? [Android Studio]

I added in my activity_main.xml a MaterialCardView button com.google.android.material.card.MaterialCardView & navigation drawer com.google.android.material.navigation.NavigationView. How can I send MaterialCardView (@+id/cleanButton) behind the…
0
votes
2 answers

MaterialCardView not showing when added programmatically

I am not able to see MaterialViewCard at my Activity when adding programmatically. If I add directly on XML, it shows. But When adding via Kotling, it doesn't. XML sample:
0
votes
2 answers

Position button on top-end of CardView

How can I add a button on top-end of CardView? I have a solution but I don't like set a fixed height (ie 50dp) of button and than set margin_top (ie 25dp) of card_view. Do you have other solutions?
Carlos
  • 97
  • 1
  • 10