草庐IT

drawable-hdpi

全部标签

android - 错误 : Source path does not exist: resources\android\icon\drawable-hdpi-icon. png

我正在尝试在Mac上使用“cordovabuild--releaseandroid”命令从Ionic项目中获取APK文件,但它不起作用当我收到此错误"Error:Sourcepathdoesnotexist:resources\android\icon\drawable-hdpi-icon.png"。有谁知道它可能来自哪里?这是config.xml文件的副本:RISEDiscovermusicasyougoOlivierLam感谢您的帮助。 最佳答案 我有同样的错误,运行后ionicresources或者ioniccordovare

android - 与之前的版本相比,Android L Developer Preview 中的 Drawable Tinting 有哪些新功能?

我正在开发新的AndroidL预览版,现在正在处理drawable上的着色概念。我想知道在AndroidLDeveloperPreview中是否有任何关于可绘制着色的新内容。我读到了thisdocumentation其中说:TheAndroidLDeveloperPreviewenablesyoutodefinebitmapsornine-patchesasalphamasksandtotintthemusingacolorresourceorathemeattributethatresolvestoacolorresource(forexample,?android:attr/col

android - 资源$NotFoundException : Resource is not a Drawable (color or path)?

我有一个textview,当它被点击时,我在一个对话框中填充了一个listView。这段代码过去可以正常工作,但今天它抛出异常。这是我的代码:tvSelectedFont=(TextView)findViewById(R.id.lblQuoteSelectedFont);tvSelectedFont.setOnClickListener(newView.OnClickListener(){@OverridepublicvoidonClick(Viewv){ListViewlistView=newListView(context);listView.setAdapter(newArray

android - 启动画面错误 : android. content.res.Resources$NotFoundException: Drawable

我正在尝试通过以下操作在我的android应用程序中实现启动画面thisarticle.我一步一步地遵循它,但是每当我尝试运行该应用程序时,它会立即崩溃,并且我的logcat中出现以下错误:2019-01-0510:46:33.6822265-2265/com.example.khoi.parkingappE/AndroidRuntime:FATALEXCEPTION:mainProcess:com.example.khoi.parkingapp,PID:2265java.lang.RuntimeException:UnabletostartactivityComponentInfo{

android shape xml旋转drawable以编程方式更改颜色

这是三角形的xml:这是一个textview的背景我想以编程方式更改形状的颜色。我试过了,但出现空指针异常LayerDrawablebgDrawable=(LayerDrawable)getActivity().getResources().getDrawable(R.drawable.category_triangle_shape1);finalGradientDrawableshape=(GradientDrawable)bgDrawable.findDrawableByLayerId(R.id.shape_id);shape.setStroke(10,Color.GREEN);我

android - 无效的资源目录名称,drawable-anydpi-v21

我想构建我的应用程序并将其发送到我使用android4.2.2的三星平板电脑。但我也想让我的应用程序与更新版本兼容(即API23)我使用这个命令启动应用程序:react-nativerun-android在构建时我收到此错误,我已经两次清理项目但没有成功。我不使用eclipse或androidstudio。:app:processDebugResourcesinvalidresourcedirectoryname:D:\Projects\react-native\project\android\app\build\intermediates\res\merged\debug/drawa

c# - CS0117 C# 'Resource' 不包含 'Drawable' 的定义

在我最终设法设置自定义渲染器之后,我想更改应用中每个按钮的形状。听起来很简单,是吧?设置:Xamarin.Forms版本2.3.2.127Xamarin.Android.Support.*版本23.3.0我的自定义渲染器:varbtn=this.ControlasAndroid.Widget.Button;btn.SetBackgroundResource(Resource.Drawable.arrow_button);当我尝试构建和部署它时,错误列表给出了以下错误:CS0117C#'Resource'doesnotcontainadefinitionfor'Drawable'我该如何

android - Layerlist drawable 不能很好地拉伸(stretch)

我开始学习android层列表和使用可绘制对象。我正在尝试创建一条简单的线,两端各有一个圆圈:我想出了一个图层列表,如下所示。它运行良好,但问题是当我在各种屏幕尺寸上运行它时,圆圈要么与线分开,要么被插入并落在线上。我希望形状按原样调整大小并且不会在不同的屏幕尺寸上变形。我不确定我错过了什么。 最佳答案 试试这个android:drawable="@drawable/ic_online"输出 关于android-Layerlistdrawable不能很好地拉伸(stretch),我们在S

android - Android pre-Gingerbread HDPI 通知栏图标的大小应该是多少?

Androidpre-GingerbreadHDPI通知栏图标的大小应该是多少?在文档中它说MDPI25x25具有2像素安全框架,即21x21:http://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html对HDPI使用标准的50%升频器,21*1.5=31.5。那么它们应该是32x32+3+3=38x38,还是31x31+3+3=37x37?我想要一个不会自动缩放的值:-) 最佳答案 thislink中的表具有以下值:19

java - Android:将 Drawable 添加到现有的 LayerDrawable

我有一个LayerDrawable,我用一个包含5个Drawable的Drawable数组构造它。现在假设在运行时我想添加另一个Drawable到我的LayerDrawable,以响应一个事件。我如何做到这一点而不必重新创建LayerDrawable,这次使用6个Drawable的Drawable数组?谢谢。 最佳答案 LayerDrawable创建后,不能再添加新的Drawable参见sourceofLayerDrawable:可绘制对象数组保存在mLayerState.mChildren中,并且仅在Constructor中设置。