4

I have a programmatically added collapsingToolbarLayout. For some reason, I do not see the elevation, either in its collapsed or expanded state. I've tried the following to no avail:

Resources r = getResources();
AppBarLayout appBarLayout = (AppBarLayout)collapsingToolbarLayout.getParent();

/* none of these work */
ViewCompat.setElevation(collapsingToolbarLayout,r.getDimension(R.dimen.toolbar_elevation));
ViewCompat.setElevation(appBarLayout, r.getDimension(R.dimen.toolbar_elevation));
ViewCompat.setElevation(getPrimaryToolbar(), r.getDimension(R.dimen.toolbar_elevation));

Would there be a reason for this?

VIN
  • 6,385
  • 7
  • 38
  • 77

0 Answers0