Android examples for Android OS:Bundle
show Content in Bundle
import java.util.Set; import android.os.Bundle; import android.text.TextUtils; public class Main{ public static final String TAG = "BundleUtil"; public static final void showContent(Bundle bundle) { if (bundle == null) { return; }/*from ww w . j a va2 s .c om*/ 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(); LogUtil.d(TAG, content); } }