简体   繁体   中英

constraint layout coordinator layout

I have a ConstraintLayout as my main layout. Inside it, I have a CoordinatorLayout. I want to know if ever will I be able to constrain the views I put inside the CoordinatorLayout.

Thanks in advance

No. You can only constrain views that are direct children of the ConstraintLayout .

It isn't specifically CoordinatorLayout that makes you unable to do this. Any view you put inside a ConstraintLayout (other than another ConstraintLayout) won't be able to apply constraints.

Any app:layout_constraint... attribute you apply to any view that doesn't have a ConstraintLayout as its immediate parent will simply be ignored.

you must put inside any layout on CoordinatorLayout like LinearLayout or ConstraintLayout.

or make CoordinatorLayout main and put inside layout.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM