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

Can't remove "shadow" from unelevated transparent FloatingActionButton

After spending multiple hours researching this problem, I decided to ask instead of wasting more time on such a (seemingly) easy task. I'm trying to implement a FloatingActionButton with transparent background and no broder, to show just a custom…
1
vote
0 answers

Android Material Design- Elevation shadow not working for nested inner layouts

I am writing a code with a few nested layouts. As I have used material design I also wanted to set elevation. Though elevation was working fine with the elements of outermost layout, the contents of the inner LinearLayout (nested inside a…
1
vote
1 answer

Progress bar shadow only on filled part

Implementing a progress bar in android, trying to get a drop shadow on the bottom part of the filled section only, like this: API level is KitKat and up but i wont mind a solution that applies to LOLLIPOP and up only. Elevation does not seem to…
Ziv Kesten
  • 1,206
  • 25
  • 41
1
vote
3 answers

Toolbar behind ViewPager kitkat

This Activity runs in fullscreen. Since elevation is missing in Kitkat, the ViewPager is going above the Toolbar. Here is my layout:
1
vote
0 answers

Why does my Floating Action Button only work when it is above the listview?

While trying to create a UI, I noticed that my FloatingActionButton when having the same elevation as the ListView and inside of the ListView boundaries, the button won't work. However, when I increase the elevation of the FloatingActionButton to be…
Wowzer
  • 1,103
  • 2
  • 12
  • 26
1
vote
3 answers

Card View not proper in 5.1.1 Tablet and 5.0.2 Mobile Device

I am having the following view created with CardView .Adding dependency compile 'com.android.support:cardview-v7:23.0.+' in gradle dependency Below is the xml file for the same.
Sreehari
  • 5,621
  • 2
  • 25
  • 59
1
vote
3 answers

Altitude always returns 0.00

The return value from the getAltitude() method always returns 0.00. Many answers suggest it could be down to the provider not supporting altitude details. I have checked this and it does support altitude. I want to obtain the altitude from GPS…
Paddy S
  • 45
  • 6
1
vote
1 answer

Android custom outline renders weird looking elevation shadow

I have a custom view based on FrameLayout shown in fullscreen (as part of Android's SystemUI package) and I use canvas to draw some stuff. Now I want a single element (one of the circles I draw) in this view to cast some kind of shadow. So I've…
oreiche
  • 301
  • 2
  • 7
1
vote
2 answers

Multiple layers of shadows in android recyclerview elevation

I have a recyclerview with an elevation of 8dp, transparent background and bounds as outlineProvider. clipToPadding is set to false on the parent relativelayout. I am facing a weird issue w.r.t the shadow cast by the recyclerview elevation. The…
1
vote
1 answer

Android elevation shadows not showing at runtime

I'm trying to utilize elevation attributes to display drop shadows. As you can see from the images, it displays fine in Android Studio but when run on the device, one of the drop shadows disappears. Why would one show but not the other? Image from…
easycheese
  • 5,859
  • 10
  • 53
  • 87
1
vote
2 answers

Android: Set material design elevation for button using AppCompat V7

When following this Android tutorial using AppCompat V7 to get the new Tool Bar work, the android.support.v7.widget.Toolbar supports android:elevation on SDK's < Lollipop. This is because they use android.support.v7.widget.Toolbar and not Toolbar.…
michael
  • 3,835
  • 14
  • 53
  • 90
1
vote
1 answer

Shadow of small, wide view looks weird on Android 5.0 but not on 5.1

If I add an elevation to a small, wide view on Android 5.0, the shadow looks really weird. However, on Android 5.1 it looks ok. For an example, take a look at the following comparison image (please click to view at full resolution): On 5.1 the…
Kirill Rakhman
  • 42,195
  • 18
  • 124
  • 148
1
vote
1 answer

AppCompat Button Without Elevation

I have a few dozen buttons in my app and a style that inherits from Widget.AppCompat.Button. Most of the buttons have an elevation and state change animation. Awesome. What isn't awesome is that a few of the buttons don't have anything of that extra…
Sababado
  • 2,524
  • 5
  • 33
  • 51
1
vote
1 answer

My Spinner View has an elevation shadow acquired from its parent

I have a LinearLayout with two children: a TextView and a Spinner. The LinearLayout, which acquired a theme I defined in the style.xml file, has an elevation value to create the shadow. However, for some reason, the Spinner is getting a shadow as…
1
vote
2 answers

Android Trouble with cardElevation

I'm meeting a strange problem. I've a XML like this : ScrollView LinearLayout CardView CardView CardView On each cardView I set : app:cardElevation="2dp" For the first & the second CardView I can see an elevation, but it fails for the…
deveLost
  • 1,151
  • 2
  • 20
  • 47