私は自分のアプリアクティビティの次のxml構造を持っています。ここで、idlayer1Frontを使用してプログラムで子RelativeLayoutを削除したいと思います。コードでそれをどのように行うのでしょうか。非表示にしたくないのですが、アプリのメモリの問題のために削除する必要があります。また、どういうわけかそれを削除した後、私のアプリは現在のものよりも軽くて速くなりますか?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/layer1Front" >
</RelativeLayout>
<HorizontalScrollView android:layout_width="wrap_content"
android:layout_height="wrap_content">
<FrameLayout android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:id="@+id/parallaxLayers"
android:visibility="gone">
</FrameLayout>
</HorizontalScrollView>
<RelativeLayout android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/frontView">
</RelativeLayout>
</RelativeLayout>