當前位置: 首頁>>代碼示例>>Java>>正文


Java Message.sendToTarget方法代碼示例

本文整理匯總了Java中android.os.Message.sendToTarget方法的典型用法代碼示例。如果您正苦於以下問題:Java Message.sendToTarget方法的具體用法?Java Message.sendToTarget怎麽用?Java Message.sendToTarget使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.os.Message的用法示例。


在下文中一共展示了Message.sendToTarget方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: quitSynchronously

import android.os.Message; //導入方法依賴的package包/類
public void quitSynchronously() {
    state = State.DONE;
    cameraManager.stopPreview();
    Message quit = Message.obtain(decodeThread.getHandler(), R.id.quit);
    quit.sendToTarget();
    try {
        // Wait at most half a shouquan_icon_second; should be enough time, and onPause()
        // will timeout quickly
        decodeThread.join(500L);
    } catch (InterruptedException e) {
        // continue
    }

    // Be absolutely sure we don't send any queued up messages
    removeMessages(R.id.decode_succeeded);
    removeMessages(R.id.decode_failed);
}
 
開發者ID:StickyTolt,項目名稱:ForeverLibrary,代碼行數:18,代碼來源:CaptureActivityHandler.java

示例2: onClick

import android.os.Message; //導入方法依賴的package包/類
@Override
public void onClick(View v) {
    final Message m;
    if (v == mButtonPositive && mButtonPositiveMessage != null) {
        m = Message.obtain(mButtonPositiveMessage);
    } else if (v == mButtonNegative && mButtonNegativeMessage != null) {
        m = Message.obtain(mButtonNegativeMessage);
    } else if (v == mButtonNeutral && mButtonNeutralMessage != null) {
        m = Message.obtain(mButtonNeutralMessage);
    } else {
        m = null;
    }

    if (m != null) {
        m.sendToTarget();
    }

    // Post a message so we dismiss after the above handlers are executed
    mHandler.obtainMessage(DynamicAlertController.ButtonHandler.MSG_DISMISS_DIALOG, mDialog)
            .sendToTarget();
}
 
開發者ID:pranavpandey,項目名稱:dynamic-dialogs,代碼行數:22,代碼來源:DynamicAlertController.java

示例3: quitSynchronously

