Re: [android-developers] Re: 9.png file not spanning the LinearLayout when android:paddingBottom is specified
There's no such thing as content area, it's just a way to describe where the padding starts and ends in relation to the size of the entire element and elements it contains, which basically translates to the 4 padding variables (which is probably partially why you can only define one region, unlike the stretching areas). When you overwrote the padding variables, the content area definition got zeroed out, without knowing where to place the contents, it also doesn't know how to stretch the background properly On Sunday, June 30, 2013 10:56:42 PM UTC+3, Shri wrote: That kind of makes sense. However, even if the padding gets overwritten, the Button should still be over the red background since that is the content area of the 9.png. Why would the Button be positioned on the drop shadow (the non-content area of the 9.png)? Seems like there is some undefined non-intuitive behavior happening whereas it would be preferable for either of the defined padding to be applied (as that would the intuitive behavior). On Sat, Jun 29, 2013 at 11:54 PM, Piren gpi...@gmail.com javascript:wrote: Part of what 9patches do is define padding... if you define them on your own you'll overwrite the settings provided by the 9patch. On Saturday, June 29, 2013 2:10:36 AM UTC+3, Shri wrote: I have the following layout file which uses the attached 9.png. It results in the attached screenshot where the red background from the 9.png does not extend all the way behind the button. If I remove the android:paddingBottom=1dp attribute below, things work as I expect. Is this behavior expected (if so, why), or is this a bug? Thanks, Shri ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.** android.com/apk/res/android http://schemas.android.com/apk/res/android android:id=@+id/container android:orientation=vertical android:layout_width=match_**parent android:layout_height=match_**parent android:background=#ff LinearLayout android:id=@+id/view_with_**drop_shadow android:orientation=vertical android:paddingBottom=1dp android:layout_width=match_**parent android:layout_height=wrap_**content android:background=@drawable/**red_background_with_drop_**shadow Button android:text=Hello android:layout_width=wrap_**content android:layout_height=48dip / /LinearLayout /LinearLayout -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: 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 a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/oXTXTevOqEE/unsubscribe . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: 9.png file not spanning the LinearLayout when android:paddingBottom is specified
Part of what 9patches do is define padding... if you define them on your own you'll overwrite the settings provided by the 9patch. On Saturday, June 29, 2013 2:10:36 AM UTC+3, Shri wrote: I have the following layout file which uses the attached 9.png. It results in the attached screenshot where the red background from the 9.png does not extend all the way behind the button. If I remove the android:paddingBottom=1dp attribute below, things work as I expect. Is this behavior expected (if so, why), or is this a bug? Thanks, Shri ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:id=@+id/container android:orientation=vertical android:layout_width=match_parent android:layout_height=match_parent android:background=#ff LinearLayout android:id=@+id/view_with_drop_shadow android:orientation=vertical android:paddingBottom=1dp android:layout_width=match_parent android:layout_height=wrap_content android:background=@drawable/red_background_with_drop_shadow Button android:text=Hello android:layout_width=wrap_content android:layout_height=48dip / /LinearLayout /LinearLayout -- -- 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: 9.png file not spanning the LinearLayout when android:paddingBottom is specified
That kind of makes sense. However, even if the padding gets overwritten, the Button should still be over the red background since that is the content area of the 9.png. Why would the Button be positioned on the drop shadow (the non-content area of the 9.png)? Seems like there is some undefined non-intuitive behavior happening whereas it would be preferable for either of the defined padding to be applied (as that would the intuitive behavior). On Sat, Jun 29, 2013 at 11:54 PM, Piren gpi...@gmail.com wrote: Part of what 9patches do is define padding... if you define them on your own you'll overwrite the settings provided by the 9patch. On Saturday, June 29, 2013 2:10:36 AM UTC+3, Shri wrote: I have the following layout file which uses the attached 9.png. It results in the attached screenshot where the red background from the 9.png does not extend all the way behind the button. If I remove the android:paddingBottom=1dp attribute below, things work as I expect. Is this behavior expected (if so, why), or is this a bug? Thanks, Shri ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.**android.com/apk/res/androidhttp://schemas.android.com/apk/res/android android:id=@+id/container android:orientation=vertical android:layout_width=match_**parent android:layout_height=match_**parent android:background=#ff LinearLayout android:id=@+id/view_with_**drop_shadow android:orientation=vertical android:paddingBottom=1dp android:layout_width=match_**parent android:layout_height=wrap_**content android:background=@drawable/**red_background_with_drop_**shadow Button android:text=Hello android:layout_width=wrap_**content android:layout_height=48dip / /LinearLayout /LinearLayout -- -- 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 --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/oXTXTevOqEE/unsubscribe . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.