android-drawable

Android app not “designed for tablets” due to drawables

狂风中的少年 提交于 2020-02-13 08:12:13
问题 Google Play states that my app is not designed for tablets: "Your APK should include custom drawables assets for common tablet screen densities." It links to 4. Use assets designed for tablet screens on the Tablet app quality page. I'm trying to understand how I'm not compliant with section 4, and I'd appreciate insights. Is section 4 on tablet assets even accurate for Action Bar icon sizes? It looks like 32dp is the specified size (32x32px at mdpi), but that appears to conflict with the

Android app not “designed for tablets” due to drawables

只谈情不闲聊 提交于 2020-02-13 08:12:08
问题 Google Play states that my app is not designed for tablets: "Your APK should include custom drawables assets for common tablet screen densities." It links to 4. Use assets designed for tablet screens on the Tablet app quality page. I'm trying to understand how I'm not compliant with section 4, and I'd appreciate insights. Is section 4 on tablet assets even accurate for Action Bar icon sizes? It looks like 32dp is the specified size (32x32px at mdpi), but that appears to conflict with the

Android - retrieve the device-appropriate drawable folder as a string

百般思念 提交于 2020-02-08 04:39:27
问题 Is it possible to retrieve the correct drawable folder name as a String using Android? For example, I would like, as a string: String drawableFolder = someFunction.getFolder(); Log.i("", drawableFolder); ....to output: XXDPI . Usage case: I'm downloading images from a remote URL and would like a mechanism to retrieve a device-appropriate image. It occurred to me I could prepend the URL with the correct name, e.g. http://static.images.server.com/XXDPI_image.png 回答1: You can get the following

Android - retrieve the device-appropriate drawable folder as a string

依然范特西╮ 提交于 2020-02-08 04:39:05
问题 Is it possible to retrieve the correct drawable folder name as a String using Android? For example, I would like, as a string: String drawableFolder = someFunction.getFolder(); Log.i("", drawableFolder); ....to output: XXDPI . Usage case: I'm downloading images from a remote URL and would like a mechanism to retrieve a device-appropriate image. It occurred to me I could prepend the URL with the correct name, e.g. http://static.images.server.com/XXDPI_image.png 回答1: You can get the following

Resource is not a Drawable Resources$NotFoundException

安稳与你 提交于 2020-02-03 23:42:48
问题 Getting this error since I started changing device for testing. Did some searching and none of it help because they are outdated. Any help is appreciated! xml file <ImageView android:id="@+id/loginpanel" android:layout_width="491px" android:layout_height="210dp" android:layout_marginStart="41dp" android:layout_marginTop="146dp" android:layout_weight="1" android:background="@drawable/loginpanel" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" />

Resource is not a Drawable Resources$NotFoundException

爷,独闯天下 提交于 2020-02-03 23:42:33
问题 Getting this error since I started changing device for testing. Did some searching and none of it help because they are outdated. Any help is appreciated! xml file <ImageView android:id="@+id/loginpanel" android:layout_width="491px" android:layout_height="210dp" android:layout_marginStart="41dp" android:layout_marginTop="146dp" android:layout_weight="1" android:background="@drawable/loginpanel" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" />

Could android store drawable ids like an integer-array?

不想你离开。 提交于 2020-01-23 01:54:09
问题 I want a drawable id array of integer values which I can store like an integer-array in res/values/XXX.xml by using integer-array tag. Below is integer-array declared in strings.xml <integer-array name="icons"> <item>1</item> <item>2</item> <item>3</item> <item>4</item> </integer-array> But I want to store drawable image ids like @drawable/someImage as an integer array in xml. OR Is there any alternatives to store drawable integer ids as an integer array in xml. 回答1: I think TypedArray is

Change the color of a disabled button in android

两盒软妹~` 提交于 2020-01-22 10:41:17
问题 Is there a way to change the color of a disabled button in android through styles or some other form ? I currently have the following, drawable/button_default.xml <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/button_default_shape"/> </selector> drawable/button_default_shape.xml <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape=

Using layer-list to display some drawable images

笑着哭i 提交于 2020-01-22 05:11:26
问题 Android studio 2.0 Preview 3b Hello, I have created the following layout that I want to use for a background for my app. I am using the layer-list and I want to display a bowl of peas in 2 locations. Everything looks ok in the preview, but when I run on genymotion or some cheap Chinese devices the image stretches across the screen. However, on the Android AVD, everything looks fine and on my Nexus 5 (real device) everything works ok. This is what I want and this is how it's displayed in the

Android Webview has extra white space at the bottom

為{幸葍}努か 提交于 2020-01-16 05:30:09
问题 I'm using the following method with HTML to load a local image into webview void loadingImage(WebView mWebView){ mWebView.getSettings().setSupportZoom(false); mWebView.getSettings().setDisplayZoomControls(false); String mHead="<html><head><style type='text/css'>body{margin:auto auto;text-align:center;} img{width:100%25;} </style></head>"; String mBody = "<body> <img src='my_image.jpg'/> </body></html>"; mWebView.loadDataWithBaseURL("file:///android_res/drawable/", mHead + mBody, "text/html",