O SNAP!! Im an idiot I forgot about the app widget provider XML file.....I left the width/height the same from the tutorial 150 x 150 lol
spasiba my friend From: [email protected] [mailto:[email protected]] On Behalf Of Kostya Vasilyev Sent: Friday, September 10, 2010 4:32 AM To: [email protected] Subject: Re: [android-developers] Widget Layout Help Please If your widget is too large, check these: - Android UI guidelines has standard widget sizes, as well as shows the grid on which widgets are laid out: http://developer.android.com/guide/practices/ui_guidelines/widget_design.htm l#sizes - Check your <appwidget-provider> XML file (usually res/xml/widget_info.xml), specifically, android:minWidth and android:minHeight. I use 70dp and 72dp for these, but my widgets are a little larger than the standard ones (trying to match HTC Sense), although they still fit the standard grid. - Check the widget's layout file, specifically, its width and height. If necessary, specify explicit width and height to match the <appwidget-provider> and a solid background color to see which elements of your widget layout do not fit. -- Kostya 10.09.2010 7:36, Tommy Hartz пишет: Right I under stand that its a grid layout but my Icon is taking up 2 - 3 grid spaces....HTC Aria shows you the grid space and mine is massive 2010/9/9 Kostya Vasilyev <[email protected]> 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" <[email protected]> написал: 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 [email protected] To unsubscribe from this group, send email to [email protected] <mailto:android-developers%[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] <mailto:android-developers%[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 -- 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 [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

