Wednesday, October 21, 2015

ANDROID - align linearlayout each one behind other programmatically

http://stackoverflow.com/questions/12108370/how-to-setcontentview-in-a-fragment

The method setContent(relativeLayout) on Activity in case of Fragments need to be replaced with return this relatiVeLayout from onCreateView or do from onViewCreated this:

RelativeLayout rootContainer = (RelativeLayout)mainActivity.findViewById(R.id.rootContainer);
rootContainer.addView(rl);

No comments: