How can I align an element to the right in the FrameLayout?

后端 未结 6 1425
挽巷
挽巷 2021-01-03 21:48

I have a FrameLayout which contains 2 views , the second is something like a Close Button (X) and i want to position it on the right.

I\'ve tried layout

6条回答
  •  情话喂你
    2021-01-03 22:35

    Just put your elements inside FrameLayout to the second RelativeLayout. And use android:layout_alignParentRight="true" for the element which you want to align right.

    
     
        
    
        
      
    
    

提交回复
热议问题