nine-patch

error: too many padding sections on right border

浪子不回头ぞ 提交于 2019-12-08 07:53:01
问题 when i build my project it give me error like I found the reason that, because of 9 patch file i am getting this error. so can any one please look at this 9-patch file for whats wrong in this below image. also i am using layer list for this drop down which is below drop_down_drawable.xml <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="rectangle"> <corners android:radius="2dp" /> <stroke android:width=

Android studio mipmap and 9-patch drawables

喜你入骨 提交于 2019-12-08 00:52:05
问题 I am facing strange issue trying to put 9 patch drawables into new android studio mipmap directories. I've put all the images to specified folders, just as I used to do with drawable, but when I try to include it in a project it says Cannot resolve symbol @mipmap/myfile but it definitely "finds" it as you can see at the screenshot. I think it cannot resolve the symbol because the "real" filename has .9, but dots cannot be used in defining drawable. ( I tried, it didn't work :) ) Is someone

Ninepatch scaling wrong when scrolling after applying a Colorfilter?

柔情痞子 提交于 2019-12-07 15:57:14
问题 today i tried to make my listview a bit more dynamic. So i created a white ninepatch-image and added a colorfilter with the .setColorFilter method. That's not the problem. But after applying this, everytime i scroll the Image is scaling wrong (randomly) so lets say my item is 100dp high with some text. After scrolling the item is still 100dp high and all text is shown but the image in the Background only uses 50dp now. Here's my code: here how i set the Colorfilter: orgleftbox = context

Styling Sherlock Action Bar

老子叫甜甜 提交于 2019-12-07 10:29:27
问题 I'm trying to set an image as background of the Sherlock Action Bar, but even if the it's 720 x 112 px, it seems like the image doesn't stretch. The white part is still part of the Action Bar, as the triangle is set in the correct position and the button on the right, has different margins on the top and at the bottom. Do I need to make it a 9patch image? Not sure why it doesn't work.. I'm setting the background with a getSupportActionBar().setBackgroundDrawable(getResources().getDrawable(R

error: too many padding sections on right border

不打扰是莪最后的温柔 提交于 2019-12-06 15:13:57
when i build my project it give me error like I found the reason that, because of 9 patch file i am getting this error. so can any one please look at this 9-patch file for whats wrong in this below image. also i am using layer list for this drop down which is below drop_down_drawable.xml <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="rectangle"> <corners android:radius="2dp" /> <stroke android:width="1dp" android:color="@color/black_c4c4c4" /> </shape> </item> <item android:bottom="@dimen/margin_8"

9Patch on Lollipop shows gray oval in background

坚强是说给别人听的谎言 提交于 2019-12-06 10:18:51
问题 I have the following button: <Button android:layout_height="32dp" android:layout_marginTop="4dp" android:layout_marginLeft="@dimen/aecs_item_inner_padding_positive" android:id="@+id/aecsTelephone" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:layout_below="@id/aecsServicesContainer" android:layout_alignParentLeft="true" android:text="Mobile" android:background="@drawable/selector_mobile_button" /> and it has the following background selector: <?xml

Can't apply a colorFilter to text selection handles

[亡魂溺海] 提交于 2019-12-06 08:09:13
I'm trying to bring material text selection handles to my app. I got drawables from the SDK for middle/right/left handle (bitmaps) and text cursor (9-patch), and set: <item name="android:textSelectHandleLeft">@drawable/text_select_handle_left_mtrl_alpha</item> <item name="android:textSelectHandleRight">@drawable/text_select_handle_right_mtrl_alpha</item> <item name="android:textSelectHandle">@drawable/text_select_handle_middle_mtrl_alpha</item> <item name="android:textCursorDrawable">@drawable/text_cursor_mtrl_alpha</item> It works as expected. However, in Lollipop these drawables are tinted

When To Use 9-Patch

风流意气都作罢 提交于 2019-12-06 06:57:15
问题 Is there any Android developer documentation that says when drawable resources can be 9-patch? To put it another way, is there a document that says something along the lines of "the following items use 9-patch data, if available"? From poking around and experience, I've learned that 9-patch graphics should be used for application launcher icons icons used in the "Add to Home screen" selection list for App Widgets, Wallpapers, and Folders desktop wallpapers and when otherwise using BitMaps, e

9 patch editor android studio suddenly black

别来无恙 提交于 2019-12-06 05:26:17
Anyone with experience having the 9 patch editor in AS suddenly start using a black background for images? I have had no problems using it, now suddenly I can't make any edits. The image below should have a transparent background. If I try and drag the stretchable patches nothing changes, it keeps resetting itself, so to speak. Also this change happened in the same session. Question is old, but I have run into this issue 5 minutes ago. The problem occur when I save custom .png in paint.net and choose option for depth color "auto-detection". But when I saved it with with color depth "32 bit"

insert imageview in android chat bubble adjustable

跟風遠走 提交于 2019-12-06 04:44:39
问题 I would like to do this on my android chat but I can not get my picture fit my bubble. -I have a LinearLayout, and his background is a bubble 9patch -within this, I have a imageview, insert the image here but not how to make this fit the background like we see on screen. this is how my image is could give me an idea of how I can do this? thank. UPDATE : 28/04/2013 this is my layout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/rtlImganen" android