Hi all,
 what I am doing is just dragging items from grid view and dropping them to
gallery view one by one.
All is working fine in this case.

But now, I need that initially, when my gallery is empty, *I want to show
some text in place of that gallery.
For that purpose, I am using viewFlipper in my xml, containing gallery and
textview. TextView should appear only in the case Gallery is empty.

In that case, after dropping one image from gridview to gallery, I am
unable to drop any other image onto gallery.*
I even tried FrameLayout in place of ViewFlipper, but even that didn't work
for me.

Here are both the layouts - before using ViewFlipper, and after using
viewFlipper, as follows:

*This is the initial layout without ViewFlipper*

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android";
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical">


    <com.views.DraggableView
         android:id="@+id/draggingView1"
         android:layout_width="150dip"
         android:layout_height="150dip"
         android:src="@drawable/ic_launcher"

         android:scaleType="fitXY">
        </com.views.DraggableView>


    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        android:weightSum="10">


        <com.views.GridViewDragDrop
            android:id="@+id/gridViewDragDrop"
            android:layout_width="fill_parent"
            android:layout_height="0dp"
            android:layout_weight="7"
            android:numColumns="3"
            >
        </com.views.GridViewDragDrop>
         <LinearLayout android:layout_width="fill_parent"
             android:layout_height="1dp"
             android:background="#ffffff"/>

        <LinearLayout xmlns:android="
http://schemas.android.com/apk/res/android";
            android:layout_width="fill_parent"
            android:orientation="horizontal"
            android:weightSum="10"
            android:layout_height="0dp"
            android:layout_weight="2"
            >

            <ImageView
                android:id="@+id/imgArrowLeft_sld"
                android:layout_weight="1"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:src="@drawable/arrow_left" />


            <com.views.GallaryDragDrop
                android:id="@+id/gallery"

                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:spacing=".1px"
                android:layout_weight="8"
               />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"/>


            <ImageView
                android:id="@+id/imgArrowRight_sld"
                android:layout_weight="1"
                android:layout_width="0dp"
               android:layout_gravity="center"
                android:layout_height="wrap_content"
                android:src="@drawable/arrow_right" />
        </LinearLayout>





    </LinearLayout>

</RelativeLayout>


*This is the layout using ViewFlipper*

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android";
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical">


    <com.views.DraggableView
         android:id="@+id/draggingView1"
         android:layout_width="150dip"
         android:layout_height="150dip"
         android:src="@drawable/ic_launcher"

         android:scaleType="fitXY">
        </com.views.DraggableView>


    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        android:weightSum="10">


        <com.views.GridViewDragDrop
            android:id="@+id/gridViewDragDrop"
            android:layout_width="fill_parent"
            android:layout_height="0dp"
            android:layout_weight="7"
            android:numColumns="3"
            >
        </com.views.GridViewDragDrop>
         <LinearLayout android:layout_width="fill_parent"
             android:layout_height="1dp"
             android:background="#ffffff"/>

        <LinearLayout xmlns:android="
http://schemas.android.com/apk/res/android";
            android:layout_width="fill_parent"
            android:orientation="horizontal"
            android:weightSum="10"
            android:layout_height="0dp"
            android:layout_weight="2"
            >

            <ImageView
                android:id="@+id/imgArrowLeft_sld"
                android:layout_weight="1"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:src="@drawable/arrow_left" />

            * <ViewFlipper
                 android:id="@+id/vf"
                  android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                android:layout_weight="8"> *

            <com.views.GallaryDragDrop
                android:id="@+id/gallery"
               android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:spacing=".1px"

               />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"/>

            *</ViewFlipper> *

 <ImageView
                android:id="@+id/imgArrowRight_sld"
                android:layout_weight="1"
                android:layout_width="0dp"
               android:layout_gravity="center"
                android:layout_height="wrap_content"
                android:src="@drawable/arrow_right" />
        </LinearLayout>



    </LinearLayout>

</RelativeLayout>


I am just not getting why all this happening with a slight change in layout
file.
Can anyone plz tell why all this happening, or any suggestion to overcome
this problem?


With Regards,
      NSR.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to