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
0
votes
2 answers

How to implement shadows and elevation? Android Studio

I've been searching for a couple of days how to make these color shadows and the elevation effect but it's not clear anywhere. What's the easiest way to do this?
0
votes
1 answer

How to set button above CardView ? (Working on the XML but now when App launches)

I can't put a button above a CardView. It shows above in the XML when I set translationZ for the button, but when I launch the App, the button is still not displayed above. Here is my XML:
Funnycuni
  • 369
  • 1
  • 15
0
votes
0 answers

NativeScript: why nativescript android elevation is just working on corners in nativescript?

Why android elevation is just working on corners in below image: Link of my screenshot
0
votes
0 answers

Elevation not working in Toolbar when a logo is used

The elevation of my toolbar is not working when I use a Logo. XML of my toolbar:
TwickE
  • 23
  • 4
0
votes
1 answer

How to Change Toolbar Elevation Color?

In app there are is an option to change the theme color and depending on theme color I am changing the color of toolbar background using following line: toolbar.setBackgroundColor(getResources().getColor(R.color.white)); However, I could not find…
Faisal Shaikh
  • 3,900
  • 5
  • 40
  • 77
0
votes
1 answer

How to prevent CardView cardElevation changing the content size on API 19?

The layout file with the CardView in ConstraintLayout:
s-hunter
  • 24,172
  • 16
  • 88
  • 130
0
votes
1 answer

Android Constraint Layout using Flow with elevation and cornor radius

Is it possible to create a constraint layout with elevation, corner radius etc without using Cardview ? Constraint layout has a "constraintlayout.helper.widget.Flow" that nicely packs the widgets but not sure if it is possible to make it look…
0
votes
0 answers

'elevation'/'zIndex' prop on React Native View not working on Android

I'm trying to add a hit slop to some icons and I want them to persist even if the icon is hidden under another component. This is already working fine on iOS with the zIndex prop, but neither the zIndex or elevation prop seem to be having any effect…
user2872777
  • 99
  • 2
  • 11
0
votes
2 answers

Elevation style prop causing issues with child components

Have all my styling done for two buttons I am using inside header title to switch back between screens. The iOS implementation works perfect but the elevation style prop for Android is causing some issues. It seems to also pass down the elevation…
SKeney
  • 1,965
  • 2
  • 8
  • 30
0
votes
1 answer

Toolbar not showing elevation in Android 9, API 28

In my app, the Toolbar is not showing shadow at its bottom, my target API is from Android 6 M to Android 9 P, I am testing my app on device having Android 9 Pie. There is a same question here but no…
Akshdeep Singh
  • 1,301
  • 1
  • 19
  • 34
0
votes
2 answers

Using android:elevation makes a TextView disappear

I have this RelativeLayout with only two views. Please see below what I have tried:
Asyl Paitesh
  • 161
  • 2
  • 8
0
votes
3 answers

Elevation property not working in api >= 27

I am setting the elevation property on my AppBarLayout & it works from api 21 to 26 but the shadow isn't shown on device, emulator running on api >= 27. Has there been any change with AppBarLayout or elevation property? here's how I am using the…
Darshan
  • 4,020
  • 2
  • 18
  • 49
0
votes
0 answers

set elevation to custom checkbox button only in selector android

I want to set elevation/shadow to a custom checkbox button only and not its text. This is what I am doing currently
Nik
  • 2,913
  • 7
  • 40
  • 66
0
votes
1 answer

Android elevation not there throughout whole app

I have a problem with my Android App: The elevation is not working throughout the whole app. My CardViews are not elevated, my Toolbars don't have this little elevation to it and you can also not see the edge of my BottomNavigationView, because it…
0
votes
0 answers

CardView shadow not shown

After trying almost everything in stackoverflow and deeply digging into my code, I realized that the problem with CardView's shadow was setRotationY(). The CardView was inside a RecyclerView and for some reasons (rtl) I had to rotateY both…
navid
  • 1,022
  • 9
  • 20