Print the contents of a Bundle to Logcat?

后端 未结 10 680
孤独总比滥情好
孤独总比滥情好 2020-12-24 04:47

Is there an easy way to print the contents of a Bundle to Logcat if you can\'t remember the names of all the keys (even being able to print just the key names w

10条回答
  •  余生分开走
    2020-12-24 05:27

    Java 8 stream one liner:

    bundle.keySet().stream().forEach(k -> Log.d(TAG, k + " = " + bundle.get(k)));
    

提交回复
热议问题