Those 38 pixels can mean different things depending on which resource
density folder the image is in (-mdpi, -hdpi, etc.).
Your total imageview width is: 38 pixels at unknown density + 5
density independent units.
So yes, convert that to pixels and set as the left padding value from
code, or convert to dip units and specify it in the XML.
You will most likely need to adjust your {group} item layouts, adding
more padding on the left to account for the two indicators taking more
space.
-- Kostya
19 декабря 2011 г. 21:56 пользователь dashman <[email protected]> написал:
> ok i'm getting closer.
>
> re the image width, i've actually got layout_width to wrap_content.
>
> the actual image width is 38px - but i guess that gets converted to
> dip.
>
> <ImageView android:id="@+id/main_parent_image2"
> android:paddingLeft="5dip"
> android:paddingRight="0dip"
> android:layout_gravity="center_vertical"
> android:layout_width="wrap_content"
> android:layout_height="wrap_content" />
>
>
> is the above the right way?
>
> so i have to convert (5+38)dip to pixels and set that as the left
> indicator right?
>
>
> i'll figure out the width of the group-indicator image as an exercise
> to self.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en