Layout Problem Listview in Scrollview

by guruk » Fri, 13 Mar 2009 01:42:32 GMT


Sponsored Links
 Hi,
I have a listview, there in the top is a gallery and two lines of
text, than follows my listview.
The problem ist, when i say height in listview = fill_parent or
wrap_content and i have lets say 30 items in the listview,
only the first List Item is shown (it does not fill the screen, or
show all items.) Finaly I would like the gallery in the top
, two lines textview and than the full listview. When I scroll down,
everything (incl. gallery...) has to scroll up.

Its just a trick to see if it works, that I had made listview
heigth=5300px, but for sure I would like that its auto heigh:)
And also something strange. As it is like now and the design pops up.
It does not start at the TOP (with the gallery)
instead it starts where the listview starts?!?!

Here is my layout:

<?xml version="1.0" encoding="utf-8"?>
<ScrollView
android:id="@+id/widget28"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android=" http://schemas.android.com/apk/res/android" ;
<LinearLayout
android:id="@+id/widget29"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
<Gallery android:id="@+id/gallery"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="bottom"
/>
<TextView
    android:id="@+id/gallery_underline1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
android:gravity="center_horizontal"
           android:textSize="16sp"
                   android:textStyle="bold"
                   android:text="Picture Info helloo"
    />
    <TextView
    android:id="@+id/gallery_underline2"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Seconde Line of Picture"
android:gravity="center_horizontal"
    />
<ListView
       android:id="@+id/shoppinglist"
    android:layout_width="fill_parent"
    android:layout_height="5366px" />
</LinearLayout>

</ScrollView>


thanks for help
chris

--~--~---------~--~----~------------~-------~--~----~



Layout Problem Listview in Scrollview

by guruk » Fri, 13 Mar 2009 01:42:42 GMT


 Hi, (sorry if this mail is twice, but i dont see my first posting
online:)

I have a Scrollview with an Gallery at the top, bellow two lines
textview and a Listview)

1. Problem.
Listview with height=Fill_parent or wrap_content does not work (it
only shows me a tiny part of the listview)
So i did just dummy Listview Height=5300, to see how it have to look
like.
What to do, that the Listview comes automaticly full filled and shown
with all items?
Finaly when I scroll the page down, the Gallery, textview and Listview
should scroll up, all.
Thats why I placed ALL in a Scrollview.

2. As it is now (with my dummy heigth 5300), when the GUI pops up, it
does not start at the top with the
gallery, instead it starts at the Listview ???!?!

Here is my Layout xml.

<?xml version="1.0" encoding="utf-8"?>
<ScrollView
android:id="@+id/widget28"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android=" http://schemas.android.com/apk/res/android" ;
<LinearLayout
android:id="@+id/widget29"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
<Gallery android:id="@+id/gallery"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="bottom"
/>
<TextView
    android:id="@+id/gallery_underline1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
android:gravity="center_horizontal"
           android:textSize="16sp"
                   android:textStyle="bold"
                   android:text="Picture Info helloo"
    />
    <TextView
    android:id="@+id/gallery_underline2"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Seconde Line of Picture"
android:gravity="center_horizontal"
    />
<ListView
       android:id="@+id/shoppinglist"
    android:layout_width="fill_parent"
    android:layout_height="5366px" />
</LinearLayout>

</ScrollView>

Thanks for Help

Chris

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Layout Problem Listview in Scrollview

by guruk » Fri, 13 Mar 2009 01:47:17 GMT


 Hi, (sorry if this mail is twice, but i dont see my first posting
online:)

I have a Scrollview with an Gallery at the top, bellow two lines
textview and a Listview)

1. Problem.
Listview with height=Fill_parent or wrap_content does not work (it
only shows me a tiny part of the listview)
So i did just dummy Listview Height=5300, to see how it have to look
like.
What to do, that the Listview comes automaticly full filled and shown
with all items?
Finaly when I scroll the page down, the Gallery, textview and Listview
should scroll up, all.
Thats why I placed ALL in a Scrollview.

2. As it is now (with my dummy heigth 5300), when the GUI pops up, it
does not start at the top with the
gallery, instead it starts at the Listview ???!?!

Here is my Layout xml.

<?xml version="1.0" encoding="utf-8"?>
<ScrollView
android:id="@+id/widget28"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android=" http://schemas.android.com/apk/res/android" ;
<LinearLayout
android:id="@+id/widget29"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
<Gallery android:id="@+id/gallery"
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       android:gravity="bottom"
/>
<TextView
   android:id="@+id/gallery_underline1"
   android:layout_width="fill_parent"
   android:layout_height="wrap_content"
