为什么可以将一个布尔数组写入一个parcel而不是一个布尔值? [英] Why is it possible to write a boolean array to a parcel but not a boolean?

查看:210
本文介绍了为什么可以将一个布尔数组写入一个parcel而不是一个布尔值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Parcel的文档中,它声明存在一个方法

In the documentation for the Parcel it states a method exists

public final void writeBooleanArray (boolean[] val) 

但是没有的方法writeBoolean(boolean val)

还存在:

public final void writeLong (long val)

public final void writeLongArray (long[] val)

所以类似的模式可用于其他原始类型。

So a similar pattern is available for other primitive types.

有人可以解释这是为什么吗?

Can some one explain why this is?

推荐答案

有一个开放的错误报告:

There is an open bug report on it:

http://code.google.com/p/android/issues/detail?id=5973

显然其他人同意你的评估(我也同意)。

Evidently others agree with your assessment (and I do too).

这篇关于为什么可以将一个布尔数组写入一个parcel而不是一个布尔值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