1. Are you ready for the Galaxy S20? Here is everything we know so far!

Adding xml to java ViewFlipper

Discussion in 'Android Development' started by Roopa, Nov 27, 2009.

  1. Roopa

    Roopa Lurker
    Thread Starter

    Can please anyone suggest how to generate/write java code out of the below xml


    <?xml version="1.0" encoding="utf-8"?>
    <ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/flipper"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#00FF00">
    <TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:textColor="#000000"
    android:text="@string/hello_view_1"
    />

    </LinearLayout>

    <LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#FF0000">
    <TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:textColor="#000000"
    android:text="@string/hello_view_2"
    />
    </LinearLayout>


    <LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#00FF00">
    <TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:textColor="#000000"
    android:text="@string/hello_view_3"
    />
    </LinearLayout>

    </ViewFlipper>
     



    1. Download the Forums for Android™ app!


      Download

       
  2. neerajj50

    neerajj50 Lurker

    Hello Every body,
    I need to build App like BBC new Where once a news selected Add all the Classified news of gallery into viewflpper..................
    :thinking:
     
Loading...

Share This Page

Loading...