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

197 questions
0
votes
1 answer

How to elevate collapsing toolbar above main layout like the floating button?

How can I set my collapsing toolbar above the activity layout ? I want to "elevate" it like the floating button. I have tried to set an elevation on the appbarlayout, even on the collapsing toolbar but it doesn't work. How can I do this ? Thanks
0
votes
2 answers

Android Studio - How can I get Overflow as in CSS

I have a project where I have a padding of 16dp on the parent LinearLayout. In this LinearLayout I have a cardview which has an elevation. The problem is here that the elevation won't appear outside the parent div. In CSS you have…
Joestoen
  • 485
  • 1
  • 5
  • 14
0
votes
1 answer

Why toolbar has no elevation?

I've been trying to use the new design library and I have a toolbar instead of deprecated action bar. The problem is that the toolbar has no elevation. I added elevation everywhere in layouts, in code, I even added AppBarLayout. Nothing works. I'm…
0
votes
1 answer

Elevation not working on android seekbar

It seems the elevation is ignored by seekbar? Any way to get it running? I already changed the background of the embedding view to a solid color, did not help.
Daniel Brown
  • 1,060
  • 1
  • 10
  • 23
0
votes
1 answer

Toolbar elevation is not at the bottom

I'm trying to create an extended toolbar, something like: My activity…
0
votes
0 answers

Elevation on Android 4 for non-CardView

I quite struggle with how to design the following picture in Android 4 and 5: I have read (no reference sorry) that elevation is not implemented for Android 4 not even with appCompat library. I know that CardViews have the elevation even for…
Amio.io
  • 17,083
  • 11
  • 66
  • 100
0
votes
2 answers

Setting action bar elevation programmatically throws NullPointer exception

After setting the elevation of the action bar programmatically, the code becomes highlighted in yellow and the warning below gets thrown. What can be done to remove this warning? getSupportActionBar().setElevation(0); Warning Method invocation…
0
votes
2 answers

Elevation/shadows for layouts in pre-lollipop

Am trying to add elevation to my layouts in styles but the android:elevation is only available for lollipop not pre lollipop. This is my layout in v21. My styles for v14 However, I'm replacing…
0
votes
1 answer

get rounded elevation-shadow on FloatingActionButton (v21)

I am pretty new to android development and yes I have tried a lot to fix this before asking. So I am trying to implement the FloatingActionButton (only on v21 for simplicity) and I just can't get the elevation-shadow to be rounded. Here are the…
user4566204
-1
votes
2 answers

How to design a button with elevation effect

I am currently learning android and wanted to make a button that has elevation effect in it. To be more precise I want elevation effect like the image below. Can anyone help me on how to make this type of button in android studio?
REX
  • 13
  • 1
  • 2
-1
votes
2 answers

Toolbar shadow not showing

My app has a fragment with tablayout and it shows a shadow with elevation:
-1
votes
2 answers

What is the most efficient way to accomplish two panel layout with elevation?

So, I've tried different variations using ConstraintLayout to keep it flat as possible but the code below was the best I could accomplish. Plus on top of that I'll need to add a ScrollView as a layout parent. I'd appreciate if someone can help me…
1 2 3
13
14