2

FragmentActivityメイン app を表示する Mainがありますfragments。「背後」のメインフラグメントの上に開く特定のフラグメントが 1 つあります。アニメーションで約 90% しかスライドしません。私の問題はこれです:

まだ透けて見える「背後」の断片のわずか 10% で、それを操作できます。例えばListViewなのでスクロールできます。

ここでバックグラウンドフラグメントを「オフにする」または非アクティブにする方法はありますか?

4

2 に答える 2

7

Shashidhar Manchu answserに追加するだけです:追加:

Android:clickable="true" Android:background="#000"

例えば:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/LinearLayout1"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#000"
    android:orientation="vertical" 
    android:clickable="true">

<View
            android:id="@+id/sampleChild"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>

</LinearLayout>

背景はオプションですが、背景がないと背景のフラグメントが表示されます。

于 2014-06-05T15:16:34.077 に答える