java - How to Add Rules to align views inside Cardview in Android -


i have cardview inside have several views want align 1 below another. relative layout use following

layoutparams.addrule(relativelayout.below, idofanotherview); 

however cannot find addrule() method cardview, how achieve this?

as documentation of cardview states, component inherits framelayout. normal addrule() method unrecognized.

if need use relativelayout position subviews suggest wrap subviews one.

this post gives exemple of how achieve need

good luck!


Comments