Adam,

I just did a quick test to confirm - it does work. Here is my layout:

<?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="150dp"
    android:paddingRight="?android:attr/scrollbarSize">

<include layout="@layout/blah_blah_merge"/>

<ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
*        android:layout_alignParentBottom="true"*
        android:src="@drawable/icon_1"/>

</RelativeLayout>

For alignParentBottom to work, RelativeLayout needs to have some extra height, that's why I put height=150dp in the snippet above.

PS - ah, here it is. I just tried fill_parent for height, and it stopped working, and list item height shrunk to same size as it would be with height=wrap_content.

Using fill_parent for list item height is meaningless anyway, that would mean that you want your list item to be as tall as the list view - so only one list item per list.

Use wrap_content, and make sure there is something in the layout that makes it sufficiently tall (like an image or something).

-- Kostya

05.01.2011 12:52, Serdel пишет:
I'm putting fill_parent in the height of relative layout.

On 5 Sty, 10:18, Kostya Vasilyev<kmans...@gmail.com>  wrote:
Does your RelativeLayout have sufficient height for align-bottom or
align-vcenter to actually do something?

-- Kostya

05.01.2011 12:06, Serdel пишет:



Hi,
I am using RelativeLayout to arrange the look in my ListView items. I
had passed the ViewGroup parent to the inflater as advised:
public View newView(Context context, Cursor c, ViewGroup parent) {
            View v = mInflater.inflate(R.layout.myidsrow, parent, false);
//.....
}
The problem is that 'horizontal' attributes like:
layout_alignParentRight/Left are working OK, But the 'vertical' ones
don't work at all. I wanted to use layout_alignParentBottom to place a
line on the bottom of the item to separate the look from the other
one, but this doesn't work. Also wanted to place a 'delete button'
using CenterVertical and again this doesn't work.
What's going on here?
Does anyone have any suggestions?
--
Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
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