2011-08-10 14 views
0
私はグループ内の特定の画像を非表示にする方法トラブルのフィギュアを抱えている

、私は現在一時停止したときにイメージを非表示にして、アルバムアートで再度表示できるようにするにはどうすればよいですか?アンドロイドXML

<RelativeLayout android:layout_width="88.0px" android:layout_height="95.0px" > 
    <ImageView android:layout_width="67.0px" android:layout_height="75.0px" android:src="@drawable/coverart" android:layout_marginLeft="16.0px" android:layout_marginTop="10.0px" android:scaleType="fitXY" /> 
    <ImageButton android:id="@id/albumArt" android:visibility="gone" android:layout_width="67.0px" android:layout_height="75.0px" android:layout_marginLeft="16.0px" android:layout_marginTop="10.0px" android:scaleType="fitXY" android:adjustViewBounds="true" /> 
    <ImageView android:layout_width="88.0px" android:layout_height="95.0px" android:src="@drawable/peel" android:scaleType="fitXY" /> 
</RelativeLayout> 

は今、これはアルバムアートを非表示にこのグループの設定を使用しますが、私はどのように把握することはできませんオーバーレイを隠す私がしようとするものはすべて、常にグループ全体を隠しています。実際のアルバムアートのようにグループ全体を隠して再生に戻す方法がなければならないことは分かっています。

ご協力いただきありがとうございます。

+0

使用でframeLayout ....より良いあなたは、静的な値を無視し... – Hanry

答えて

0

要素だけを隠す代わりにレイアウト全体を隠すようにしてみませんか?一時停止したときにレイアウトを非表示にし、必要なときに戻します。完全な操作を行うには

<RelativeLayout android:layout_width="88.0px" android:layout_height="95.0px" android:visibility="gone"> 
<ImageView android:layout_width="67.0px" android:layout_height="75.0px" android:src="@drawable/coverart" android:layout_marginLeft="16.0px" android:layout_marginTop="10.0px" android:scaleType="fitXY" /> 
<ImageButton android:id="@id/albumArt" android:layout_width="67.0px" android:layout_height="75.0px" android:layout_marginLeft="16.0px" android:layout_marginTop="10.0px" android:scaleType="fitXY" android:adjustViewBounds="true" /> 
<ImageView android:layout_width="88.0px" android:layout_height="95.0px" android:src="@drawable/peel" android:scaleType="fitXY" /> 

+0

私はそれを試してみましたが、全体のレイアウトは、隠されたままで、再生時には表示されません:(それはでした私が試した最初のこと –

+0

再生時に再び視界を「消えた」から「目に見える」に変えなければなりませんでしたか? –

+0

あなたはそれが何を意味するのか完全にはっきりしませんか?表示されている場合は、そうです。 –