0
我想在我的代碼中動態地定義下面的佈局(當前是一個xml文件)。如何在代碼而不是XML中動態執行此操作?
最終目標是有條件地在我的viewflipper中包含某些頁面。
謝謝!
<?xml version="1.0" encoding="utf-8"?>
<com.gtosoft.dash.MyViewFlipper
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/vFlipper"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!-- Page 01 -->
<include android:id="@+id/flipperPage01" layout="@layout/page01" />
<!-- Page 02 -->
<include android:id="@+id/flipperPage02" layout="@layout/page02" />
<!-- Page 03 -->
<include android:id="@+id/flipperPage03" layout="@layout/page03" />
</com.gtosoft.dash.MyViewFlipper>