我有一个FrameLayout,底部有ScrollView和AdView横幅。
我认为有一种方法可以删除包含ScrollView和AdView的RelativeLayout,并保持当前的UI,但我无法确定如何做到这一点。
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg"
tools:context="">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/adView"
android:layout_alignParentTop="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- A LOT of stuff -->
</RelativeLayout>
</ScrollView>
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
ads:adSize="BANNER"
ads:adUnitId="" />
</RelativeLayout>
</FrameLayout>