最近のビデオをロードし、その中で負荷のビデオを達成するために、リモートビデオ機能に再従事することに成功ロードローカルレイアウト、関連情報へのアクセスを置き換える、日和見方法を見つけることができません。
まず、それぞれ、これらの3つの効果のそれぞれの子のレイアウトを書きます
top_remotetreate.xml、
top_attemptconnect.xml、
top_failcon.xmlは、
次のように、三つの主要なレイアウトのxmlが含まれています。
<含む
アンドロイド:ID = "@ + ID / inc_remotetreate"
アンドロイド:layout_width = "match_parent"
アンドロイド:layout_height = "240dp"
アンドロイド:layout_marginTop = "10dp"
アンドロイド:layout_marginRight = "10dp"
アンドロイド:layout_marginLeft = "10dp"
レイアウト= "@レイアウト/ top_remotetreate" />
<含む
アンドロイド:ID = "@ + ID / inc_attemptconnect"
アンドロイド:layout_width = "match_parent"
アンドロイド:layout_height = "240dp"
アンドロイド:layout_marginTop = "10dp"
アンドロイド:layout_marginRight = "10dp"
アンドロイド:layout_marginLeft = "10dp"
アンドロイド:可視性= "ゴーン"
レイアウト= "@レイアウト/ top_attemptconnect" />
<含ま
アンドロイド:IDを= "@ + ID / inc_failconnect"
アンドロイド:layout_width = "match_parent"
アンドロイド:layout_height = "240dp"
アンドロイド:layout_marginTop = "10DP"
アンドロイド:layout_marginRight = "10DP"
アンドロイド:layout_marginLeft = "10DP"
アンドロイド:可視性= "ゴーン"
レイアウト= "@レイアウト/ top_failcon" />
それは一時的なディスプレイであり、他の二つは、コントロールに(三つの状態の可視属性のAndroidを隠されている:目に見える(可視)、)目に見えない(見えない、隠れた(消えて)
最後に、対応するJavaファイル内のレイアウトオブジェクトを取得します。 、そのVisibilityプロパティを設定します。
民間のLinearLayoutのinc_remotetreate、inc_attemptconnect、inc_failconnect。
inc_remotetreate = view.findViewById(R.id.inc_remotetreate)。
inc_attemptconnect = view.findViewById(R.id.inc_attemptconnect)。
inc_failconnect = view.findViewById(R.id.inc_failconnect)。
inc_remotetreate.setVisibility(View.GONE)。
inc_attemptconnect.setVisibility(View.VISIBLE)。
inc_failconnect .setVisibility(View.GONE);
所望の効果を達成するには、ヨーヨーを達成しました!!!