我想中心对齐我的厂景对另一视图2和视图2和VIEW1都是自定义尺寸。中心对齐查看关于另一种观点认为
View1
|------------------------|
| |
| |
| |---------| |
| | View2 | |
| |---------| |
| |
|------------------------|
注:视图2是在厂景的中间/中心和厂景不父,我怎么能做到这一点?
我尝试:
<!-- some xml of another parents -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ImageView
android:id="@+id/pin"
android:layout_width="50dp"
android:layout_height="35dp"
android:src="@drawable/image"
android:layout_centerInParent="true"/>
</RelativeLayout>
<!--- long xml --->
您已经尝试了什么?请粘贴代码 –
加我的榜样,我忘了你去那里我的朋友 –