tags:

views:

62

answers:

1

Hello everybody

Please advice how to set fixed heigh (in dip) for the child view of ListView component?

I am using relative layout as root layout for the child view

when I set backgoround image to relative layout it becomes very height (maybe because backgoround picture is large) and I want to set precisely the height in dp.

A: 

For specifying the child height in dip via java code see following discussions:
1. setWidth in dip
2. how to specify padding in dip
3. Correct way to specify dimensions in Java code

Samuh
I want to set child height in xml
endryha
moreover I want to have width as fill_parent but fixed height in dip
endryha
in XML just suffix the dimensions with "dip". E.g. layout_width = "50dip"
Samuh
of course I know that, but when I have background larger then for instance 15dip the height becomes larger. I want to set fixed height nevertheless f background height
endryha