material-components / material-components-android-codelabs

Codelabs for Material Components for Android (MDC-Android)
Apache License 2.0
220 stars 160 forks source link

MDC-101>Step 4> Issue id: ObsoleteLayoutParam #51

Open cgokul-com opened 4 years ago

cgokul-com commented 4 years ago

Noob Alert: android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"

When adding this code to the MaterialButton, i get the following. Screenshot 2020-01-28 at 12 56 39 AM

Not sure what I'm doing wrong here. Ofcourse, I'm able to see the output properly. But I want to understand what is obsolete here. Is it a mistake from my side?

vishal-nagarajan commented 4 years ago

image So I have typed the same line inside RelativeLayout and ..MaterialButton The code below is a param of RelativeLayout which is the parent layout for material button.Where as it is not a param for LinearLayout which is the parent layout for Relativelayout. android:layout_alignParentEnd="true" android:layout_alignParentRight="true" I hope this gives you some understanding.