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

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
  • 139
  • 1
  • 8
-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…
-2
votes
1 answer

React native elevation not looking good in tablet view but looking good in mobile view

React native elevation not looking good in tablet view but looking good in mobile view. I have given elevation as 5 for both mobile and tablet view for android. both the design shadow doesn't match. Is there a way i can achieve "shadowOffset" for…
-3
votes
1 answer

Android CardView inside RecyclerView - cardElevation cause unwanted margin & bottom shadow

In Android, I am using RecyclerView. For RecyclerView's item, I am using CardView as item's layout, with below xml layout:
1 2 3
13
14