B. Money
B. Money

Reputation: 931

Why is ViewFilpper not flipping webviews?

I'm a noob to android and i am trying to switch 4 views in a view flipper. My first view is a listview and it flips without any problems. However, none of my webviews are flipping. the viewflipper works fine with other child views, such as buttons and imageviews just not webviews. Any help resolving this is greatly appreciated.

  <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tab2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:orientation="vertical" >

<ViewFlipper
    android:id="@+id/viewFlipper1"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <ListView
        android:id="@+id/ListViewId"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:cacheColorHint="#00000000" >
    </ListView>

    <WebView
        android:id="@+id/webViewnews"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >
    </WebView>

    <WebView
        android:id="@+id/webViewcoinshows"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >
    </WebView>

    <WebView
        android:id="@+id/webViewyoutube"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >
    </WebView>
</ViewFlipper>

Upvotes: 0

Views: 247

Answers (1)

Samer
Samer

Reputation: 536

Instead of using ViewFlipper why don't you use ViewPager : android.support.v4.view.ViewPager it's easy to implement it and give you a better effect when flipping, and will work for sure, I've done it before. You can find the documentation here.

Upvotes: 1

Related Questions