How to lay out Views in RelativeLayout programmatically?

前端 未结 9 1674
心在旅途
心在旅途 2020-11-22 15:04

I\'m trying to achieve the following programmatically (rather than declaratively via XML):


   

        
9条回答
  •  粉色の甜心
    2020-11-22 15:42

    Just spent 4 hours with this problem. Finally realized that you must not use zero as view id. You would think that it is allowed as NO_ID == -1, but things tend to go haywire if you give it to your view...

提交回复
热议问题