android:gravity="center_horizontal"
          android:textSize="16sp"
                  android:textStyle="bold"
                  android:text="Picture Info helloo"
   />
   <TextView
   android:id="@+id/gallery_underline2"
   android:layout_width="fill_parent"
   android:layout_height="wrap_content"
   android:text="Seconde Line of Picture"
android:gravity="center_horizontal"
   />
<ListView
      android:id="@+id/shoppinglist"
   android:layout_width="fill_parent"
   android:layout_height="5366px" />
</LinearLayout>

</ScrollView>

Thanks for Help

Chris

--~--~---------~--~----~------------~-------~--~----~



Layout Problem Listview in Scrollview

by Romain Guy » Fri, 13 Mar 2009 01:49:00 GMT


 Do NOT put a ListView inside a ScrollView. ListView already handles
scrolling, you're only going to run into trouble.






-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~



Layout Problem Listview in Scrollview

by guruk » Fri, 13 Mar 2009 01:51:39 GMT


 hanks..

just look on youtube app, they do it the same.

but i got also they limit there listview at the first page :) so i did
not the same.

thanks
chris


On Mar 12, 7:48pm, Romain Guy <romain...@google.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



Layout Problem Listview in Scrollview

by Romain Guy » Fri, 13 Mar 2009 01:53:17 GMT


 ouTube does not put a ListView inside a ScrollView. They simply use a
Gallery as a header view inside a ListView.

On Thu, Mar 12, 2009 at 10:51 AM, guruk <ilovesi...@gmail.com> wrote:



--
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support. All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~



Layout Problem Listview in Scrollview

by guruk » Fri, 13 Mar 2009 02:06:19 GMT


 h thanks... that could be a solution.. yes.. great
but how to do this for example in my case?

thanks for help.. i love android but i am so newbie (usualy php
coder).. so thanks twice for your patient :)

On Mar 12, 7:53pm, Romain Guy <romain...@google.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. How to forward TCP ports of connected two phones ?

I'd like to forward TCP ports of connected two phones to PC But ADB
server is killed whenever 2nd TCP forward command in entered.
Hot can I forward TCP ports of connected two phones and use them at
same time ?

I did like below.

adb -s <serial of phone #1> shell service call window 1 i32 4939
adb -s <serial of phone #1> forward tcp:4939 tcp:4939
adb -s <serial of phone #2> shell service call window 1 i32 4939
adb -s <serial of phone #2> forward tcp:4941 tcp:4939

-- 

2. Handling Strange Phones

For some odd reason, this phone "SKY IM-A630K" wants the
READ_PHONE_STATE permission just to send an SMS message. So how would
you guys handle this? I guess I should wrap sendTextMessage with a try
catch and somehow notify the user that this failed because their phone
is buggy. Is that it?

package_name=com.emergency.button, package_version=1.2,
phone_model=SKY IM-A630K, android_version=2.1-update1,

stacktrace=
java.lang.SecurityException: Requires READ_PHONE_STATE: Neither user
10089 nor current process has android.permission.READ_PHONE_STATE.
       at android.os.Parcel.readException(Parcel.java:1218)
       at android.os.Parcel.readException(Parcel.java:1206)
       at com.android.internal.telephony.IPhoneSubInfo$Stub
$Proxy.getLine1Number(IPhoneSubInfo.java:223)
       at
android.telephony.TelephonyManager.getLine1Number(TelephonyManager.java:
764)
       at android.telephony.SmsManager.sendTextMessage(SmsManager.java:
129)
       at android.telephony.SmsManager.sendTextMessage(SmsManager.java:
108)
       at com.emergency.button.SMSSender.safeSendSMS(SMSSender.java:
91)
       at com.emergency.button.EmergencyActivity
$EmergencyThread.sendSMS(EmergencyActivity.java:294)
       at com.emergency.button.EmergencyActivity
$EmergencyThread.sendMessages(EmergencyActivity.java:386)
       at com.emergency.button.EmergencyActivity
$EmergencyThread.run(EmergencyActivity.java:266)

If you want to see how exactly sendTextMessage was invoked:
http://code.google.com/p/emergencybutton/source/browse/trunk/src/com/emergency/button/SMSSender.java?r=24

Any help would be appreciated,


--Yuv

-- 

3. Fwd: how to root this epad?

4. creating a dialog using an listview

5. Access to linux root directories

6. How to get installer file name programatically?

7. Android calendar control