drawable
How onDraw method works in subclass of android-custom-view class?
I facing problem to draw rectangle at subclass of my android custom view class. Each time super class onDraw method works.But subclass onDraw method never executed. Super class will draw a rectangle a[详细]
2023-03-23 00:23 分类:问答Android + setDividerDrawable on a LinearLayout?
I\'m interested in adding dividers to a LinearLayout\'s children dynamically.I see in the docs that LinearLayout contains a CONST \"SHOW_DIVIDER_MIDDLE\" along with get and set divider methods.Can som[详细]
2023-03-22 23:33 分类:问答How to dynamically create an AnimationDrawable from a tiled image
In the game I am currently programming, I have a tiled image with different animation frames in a 4x3 matrix. I would like to create an AnimationDrawable consisting of each of these frames in sequence[详细]
2023-03-22 21:01 分类:问答Android | How do I define the height and width of a 9-Patch PNG so it won't get pixelized
I have discovered the main idea of how to deal with regular PNG for Android. Let\'s say I have created in my computer an icon the size of 60*120px. I know that for hdpi (800*480px) I need to divide it[详细]
2023-03-22 17:50 分类:问答Android crop background
I have a LinearLayout with width set to fill_parent and height to wrap_content. Now I want 开发者_如何学JAVAto give it a background from a png file, but doing it in a traditional way causes the Linear[详细]
2023-03-22 15:25 分类:问答How to make a progress bar use an image to show progress instead of using a color in Android
I have a logo image that I would like to use in my progress bar.Each time an image is downloaded, my progress bar creeps up using a blue bar.However,I would prefer that it slowly display my logo image[详细]
2023-03-22 15:00 分类:问答How to use Android-provided graphics in an application?
I remember seeing how to do this somewhere, but I\'m totally drawing a blank right开发者_JAVA技巧 now. I\'d like to use the Android \"Refresh\" graphic in my application, how do I reference it? Is the[详细]
2023-03-22 07:00 分类:问答drawable-land vs drawable
I am not using a layout-land, but do have drawable-land. The problem is, it uses whichever drawable matches the orientation when the activity starts.I would like it to switch between using the drawab[详细]
2023-03-22 04:34 分类:问答Where to set bounds of a drawable in a custom view
Overview: I`m trying to create some simple shapes (squares and triangles) and then use them as the background image for an activity. The sizes of the shapes depend on the width and height of the scree[详细]
2023-03-22 00:16 分类:问答how to modify this code to stretch the image to full screen in android
I got some code it draws images according to the size of the image. but i want to stretch the image to full screen. i tried a lot but nothing really helped.Can any do this for me? thanks in advance[详细]
2023-03-21 18:04 分类:问答