1

RelativeLayoutヘッダー ( )、コンテンツ ( FrameLayout)、およびフッター (RelativeLayout) がすべて内部にあるこのアクティビティ レイアウトがあります(LinearLayout下の添付のスクリーンショットを参照してください)。

ここに画像の説明を入力

問題は、コンテンツ (実際にはFragment) が十分に大きい場合に、フッターによって切り取られることがあることです (たとえば、添付の画像では、一部のボタンが切り取られていることがわかります)。フッター レイアウトの背景を透明に設定して (xml およびコード経由でも)、FrameLayout.bringToFront()メソッドを呼び出してみましたが、何も機能しないようです。

以下に貼り付けたのは、私が使用しているレイアウト xml です。

<?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>
4

0 に答える 0