目标是实现类似如图的效果,居中且向左偏移若干,居中且向右偏移若干
在eoe 提问后大神给出的方案是:
<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginRight="70dp" android:background="@drawable/red_circle" /> <ImageView android:layout_width="wrap_content" android:layout_height