在RelativeLayout中使用android:layout_centerInParent属性来对齐FrameLayout中的视图
示例代码:
在这个示例中,FrameLayout中包含一个TextView,并使用android:layout_gravity="center"属性将其置于屏幕中心。同时,在RelativeLayout中添加了另一个TextView,并使用android:layout_centerInParent="true"属性将其与FrameLayout中的TextView对齐。