腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(4849)
视频
沙龙
1
回答
如何使用
TypedArray
.getResourceId()方法返回值?
java
、
android
、
android-layout
、
android-custom-view
、
typed-arrays
buttons_style="@style/MultiButtonStyle />public MultiButton(Context context, AttributeSet attrs )
TypedArray
typedArray
= context.obtainStyledAttributes(attrs,R.styleable.MultiButton); int resId =
typedArray
.getResourceId
浏览 5
提问于2020-08-16
得票数 0
1
回答
自定义列表首选项呈现问题
android
、
listpreference
、
typed-arrays
resources = context.getResources();preferences = PreferenceManager.getDefaultSharedPreferences(context);
TypedArray
defVal = a.getString(R.styleable.MyEditText_android_defaultValue);intlen= itemVal.length;itemIco = new;
TypedArray
i= 0;i< len;i++) { itemIcoi = iDs.getResourceId(i,0)
浏览 2
提问于2016-01-07
得票数 2
1
回答
如何在类型化数组中获取项的索引?
android
、
kotlin
、
resources
、
drawable
、
typed-arrays
我想在这样的资源数组中存储可绘图: <item>@drawable/sensor_brightness</item> <item>@drawable/sensor_humidity</item> <item>@drawable/sensor_car
浏览 4
提问于2021-03-22
得票数 0
回答已采纳
1
回答
TypedArray
中的运行时异常
android
、
android-5.0-lollipop
at android.content.res.
TypedArray
.recycle(
TypedArray
.java:869) 无法看到代码,因为Android仍然不可用,我如何检查
TypedArray
是否已被回收
浏览 4
提问于2014-10-13
得票数 3
回答已采纳
1
回答
将XML自定义属性从自定义UI组件传递给自定义UI子组件。
android
、
custom-controls
、
android-xml
、
android-custom-attributes
我有一个定制UI组件,它包含在另一个定制UI组件中(为了方便起见,它是分开的)。例如,这是应用程序的主要布局:xmlns:udinic="http://schemas.android.com/apk/res/com.udinic" android:id="@+id/ma
浏览 1
提问于2011-09-07
得票数 1
1
回答
TypedArray
和Enum
java
、
android
、
typed-arrays
我发现了TypedArrays,这似乎是个好主意,但我的笑话类包含枚举,我不确定是否可以从
TypedArray
设置枚举。<?;MainActivity.java Resources resources = getResources();
TypedArray
category = resources.o
浏览 4
提问于2015-07-01
得票数 0
回答已采纳
1
回答
将类型化数组作为any[]传递?
javascript
、
knockout.js
、
typescript
为什么我不能将类型化数组传递给一个函数/构造函数,该函数/构造函数接受一个any[]items = new ko.observableArray(
typedArray
); 提供的参数与调用目标的任何签名不匹配。
浏览 3
提问于2013-04-02
得票数 0
回答已采纳
1
回答
向Uint8ClampedArray类型化数组中添加元素的快速方法
javascript
、
performance
、
p5.js
、
typed-arrays
是否有一种向
typedArray
添加元素的快速方法,如果没有,您认为可以对我当前的算法进行任何改进吗?indexesToAdd升序)://indexesToAdd = [0,3,4]; // Normally around 4000 elements//Output = [100,0,200,40,50,0,1
浏览 1
提问于2018-12-10
得票数 2
回答已采纳
1
回答
在安卓上以编程方式设置AppBarLayout大小
java
、
android
、
android-coordinatorlayout
、
android-appbarlayout
我的AppBarLayout拥有Toolbar和TabLayout。定位视图时,高度设置为0 setLayoutParams(0)。在另一种状态下,视图被折叠,我需要恢复appbar高度。我尝试过setLayoutParams(heightDp)但是高度是不准确的。 CoordinatorLayout.LayoutParams lsp = (Coor
浏览 7
提问于2017-08-04
得票数 0
1
回答
在
TypedArray
的和谐操作系统中,有什么可供选择的呢?
java
、
android
、
huawei-mobile-services
、
huawei-developers
、
harmonyos
就像在安卓系统中一样,我们有
TypedArray
来实现这一功能。final
TypedArray
typedArray
= mContext.obtainStyledAttributes(attrs, R.styleable.CustomCalendarView,0, 0); calendarBackgroundColor =
typedArray
.getColor(R.styleable.CustomCalendarView_calendarBackgroundColor, getResources().getColor
浏览 11
提问于2021-07-30
得票数 0
回答已采纳
1
回答
TypedArray
和ArrayBuffers (节点/ chrome)上的Object.freeze()未按预期工作
javascript
、
node.js
、
google-chrome
、
typed-arrays
我有一个具有
TypedArray
成员的对象,我希望冻结该对象,以防止数据在设置后被修改。尝试冻结
TypedArray
或它的ArrayBuffer的行为并不像我预期的那样。var
typedArray
= new Uint32Array(4);
typedArray
[1] = 20; Object.freeze(
typedArray
.b
浏览 10
提问于2016-08-25
得票数 9
回答已采纳
2
回答
Javascript
TypedArray
性能
javascript
、
performance
、
typed-arrays
为什么TypedArrays没有比通常的数组更快?我想对CLZ (计算前导零函数)使用预计算值。我不想让他们把它们解释成普通的物体? Benchmark.prototype.setup = function() { var Uint32 = new Uint32Array(buffer); for(var i = 0; i < 0x10000; ++i) { Uint32[i] = (Math.random() * 0x1000000
浏览 4
提问于2014-07-21
得票数 22
回答已采纳
3
回答
如何初始化Uint8Array?
javascript
、
arrays
、
initialization
、
uint8array
我想要创建一个包含8个元素的Uint8Array。我试过这个但当我跑当我期望答案是"8“时,我会得到"255”。我想我做错了什么,但我不知道那是什么。
浏览 0
提问于2018-06-05
得票数 7
回答已采纳
2
回答
如何获得中性按钮的标准颜色
java
、
android
、
android-layout
、
android-resources
、
android-theme
().getTheme().resolveAttribute( typedValue.data, new int[]{android.R.attr.textColor}); // -1 <
浏览 1
提问于2018-03-19
得票数 0
回答已采纳
3
回答
在Android Studio的卡片视图上添加点击效果波纹效果
java
、
android
、
android-studio
、
android-cardview
我已经以编程方式添加了卡片视图。我只想让它可点击,并显示动画时,它被点击。以下是我的代码LayoutParams layoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);cardView.setRadius(15);cardView.setCa
浏览 24
提问于2019-11-05
得票数 1
回答已采纳
1
回答
让ObtainStyledAttributes在xamarin中正常工作
android
、
xamarin
、
xamarin.android
、
controls
我正在Xamarin.Android中构建一个自定义控件,作为该控件初始化的一部分,我希望读取该控件的指定高度。所以我呼吁:我遇到的问题是,我不知道如何为layout_height指定常量(这是我要提取的参数)。当我查看Xamarin文档时,它声明已经定义了一个Resource.Attribute.LayoutWidth const,但是我不能在源代
浏览 2
提问于2017-12-21
得票数 2
回答已采纳
2
回答
TypedArray
不工作
android
、
xml-attribute
、
xml-layout
、
typedarray
= null) {
TypedArray
ta = context.obtainStyledAttributes(attrs,
浏览 4
提问于2011-09-19
得票数 6
回答已采纳
1
回答
将Uint8ClampedArray转换为常规数组
javascript
、
arrays
、
typed-arrays
、
uint
如何将Uint8ClampedArray (如用于存储HTML5画布图像数据的)转换为常规数组,其中的值不受0-255约束。
浏览 3
提问于2015-04-24
得票数 16
回答已采纳
2
回答
R.attr.colorPrimary需要类型为color的资源
android
、
android-layout
、
colors
、
attr
我只想以编程方式设置contentScrim。所以我试着collapsingToolbarLayout.setContentScrimColor(color);collapsingToolbarLayout.setContentScrimColor(但我一直收到关于R.attr.colorPrimary的投诉。对此有什么帮助吗
浏览 3
提问于2016-10-23
得票数 2
2
回答
为什么要回收
TypedArray
?
android
、
garbage-collection
、
typedarray
告诉我,调用
TypedArray
的方法允许对其进行垃圾回收。我的问题是,为什么
TypedArray
特别需要一个方法来对其进行垃圾回收?为什么它不能像普通对象一样等待垃圾回收呢?
浏览 4
提问于2012-12-11
得票数 10
回答已采纳
点击加载更多
相关
资讯
Android 自定义View之随机数验证码
V8 JavaScript 引擎 6.8 发布,改进内存占用
Javascript 类型
值得推荐的数据可视化工具
玩转前端可视化,你准备好了吗?
热门
标签
更多标签
云服务器
对象存储
ICP备案
云点播
语音识别
活动推荐
运营活动
广告
关闭
领券