Android 如何列出打包的所有密钥?
我尝试了下面的代码,但仍然没有找到将所有包含的键列在一个包中的方法 Java代码:Android 如何列出打包的所有密钥?,android,android-intent,bundle,Android,Android Intent,Bundle,我尝试了下面的代码,但仍然没有找到将所有包含的键列在一个包中的方法 Java代码: private void unpackBundle() { // TODO Auto-generated method stub Set <String> mBundleKeysSet = this.mBundle.keySet(); int size = mBundleKeysSet.size(); Toast.makeText(getApplicationConte
private void unpackBundle() {
// TODO Auto-generated method stub
Set <String> mBundleKeysSet = this.mBundle.keySet();
int size = mBundleKeysSet.size();
Toast.makeText(getApplicationContext(), size+" keys",Toast.LENGTH_LONG).show();
if ( mBundleKeysSet.iterator().hasNext() ) {
//here i should display a list of the contained keys
//in the bundle
}
}
private void unpacbundle(){
//TODO自动生成的方法存根
Set mBundleKeysSet=this.mBundle.keySet();
int size=mBundleKeysSet.size();
Toast.makeText(getApplicationContext(),size+“keys”,Toast.LENGTH\u LONG.show();
if(mBundleKeysSet.iterator().hasNext()){
//在这里,我应该显示一个包含键的列表
//束手无策
}
}
事实上,我找到了答案:
private void unpackBundle() {
// TODO Auto-generated method stub
Set <String> mBundleKeysSet = this.mBundle.keySet();
int size = mBundleKeysSet.size();
Toast.makeText(getApplicationContext(), size+" keys",Toast.LENGTH_LONG).show();
toast.makeText(getApplicationContext(), mBundleKeysSet.toString()
,Toast.LENGTH_LONG).show();
private void unpacbundle(){
//TODO自动生成的方法存根
Set mBundleKeysSet=this.mBundle.keySet();
int size=mBundleKeysSet.size();
Toast.makeText(getApplicationContext(),size+“keys”,Toast.LENGTH\u LONG.show();
toast.makeText(getApplicationContext(),mBundleKeysSet.toString())
,Toast.LENGTH_LONG)show();
}您只是移动到下一个关键点,什么也不做。你想完成什么?