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

How can set a view over another view?

I have a fragment.I go to another fragment when I click on a textview. but when second fragment show a button(btn_fragmentAccount_register") of first fragment is on my fragment. in my second fragment is a recyclerview that show the products.but a…
john
  • 345
  • 1
  • 4
  • 20
0
votes
3 answers

Added fragment shows under elevated views in fragment below?

So I was having an issue adding my fragment for dialog to my activity. The fragment is a regular fragment added using supportFragmentManager.beginTransaction().add(...).commit() The problem is the fragment is added to the activity, but the…
Darryl Johnson
  • 646
  • 6
  • 14
0
votes
4 answers

Android CardView transparent background

I want to create a cardview where the cards have simple one photo and an upper right bottom to remove them. So in order to the bottom be completelly visible i need to make the card bigger than the photo, but i dont want to show it. So i try to set…
0
votes
1 answer

How to add Image above ImageButton when It has elevation

I have an interesting problem, I have a ImageButton(without elevation) and I put an image above ImageButton. And it's looks like; But if I set elevation to the ImageButton(cd image) the green circle going to ImageButton's behind. Image with…
tpbafk
  • 501
  • 5
  • 26
0
votes
1 answer

cardview shadow elevation animation in recyclerview

I want cardview elevation animation just like Google is doing in "PlayGames" animation. Here is a sample gif of animation. Can anyone guide me how to do it or refer any library. sample gif animation Thanks
Hitesh Bisht
  • 486
  • 1
  • 6
  • 11
0
votes
2 answers

What's wrong with this layout that's causing the elevation shadow not to appear?

I'm trying to use Android Elevation to achieve the 'shadow' look for a view. The following is the layout xml:
0
votes
2 answers

Constraint Layout with transparency and elevation

I have 10 TextViews inside 1 Constraint Layout. What i would like to achieve is to have the Constraint Layout have some elevation to make it seem like all 10 textviews are basically above my background. But i would like to keep the background of my…
0
votes
2 answers

Android Widget Shadow which supports from API 16

I want to have shadow in Android widget like button, edittext, searchview or anything. I have no idea about android elevation. I think it only supports from API 23. If there is any proper solution then please provide. here is my demo widget. I need…
0
votes
1 answer

Android Toolbar no Elevation

My Main layout has a CoordinatorLayout, which has inside an AppBarLayout, CollapsingToolbarLayout, Toolbar, and a TabLayout. However, The toolbar doesn't show a shadow. This is my layout:
0
votes
2 answers

Handle both NavigationView and page content

My NavigationView is displayed behind the page content. So I tried to use bringToFronton my NavigationView : the page content goes behind the NavigationView, BUT becomes unclickable/unscrollable (page content is a recyclerView with multiple…
0
votes
1 answer

My Android app is showing bounds of TextViews but the actual TextViews aren't visible, what should I do?

This is the code that I have used in my Android app to display certain info related to some person's BMI. Few minutes ago, the code was working and everything was perfect but since I have made some changes that I don't remember specifically, the…
0
votes
0 answers

How to get point's elevation ? ( without internet )

How to get point's elevation ( without internet) ? I have coordinates of that point and need to calculate its elevation in offline mode. I am using GoogleMaps ( caching it and using it offline ).
user5583732
0
votes
1 answer

How to find original toolbar shadow in Android SDK?

I am using a toolbar with an elevation of 4dp. The shadow below the toolbar isn't generated on devices older than v21. I can, of course, approximate the shadow with custom drawable but where is the exact code or drawable (XML or 9-patch) in android…
Mehmed
  • 2,880
  • 4
  • 41
  • 62
0
votes
1 answer

Unwanted card shadow on android 4.2.2

I implemented a LisView that has nested card views with a custom ImageView for the shadow. Here's the layout :
Ion Farima
  • 309
  • 1
  • 4
  • 12
0
votes
1 answer

Programmatically added elevation is not showing on Lollipop or Marshmallow devices

I am trying to add elevation to a LinearLayout (in a fragment). On my device with Android Nougat everything is fine but on Marshmellow or Lollipop there are no shadows at all. What could be the problem? LinearLayout ll = (LinearLayout)…