我在我的xml佈局文件中添加了自定義視圖,即FancyCoverFlow。我想用視頻視圖在相同位置用程序代替這個視圖。意味着其他視圖的位置不應該改變。它應該顯示爲它在佈局文件中的位置。但只有我的自定義視圖應該替換爲具有FancyCoverFlow相同位置座標的視頻視圖。在android中動態替換另一個視圖的視圖?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/layout"
xmlns:fcf="http://schemas.android.com/apk/res-auto"
android:background="@drawable/bga"
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Large Text"
android:textColor="#fff"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Medium Text"
android:textColor="#fff"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Medium Text"
android:textColor="#fff"
android:textAppearance="?android:attr/textAppearanceMedium" />
<imageslideractivty.FancyCoverFlow
android:id="@+id/fancyCoverFlow"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginTop="10dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
fcf:maxRotation="45"
fcf:unselectedAlpha="0.3"
fcf:unselectedSaturation="0.0"
fcf:unselectedScale="0.4"
fcf:scaleDownGravity="0.5"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<SeekBar
android:id="@+id/slider"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_centerHorizontal="true"
android:progressDrawable="@null"
android:thumb="@drawable/middle"
android:layout_marginBottom="20dp" />
</LinearLayout>
</LinearLayout>