Android examples for android.os:Bundle
show and format Content inside Bundle
import java.util.Set; import android.os.Bundle; public class Main { public static final void showContent(Bundle bundle) { if (bundle == null) { return;// ww w . ja v a2 s . c o m } StringBuilder builder = new StringBuilder(); builder.append("bundle contnet\n"); Set<String> keys = bundle.keySet(); for (String key : keys) { builder.append("[" + key + "]<->[" + bundle.get(key) + "]\n"); } String content = builder.toString(); System.out.println(content); } }