I’ve a relative layout in xml. I have to add some textview programatically to view, now I’ve to align a textview as alignparentright.I can do this only using .addRule() but I don’t want to create a relative layout programmatically and then use this layer object.addRule().Instead I’ve already added an id to relativeview in xml.
How do i use addRule() in this xml relative layer.I got the id in activity using findviewbyid and assigned to type textview but when i do textview.addRule(), this is not there for this relative layout type variable.
Simple, go like this
Any problem plz ask.