android - TextureView Align Parent Right Programmatically -


i have customview extending textureview. want customview align_parent_right.

my method inside customview has following code:

relativelayout.layoutparams layoutparams = new relativelayout.layoutparams(); layoutparams.addrule(relativelayout.align_parent_right); setlayoutparams(layoutparams); 

however, customeview still aligned left , not right. how can change align right?

add way

relativelayout.layoutparams layoutparams = new relativelayout.layoutparams(); layoutparams.addrule(relativelayout.align_parent_right); layoutparams.addrule(relativelayout.left_of, r.id.leftviewidhere); setlayoutparams(layoutparams); 

Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -