printf相当于Android dev?

时间:2010-06-29 01:45:29

标签: android

我只是弄湿了脚趾。使用Eclipse,并不远远超出HelloAndroid。如果我将画廊图像加载到屏幕上,并且我想使用getPixel,我在哪里发送生成的RGB值输出以便我可以读取它?

感谢。

2 个答案:

答案 0 :(得分:2)

定义一个:

private static final String TAG = "YOUR TAG";

使用Log类:

Log.d(TAG, "RGB is " + rgb);

您可以看到包含logcat的日志。

答案 1 :(得分:1)

我认为正确的方法是写:

Log.d(TAG, String.format("RGB is %d", rgb));
相关问题