Home screen Widgets are laid out on a grid, so no matter how compact you make your layout, it won't get any closer to other widgets.
Also, you should not be using pixel dimensions in the layout - use device-independent "do" units. -- Kostya Vasilyev -- http://kmansoft.wordpress.com 09.09.2010 23:42 пользователь "Tommy" <droi...@gmail.com> написал: Hi everyone, I am trying to make a widget to show on the home screen(s). My problem is lets say I set my icon to 30x30 when I load the widget on the screen the Icon is the correct size BUT the layout itself takes up a lot more space than what is actually needed. This means that I can't really place my widget next to other icons on the screen. Its like the bounding box is 3 times bigger than the content that fills it. How do I fix this? Here is my XML.... <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:id="@+id/widget" android:layout_width="30px" android:layout_height="30px" android:focusable="true" > <ImageView android:id="@+id/widgWeatherIcon" android:layout_width="30px" android:layout_height="30px" android:src="@drawable/asdf_widgettester" > </ImageView> <TextView android:id="@+id/widgCurrTemp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="100" android:layout_below="@id/widgWeatherIcon"> </TextView> </RelativeLayout> I have tried wrap_content and other width/height settings but nothing seems to reduce the "Box" around my widget content..... Im super confused. I clicked on my ATK widget and started to drag it around on my HTC Aria and it shows the bounding box around the widget and that one is the same size of the content inside same with all the other widgets on my screens. Thanks so much for the help and advice! Tommy -- 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<android-developers%2bunsubscr...@googlegroups.com> 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 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