Questions tagged [android-elevation]

Android elevation is a feature introduced in Android Lollipop 5.0, is part of new Google Material Design Recommendation. Also involves translationZ property.

Android elevation is a feature introduced in Android Lollipop 5.0, is part of new Google Material Design Recommendation. Also involves translationZ feature.

Material design introduces elevation for UI elements. Elevation helps users understand the relative importance of each element and focus their attention to the task at hand.

Assign Elevation to Your Views

206 questions
1
vote
0 answers

Child elevation of ExpandableListView

I have a problem with the class ExpandableListView Android. I use the API 10 and AppCompat Theme, to develop an application. I have implemented a ExpandableListView, but I would like to expand when a group has an elevation effect on their children.…
Ander Acosta
  • 1,060
  • 1
  • 12
  • 25
1
vote
0 answers

Android:elevation not working

I'm have to develop an android wear application, and Android:elevation in activity not showing a shadow. XML Code of activity -
0
votes
0 answers

Android elevation state list

So there is a drawable/color state list for the view, which allows selecting an appropriate drawable resource depending on the view state (default, pressed, hovered, etc.). I need to define different view elevations depending on those states, is…
Goltsev Eugene
  • 3,325
  • 6
  • 25
  • 48
0
votes
0 answers

how can I make an oval button elevated (with shadow) while having a background image?

I am trying to make an oval button with shadow/elevated features,while having a background image, but failed to do so , as I think it's due to background image.how can I make a button elevated (with shadow) having background image? Also Can I make…
0
votes
0 answers

When using Surface elevation, the elevation shadow effect below me will not be displayed

val pagerState = rememberPagerState() Column { Surface(elevation = 2.dp) { Column() { SearchView() FixedTabLayout(data = tabs, pagerState = pagerState) } } …
0
votes
0 answers

Android Jetpack Compose using same elevation value

Hi, I want to migrate my apps to android jetpack compose and create custom card like this. But, when I try to using my trick on xml (using same elevation value) to create shadow around the card, I can't generate the same result. How can this be…
0
votes
1 answer

Only keep shadow at the bottom of the view

have this layout - this cast shadow at the bottom as well as top : and what i need is : Steps view and ActionBar are 2 different views, one way I see is to…
Vikas Pandey
  • 1,115
  • 1
  • 15
  • 25
0
votes
0 answers

How to set elevation of parent view taking into consideration all its children?

I have RelativeLayout parent, which has 2 children horizontally positioned next to each other. First children is LinearLayout has custom background shape and some content in it and second one is ImageView which is representing custom shaped end of…
martin1337
  • 2,384
  • 6
  • 38
  • 85
0
votes
1 answer

Adding elevation to TextInputLayout is not working

I'm using the TextInputLayout and MaterialAutoCompleteTextView from Material Design's text fields to create a dropdown menu as follows:
0
votes
1 answer

Shadow on top of View element in React Native

I'm trying to add a shadow on the top of a View element, but I can't find a way to make it work on Android. On iOS is working properly, using negative value on Y axis, but on Android, shadow is showed at the bottom of the element. Here are the…
sebazelonka
  • 772
  • 2
  • 6
  • 13
0
votes
1 answer
0
votes
2 answers

Android Elevation not working in LinearLayout Android

I have Linear Layout, inside that i have recycler view. I want elevation and corner radius but it not working properly. Can someone suggest me what i am doing wrong. MainLayout
Kotlin Learner
  • 3,995
  • 6
  • 47
  • 127
0
votes
1 answer

Why does the click effect disappear when using the stateListAnimator property?

I made a button with the desired design as shown in the picture. But when I click the button, the click effect does not appear. The cause lies in the stateListAnimator="@null" property. Clearing this property has no elevation effect. And also, if…
ybybyb
  • 1,385
  • 1
  • 12
  • 33
0
votes
1 answer

Relative Layout elevation not showing shadow

I have multiple relative layouts with a Constraint layout as root. I have set an image as background of all the Relative Layouts, and set the elevations. But the elevations aren't producing any shadow. How do I fix this? Below is my…
Sparsh Dutta
  • 2,450
  • 4
  • 27
  • 54
0
votes
1 answer

Elevation is not working in PopupWindow Android

I am using PopupWindow in my android app and its working fine. But I have to add elevation to it but its not working. Here is how I am doing it View to show in popup window popup_view_order_status
Zohab Ali
  • 8,426
  • 4
  • 55
  • 63