快速寫法:
mHandler.sendMessage(mHandler.obtainMessage(MSG_ADD_TO_PLAYLIST, intent));
其內部其實就是:
public final Message obtainMessage(int what, Object obj)
{
return Message.obtain(this, what, obj);
}
mHandler.sendMessage(mHandler.obtainMessage(MSG_ADD_TO_PLAYLIST, intent));
其內部其實就是:
public final Message obtainMessage(int what, Object obj)
{
return Message.obtain(this, what, obj);
}
public static Message obtain(Handler h, int what, Object obj) {
Message m = obtain();
m.target = h;
m.what = what;
m.obj = obj;
return m;
}
留言
張貼留言