Possible to display a string or button on top a listview?

by Mystique » Sun, 12 Sep 2010 14:42:44 GMT


Sponsored Links
 Hi, I can seems to get it write.
What is wrong with my layout?

---code---
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=" http://schemas.android.com/apk/res/ 
android"
   android:id="@+id/main"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent">
   <TextView
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:text="@string/test" />
   <!-- Note built-in ids for 'list' and 'empty' -->
   <ListView
      android:id="@android:id/list"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"/>
   <TextView
      android:id="@android:id/empty"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="@string/empty" />
</LinearLayout>

--



Possible to display a string or button on top a listview?

by Dianne Hackborn » Sun, 12 Sep 2010 14:56:14 GMT


 You can't use wrap_content with a list view, because that will cause it to
expand to whatever size its full contents are.  If you want the list view to
expand to fill all space except the text views above and below, use
android:layout_height="0px" and android:layout_weight="1" on it.




>


Sponsored Links


Possible to display a string or button on top a listview?

by Mystique » Sun, 12 Sep 2010 15:31:11 GMT


 Hi, thanks for the advice.
Not sure what is wrong, I try putting android:layout_height="0px" and
android:layout_weight="1" but it still doesn't appear.




> >



Possible to display a string or button on top a listview?

by Dianne Hackborn » Sun, 12 Sep 2010 15:51:49 GMT


 Try using hierarchyviewer to see what is going on with your layout.






> > >



Other Threads

1. How to add multiple frame buffer support in Android?

Hi all,

We are looking for one serious change in the Android's SurfaceFlinger,
as of now Android supports only one display thorugh framebuffer 0 (/
dev/graphics/fb0), but we want to add support for multiple frame
buffer (fb0/fb1/fb2). After looking into the surfaceflinger and
related module we came to know that we need to change the
surfaceflinger, following are some of the changes we have found to be
done (although I am not quite sure about these)
1: From SurfaceFlinger::readyToRun() we have to create secondary
displays and initialize them.
2: Make size of mGraphicsPlane (array of GraphicsPlane) as 2 (or n=no
of display)
3: From DisplayHardware::init while creating the EGLDisplayHardware
pass the dpy value and open the corresponding fb (0 or 1) depending on
dpy value.


But what I am not getting is that does we need to change the
initialization of EGLDisplay depending on this dpy values. Basically
what changes related with egl we need to do if we want to initialize
multiple displays.

In surfaceFlinger.cpp in many of the APIs (such as threadLoop,
handlePageFlip), the reference of HardwareDisplay is obtained from
graphicsPlane(0), so what if we have mulitple graphics plane?

If any body have worked or have any idea about this please share ...
or correct me if I am wrong somewhere..

Thanks
Pankaj

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. How are SMS and MMS save on android phone

THank you.

Sms has a column PERSON_ID which saves the person ID of the sender,
but why there is such equivalent column in MMS table?

        /**
         * The person ID of the sender
         * <P>Type: INTEGER (long)</P>
         */
        public static final String PERSON_ID = "person";







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

3. how to avoid showing the temp files?

4. Emulator: 1.6 SDK release Troubleshooting Proxy

5. Playing a video file from resource.

6. Global search always shows "More results... XXX (n)" for 3rd party application?

7. Global search always shows "More results... XXX (n)" for 3rd party application?