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
1 answer

Android Recycler View with Inner Elevation

I'd like to do something like this in a recycle view, but I don't know how to proceed. In this recyclerview, there are 2 items (but can be more, it's dynamic), with no space between them, and elevation on the common background. I tried to set a…
Tanguy C
  • 183
  • 1
  • 6
0
votes
0 answers

Why are the views not being elevated using android:elevation

I am trying to use the android:elevation attribute but it has no effect on the views. What I am doing wrong? Here is the xml code with one FrameLayout and one Button but none of them is showing any shadow.
Vaibhav Maheshwari
  • 384
  • 1
  • 4
  • 18
0
votes
1 answer

tablayout shadow/elevation for pre-lollipop

I have a tablayout inside an AppBarLayout. I am trying to add a shadow view below the tabbarlayout for pre-lollipop versions. The shadow view shows up, however when I scroll down, the shadow view doesn't seem transparent. It look like as though…
0
votes
1 answer
0
votes
1 answer

Elevation/Shadow to a dialog for pre-21 or pre-lollipop

There are posts related to elevation for views for pre-lollipop devices. I applied techniques that could be applied to the dialog but I still can not have elevation/shadow to my dialog. I tried this in the style but it did not work.
cgr
  • 4,578
  • 2
  • 28
  • 52
0
votes
0 answers

Drop shadow on android popup menu

I'm trying to get a drop shadow on a popup menu which is defined as given below -
daft300punk
  • 169
  • 3
  • 16
0
votes
1 answer

Using app:elevation in code - Android

I'm trying to set the elevation of a AppBarLayout via code. When I do app:elevation in the XML it works without a hitch, however when I do appBarLayout.setElevation(0); It doesn't work. My assumption is its calling the equivalent of…
spogebob92
  • 1,474
  • 4
  • 23
  • 32
0
votes
0 answers

How to have an Elevated Button with Color background for Prelollipop?

As posted in https://stackoverflow.com/a/30931750, for Prelollipop, we could have shadow (elevation) for our button by setting the following. android:background="@android:drawable/dialog_holo_light_frame" However, if I need to add another color to…
Elye
  • 53,639
  • 54
  • 212
  • 474
0
votes
1 answer

Too much shadow on top when using elevation attribute

My designer says that the white area on this image has too much shadow on the top. This is my code:
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
  • 545
  • 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,134
  • 1
  • 13
  • 27
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
  • 20,677
  • 15
  • 82
  • 117
1 2 3
13
14