谁能告诉我使用 getDrawable() 的正确方法,我记得上次使用它只需要一个参数就可以了,但现在我收到了 this method is deprecated 错误,有人吗?下面是我尝试使用的片段
private void toggleUi() {
ImageView imageView = (ImageView) findViewById(R.id.silent_icon);
Drawable silentImage;
if(silent) {
silentImage = getResources().getDrawable(R.drawable.silent_on);
} else {
silentImage = getResources().getDrawable(R.drawable.silent_off);
}
imageView.setImageDrawable(silentImage);
}
Run Code Online (Sandbox Code Playgroud)
如果有人可以帮忙,我会很高兴谢谢。
我在主摄像头上添加了一个C#脚本.我定义了一个MyNumber如下变量-
public int MyNumber = 9;
Run Code Online (Sandbox Code Playgroud)
我的问题是当我改变变量的值时; 在Unity Editor中,它保持不变.例如,如果我使用Monodevelop将C#脚本文件中的值从9更改为19,则Unity编辑器将继续显示My Number = 9而不是19; 除非我重置脚本文件.
我有这个对象数组,如何使用 jQuery.each() 遍历它?
大批
(
[0] => stdClass 对象
(
[id] => 1
[parent_cat_id] => 1
[child_cat_name] => Java
[状态] => 1
[日期] => 2016-09-11 01:26:00
)
[1] => stdClass 对象
(
[id] => 2
[parent_cat_id] => 1
[child_cat_name] => JavaScript
[状态] => 1
[日期] => 2016-09-11 01:26:00
)
[2] => stdClass 对象
(
[id] => 3
[parent_cat_id] => 1
[child_cat_name] => HTML
[状态] => 1
[日期] => 2016-09-11 01:26:00
)
[3] => stdClass 对象
(
[id] => 4
[parent_cat_id] … android ×1
android-view ×1
arrays ×1
c# ×1
javascript ×1
jquery ×1
json ×1
loops ×1
monodevelop ×1
unity5 ×1
unityscript ×1