import android.os.Message; //導入方法依賴的package包/類
public void quitSynchronously() {
	state = State.DONE;
	CameraManager.get().stopPreview();
	Message quit = Message.obtain(decodeThread.getHandler(), R.id.quit);
	quit.sendToTarget();
	try {
		decodeThread.join();
	} catch (InterruptedException e) {
		// continue
	}

	// Be absolutely sure we don't send any queued up messages
	removeMessages(R.id.decode_succeeded);
	removeMessages(R.id.decode_failed);
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:16,代碼來源:CaptureActivityHandler.java

示例4: onPreviewFrame

import android.os.Message; //導入方法依賴的package包/類
public void onPreviewFrame(byte[] data, Camera camera) {
  Point cameraResolution = configManager.getCameraResolution();
  if (!useOneShotPreviewCallback) {
    camera.setPreviewCallback(null);
  }
  if (previewHandler != null) {
    Message message = previewHandler.obtainMessage(previewMessage, cameraResolution.x,
        cameraResolution.y, data);
    message.sendToTarget();
    previewHandler = null;
  } else {
    Log.d(TAG, "Got preview callback, but no handler for it");
  }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:15,代碼來源:PreviewCallback.java

示例5: onPreviewFrame

import android.os.Message; //導入方法依賴的package包/類
public void onPreviewFrame(byte[] data, Camera camera) {
    Point cameraResolution = configManager.getCameraResolution();
    if (!useOneShotPreviewCallback) {
        camera.setPreviewCallback(null);
    }
    if (previewHandler != null) {
        Message message = previewHandler.obtainMessage(previewMessage, cameraResolution.x,
                cameraResolution.y, data);
        message.sendToTarget();
        previewHandler = null;
    }
}
 
開發者ID:RuanXiaoHui,項目名稱:ZxingScan,代碼行數:13,代碼來源:PreviewCallback.java

示例6: onPreviewFrame

import android.os.Message; //導入方法依賴的package包/類
@Override
public void onPreviewFrame(byte[] data, Camera camera) {
	Point cameraResolution = configManager.getCameraResolution();
	Handler thePreviewHandler = previewHandler;
	if (cameraResolution != null && thePreviewHandler != null) {
		Message message = thePreviewHandler.obtainMessage(previewMessage, cameraResolution.x, cameraResolution.y, data);
		message.sendToTarget();
		previewHandler = null;
	} else {
		Log.d(TAG, "Got preview callback, but no handler or resolution available");
	}
}
 
開發者ID:TonnyL,項目名稱:Espresso,代碼行數:13,代碼來源:PreviewCallback.java

示例7: onPreviewFrame

import android.os.Message; //導入方法依賴的package包/類
@Override
public void onPreviewFrame(byte[] data, Camera camera) {
  Point cameraResolution = configManager.getCameraResolution();


  Handler thePreviewHandler = previewHandler;
  if (cameraResolution != null && thePreviewHandler != null) {
    Message message = thePreviewHandler.obtainMessage(previewMessage, cameraResolution.x,
        cameraResolution.y, data);
    message.sendToTarget();
    previewHandler = null;
  } else {
    Log.d(TAG, "Got preview callback, but no handler or resolution available");
  }
}
 
開發者ID:crisfg86,項目名稱:Zxing-Custom,代碼行數:16,代碼來源:PreviewCallback.java

示例8: continueTurn

import android.os.Message; //導入方法依賴的package包/類
private void continueTurn(PlayerData playerStats) {
    Message msg;
    if (playerStats.local) {
        // Start local turn
        msg = Message.obtain(mHandler, MSG_START, playerStats.index, 0);
        msg.sendToTarget();
    } else {
        // End turn
        msg = Message.obtain(mHandler, MSG_END, playerStats.index, 0);
        msg.sendToTarget();
    }
}
 
開發者ID:dftec-es,項目名稱:planetcon,代碼行數:13,代碼來源:GameActivity.java

示例9: onPreviewFrame

import android.os.Message; //導入方法依賴的package包/類
@Override
public void onPreviewFrame(byte[] data, Camera camera) {
  Point cameraResolution = configManager.getCameraResolution();
  Handler thePreviewHandler = previewHandler;
  if (cameraResolution != null && thePreviewHandler != null) {
    Message message = thePreviewHandler.obtainMessage(previewMessage, cameraResolution.x,
        cameraResolution.y, data);
    message.sendToTarget();
    previewHandler = null;
  } else {
    Log.d(TAG, "Got preview callback, but no handler or resolution available");
  }
}
 
開發者ID:yun2win,項目名稱:tvConnect_android,代碼行數:14,代碼來源:PreviewCallback.java

示例10: hiddenRight

import android.os.Message; //導入方法依賴的package包/類
private void hiddenRight(View view) {
	if (mCurrentItemView == null) {
		return;
	}
	Message msg = new MoveHandler().obtainMessage();//
	msg.obj = view;
	msg.arg1 = view.getScrollX();
	msg.arg2 = 0;

	msg.sendToTarget();

	mIsShown = false;
}
 
開發者ID:SavorGit,項目名稱:Hotspot-master-devp,代碼行數:14,代碼來源:SwipeListView.java

示例11: sendMessage

import android.os.Message; //導入方法依賴的package包/類
private void sendMessage(int what) {
    if (handler == null) {
        return;
    }

    Message message = handler.obtainMessage();
    message.what = what;
    message.sendToTarget();
}
 
開發者ID:myinnos,項目名稱:AwesomeImagePicker,代碼行數:10,代碼來源:AlbumSelectActivity.java

示例12: onPreviewFrame

import android.os.Message; //導入方法依賴的package包/類
@Override
public void onPreviewFrame(byte[] data, Camera camera) {
    Point cameraResolution = configManager.getCameraResolution();
    Handler thePreviewHandler = previewHandler;
    if (cameraResolution != null && thePreviewHandler != null) {
        Message message = thePreviewHandler.obtainMessage(previewMessage, cameraResolution.x,
                cameraResolution.y, data);
        message.sendToTarget();
        previewHandler = null;
    } else {
        Log.d(TAG, "Got preview callback, but no handler or resolution available");
    }
}
 
開發者ID:angcyo,項目名稱:RLibrary,代碼行數:14,代碼來源:PreviewCallback.java

示例13: onPreviewFrame

import android.os.Message; //導入方法依賴的package包/類
@Override
public void onPreviewFrame(byte[] data, Camera camera) {
    Point cameraResolution = configManager.getCameraResolution();
    Handler thePreviewHandler = previewHandler;
    if (cameraResolution != null && thePreviewHandler != null) {
        Message message = thePreviewHandler.obtainMessage(previewMessage, cameraResolution.x, cameraResolution.y, data);
        message.sendToTarget();
        previewHandler = null;
    } else {
        Log.d(TAG, "Got preview callback, but no handler or resolution available");
    }
}
 
開發者ID:coding-dream,項目名稱:TPlayer,代碼行數:13,代碼來源:PreviewCallback.java

示例14: sendContinuousOcrFailMessage

import android.os.Message; //導入方法依賴的package包/類
private void sendContinuousOcrFailMessage() {
  Handler handler = activity.getHandler();
  if (handler != null) {
    Message message = Message.obtain(handler, R.id.ocr_continuous_decode_failed, new OcrResultFailure(timeRequired));
    message.sendToTarget();
  }
}
 
開發者ID:mercuriete,項目名稱:android-mrz-reader,代碼行數:8,代碼來源:DecodeHandler.java

示例15: postResult

import android.os.Message; //導入方法依賴的package包/類
private Result postResult(Result result) {
    @SuppressWarnings("unchecked")
    Message message = sHandler.obtainMessage(MESSAGE_POST_RESULT,
            new AsyncTaskResult<Result>(this, result));
    message.sendToTarget();
    return result;
}
 
開發者ID:jjuiddong,項目名稱:Android-Practice,代碼行數:8,代碼來源:AsyncTask.java


注:本文中的android.os.Message.sendToTarget方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。