nine-patch

video not taking full screen in landscape mode using videoview android

﹥>﹥吖頭↗ 提交于 2019-12-30 07:49:08
问题 i m using videoview in portrait mode and have set this in manifest <activity android:name="com.ui.VideoDetailActivity" android:configChanges="orientation|screenSize|keyboard" android:theme="@style/newtheme" /> my layout is working fine in portrait mode but in landscape i do not want to load another layout from layout-land because this will start buffering of video from start position so i m trying to change views programtically but this is not working as expected.Layout for portrait : <?xml

Android: compiling 9-patch files to be used outside of the drawable folder?

不打扰是莪最后的温柔 提交于 2019-12-30 06:48:06
问题 I have a need to load 9-patch files from outside of the drawable folder. This is so that my application can download new skins from a server, for example. I have discovered that a 9-patch image stored in the drawable folder is compiled when the .apk is made. The exact same file read from the assets folder does not have the 9-patch chunk. Thus the act of making the .apk is compiling the source 9-patch files in the drawable folder, but not in the assets directory. How can I compile a 9-patch

9 Patch image where center is 1:1

旧时模样 提交于 2019-12-29 06:46:10
问题 I want to create a splash screen on Android with a small logo in the middle, but the logo is streched on larger devices. I thought I could use a 9 patch image, but it seems a 9 patch image works inversed to what I try to reach. This is the logo that has to be in the middle. This is what I get when I set the image as a 9 patch. The center is stretched out and the corners are intact. I need to opposite. I need a 9 patch that can define a center area that is always displayed in correct 1:1

Android Lollipop 5.1: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x9e985ff8 in tid 4093 (RenderThread) / when using lot of nine patch graphics

▼魔方 西西 提交于 2019-12-29 04:24:32
问题 I'm using quite a large amount of NinePatchDrawables in the app views. The underlying Bitmaps are cached, so there is no memory issue. While preparing/drawing the screen, the app crashes with the following log entry: 04-03 19:37:42.651: A/libc(4064): Fatal signal 11 (SIGSEGV), code 2, fault addr 0x9e985ff8 in tid 4093 (RenderThread) The issue just popped up with the latest Android 5.1 builds (LMY47D, LMY47E, LMY47I). The same views with the same graphics worked well on earlier Android

How can I get 9-patch to center my image on a cordova launch screen

点点圈 提交于 2019-12-25 08:04:15
问题 I manually created a 9-patch .png as shown below / indicated here: Stretch areas Top: Dot all the way to the left, dot all the way to the right Left: Dot all the way at the top, dot all the way at the bottom Content area Bottom: Line entire length of image Right: Line the entire height of image I expect it to render the image in the center both vertically and horizontally, however it's rendering too low vertically (and I'm not sure horizontally). I may be misunderstanding the 9-patch

What's the issue with this 9-png , showing black borders?

老子叫甜甜 提交于 2019-12-25 05:24:17
问题 I have been struggling for a week to run this nine patch image by adding patches to it with all case but it doesn't work , I can't figure out why ? Any suggestions are highly appreciated. It shouldn't show black lines when I am using it. This is the layout code where I use this image , <Button android:id="@+id/answerA" android:layout_width="fill_parent" android:layout_height="match_parent" android:layout_marginRight="2dp" android:layout_weight="1" android:background="@drawable/d_grey" android

Android : 9-Patch image Error

家住魔仙堡 提交于 2019-12-24 22:16:05
问题 i imported this keyboard app from git everything is working fine but i am getting this error while building project Error:top-left corner pixel must be either opaque white or transparent. Error:found an invalid color. Error:top-left corner pixel must be either opaque white or transparent. Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details Error:Execution failed for task ':app:mergeDebugResources'. > Error: java.util

Invalid color in Android Compilation. How to fix .9.png

橙三吉。 提交于 2019-12-24 10:37:28
问题 I'm getting the following error when compiling in Android Studio Android resource compilation failed Output: error: found an invalid color. The image that is causing the error is already a .9.png file and it looks like this in Android Studio I am not sure how to solve this. I referred to this two questions How can I track down the cause of Android "found an invalid color" error Android : 9-Patch image Error and both indicate that the border around the image should be transparent. I'm guessing

Unexpected button padding on ICS

限于喜欢 提交于 2019-12-24 06:58:31
问题 I have a custom button with a state list drawable that has a tight layout with very little padding. This button looks great on MDPI and HDPI devices, but padding is all wrong on my Motorola Xoom (ICS, MDPI device). Modifying the 'padding' and 'margin' attributes does nothing. Anyone have any suggestions on what may be causing the unnecessary padding? I'm fairly confident that both the state list drawable and the 9patch drawables are fine (they render perfectly on other MDPI devices). Attached

Using NinePatch (.9.png) for making scaled Bitmaps

此生再无相见时 提交于 2019-12-24 04:44:30
问题 I need to draw a Bitmap for my new Android Application. Since my content view is set to a Game-Panel class I've created. I want to display images through Bitmap. Just because its more convenient, and easier to do then anything else. From what I've gathered from researching, Nine Patch images (.9.png) are used in android to scale more properly then regular Drawable images. It also says "This can be used for scaling properly in backgrounds. For example a regular button background...". If Nine