Java 将FrameLayout的内容放在前面
我有这个活动布局,其中我有一个页眉相对布局、内容框架布局和一个页脚相对布局,所有这些都在一个线性布局中。请参阅下面附带的屏幕截图: 问题是,有时当内容(实际上是一个片段)足够大时,它会被页脚剪掉,例如,在附加的图像中,可以看到一些按钮被剪掉。我曾尝试通过xml和代码将页脚布局的背景设置为透明,调用FrameLayout.bringToFront方法,但似乎没有任何效果 下面粘贴的是我正在使用的布局xml:Java 将FrameLayout的内容放在前面,java,android,android-layout,Java,Android,Android Layout,我有这个活动布局,其中我有一个页眉相对布局、内容框架布局和一个页脚相对布局,所有这些都在一个线性布局中。请参阅下面附带的屏幕截图: 问题是,有时当内容(实际上是一个片段)足够大时,它会被页脚剪掉,例如,在附加的图像中,可以看到一些按钮被剪掉。我曾尝试通过xml和代码将页脚布局的背景设置为透明,调用FrameLayout.bringToFront方法,但似乎没有任何效果 下面粘贴的是我正在使用的布局xml: <?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/layoutMain"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000"
android:orientation="vertical"
tools:context=".BatwaSelectLanguage" >
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layoutHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="top" >
<ImageView
android:id="@+id/imBatwa"
android:layout_width="209dp"
android:layout_height="48dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="30dp"
android:layout_marginTop="20dp"
android:src="@drawable/batwa" />
<Spinner
android:id="@+id/spLang"
android:layout_width="140dp"
android:layout_height="60dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="30dp"
android:layout_marginTop="20dp"
android:background="#000000"
android:prompt="@string/english" />
<TextView
android:id="@+id/tvSelectLanguage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="20dp"
android:layout_marginTop="20dp"
android:layout_toLeftOf="@+id/spLang"
android:drawablePadding="30dp"
android:drawableRight="@drawable/line"
android:gravity="center"
android:text="@string/select_your_language"
android:textColor="@color/tvWhite"
android:textSize="@dimen/tvSizeSelectLang" />
</RelativeLayout>
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" >
</FrameLayout>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layoutFooter"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="bottom" >
<ImageView
android:id="@+id/imNFC"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginBottom="0dp"
android:layout_marginLeft="30dp"
android:contentDescription="@string/nfcimg"
android:src="@drawable/nfc" />
<ImageView
android:id="@+id/imNadra"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginBottom="00dp"
android:layout_marginRight="10dp"
android:contentDescription="@string/nadra"
android:src="@drawable/nadralogo" />
</RelativeLayout>
</LinearLayout>