Suppose you have a FrameLayout
containing 10 LinearLayouts
, where only one is visible per time.
Each LinearLayout
is a complex view, containing Button
, EditText
, TextView
, etc.
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/alice
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible">
<!-- complex stuff -->
</LinearLayout>
<!-- many more linear layouts... -->
<LinearLayout
android:id="@+id/juliett
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
<!-- last complex stuff -->
</LinearLayout>
</FrameLayout>
Thus:
- Changing the
LinearLayout
visibility, in order to show another item, would be a huge performance issue? - Given it is an issue, why using
ViewFlipper
does not slow down the app performance?