In the appcompat_v7 in layout resources, shows me this error:
Error: No resource found that matches the given name (at 'layout_marginTop' with value '@dimen/abc_action_bar_icon_vertical_padding').
This line code shows me an error are this (for ImageView
from abc_action_bar_home.xml):
android:layout_marginTop="@dimen/abc_action_bar_icon_vertical_padding"
android:layout_marginBottom="@dimen/abc_action_bar_icon_vertical_padding"
I found the solution by adding the word _material
, like this:
"@dimen/abc_action_bar_icon_vertical_padding_material"
I found the solution here.
The old action bar is now known as the app bar and is a kind of toolbar in Material Design that came with Android Lollipop. Many of the metrics have changed and thus so has the naming of many of the values in R.dimen.
So as you discovered
abc_action_bar_icon_vertical_padding
is now called
abc_action_bar_icon_vertical_padding_material
.
As an extra, here is a graphic from the Android docs that shows some of the new default metrics:
Note that these defaults can change based on the device and orientation. For example,
Default height:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With