本文整理了Java中android.os.Message.<init>()
方法的一些代码示例,展示了Message.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.<init>()
方法的具体详情如下:
包路径:android.os.Message
类名称:Message
方法名:<init>
暂无
代码示例来源:origin: aa112901/remusic
@Override
public void onClick(View v) {
// MusicPlayer.previous(PlayingActivity.this.getApplication(), true);
Message msg = new Message();
msg.what = PRE_MUSIC;
mPlayHandler.sendMessage(msg);
}
});
代码示例来源:origin: TeamNewPipe/NewPipe
void progressReport(long done) {
mission.done = done;
if (mission.length < mission.done) mission.length = mission.done;
Message m = new Message();
m.what = DownloadManagerService.MESSAGE_PROGRESS;
m.obj = mission;
mission.mHandler.sendMessage(m);
}
}
代码示例来源:origin: navasmdc/MaterialDesignLibrary
@Override
public void run() {
try {
Thread.sleep(mTimer);
} catch (InterruptedException e) {
e.printStackTrace();
}
handler.sendMessage(new Message());
}
});
代码示例来源:origin: navasmdc/MaterialDesignLibrary
@Override
public void run() {
for(int i = 0; i <= 100; i++){
try {
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
handler.sendMessage(new Message());
}
}
});
代码示例来源:origin: navasmdc/MaterialDesignLibrary
@Override
public void run() {
try {
Thread.sleep(4000);
for(int i = 0; i <= 100; i++){
Thread.sleep(100);
handler2.sendMessage(new Message());
}
} catch (InterruptedException e) {
e.printStackTrace();
}
}
});
代码示例来源:origin: CarGuo/GSYVideoPlayer
@Override
public void releaseMediaPlayer() {
Message msg = new Message();
msg.what = HANDLER_RELEASE;
sendMessage(msg);
playTag = "";
playPosition = -22;
}
代码示例来源:origin: CarGuo/GSYVideoPlayer
@Override
public void releaseSurface(Surface holder) {
Message msg = new Message();
msg.what = HANDLER_RELEASE_SURFACE;
msg.obj = holder;
sendMessage(msg);
}
代码示例来源:origin: CarGuo/GSYVideoPlayer
@Override
public void setDisplay(Surface holder) {
Message msg = new Message();
msg.what = HANDLER_SETDISPLAY;
msg.obj = holder;
showDisplay(msg);
}
代码示例来源:origin: TommyLemon/APIJSON
@Override
public void onForwardClick(View v) {
if (hasUrl == false) {
onDragBottom(true);
} else {
Message msg = new Message();
msg.obj = inputedString;
searchHandler.sendMessage(msg);
}
}
代码示例来源:origin: facebook/facebook-android-sdk
private void sendNextMessage(int what) {
Message newMsg = new Message();
newMsg.what = what;
sendMessageDelayed(newMsg, DEFAULT_DELAY_MILLIS);
}
}
代码示例来源:origin: android-hacker/VirtualXposed
void broadcastSent(int vuid, ActivityInfo receiverInfo, PendingResultData res) {
BroadcastRecord record = new BroadcastRecord(vuid, receiverInfo, res);
synchronized (mBroadcastRecords) {
mBroadcastRecords.put(res.mToken, record);
}
Message msg = new Message();
msg.obj = res.mToken;
mTimeoutHandler.sendMessageDelayed(msg, BROADCAST_TIME_OUT);
}
代码示例来源:origin: lipangit/JiaoZiVideoPlayer
public void releaseMediaPlayer() {
mMediaHandler.removeCallbacksAndMessages(null);
Message msg = new Message();
msg.what = HANDLER_RELEASE;
mMediaHandler.sendMessage(msg);
}
代码示例来源:origin: lipangit/JiaoZiVideoPlayer
public void prepare() {
releaseMediaPlayer();
Message msg = new Message();
msg.what = HANDLER_PREPARE;
mMediaHandler.sendMessage(msg);
}
代码示例来源:origin: CarGuo/GSYVideoPlayer
public void prepare(List<String> urls, Map<String, String> mapHeadData, boolean loop, float speed, boolean cache, File cachePath) {
if (urls.size() == 0) return;
Message msg = new Message();
msg.what = HANDLER_PREPARE;
msg.obj = new GSYExoModel(urls, mapHeadData, loop, speed, cache, cachePath);
sendMessage(msg);
if (needTimeOutOther) {
startTimeOutBuffer();
}
}
代码示例来源:origin: CarGuo/GSYVideoPlayer
@Override
public void prepare(final String url, final Map<String, String> mapHeadData, boolean loop, float speed, boolean cache, File cachePath, String overrideExtension) {
if (TextUtils.isEmpty(url)) return;
Message msg = new Message();
msg.what = HANDLER_PREPARE;
GSYModel fb = new GSYModel(url, mapHeadData, loop, speed, cache, cachePath, overrideExtension);
msg.obj = fb;
sendMessage(msg);
if (needTimeOutOther) {
startTimeOutBuffer();
}
}
代码示例来源:origin: robolectric/robolectric
@Test
public void shouldCallProvidedHandlerCallback() {
Handler handler = new Handler(callback);
handler.sendMessage(new Message());
assertTrue(hasHandlerCallbackHandledMessage);
}
代码示例来源:origin: robolectric/robolectric
@Test
public void testPeekData() throws Exception {
assertThat(new Message().peekData()).isNull();
Message m = new Message();
Bundle b = new Bundle();
m.setData(b);
assertThat(m.peekData()).isEqualTo(b);
}
代码示例来源:origin: robolectric/robolectric
@Test
public void testGetDataShouldLazilyCreateBundle() throws Exception {
assertThat(new Message().getData()).isNotNull();
assertThat(new Message().getData().isEmpty()).isTrue();
}
代码示例来源:origin: robolectric/robolectric
@Test
public void testGetData() throws Exception {
Message m = new Message();
Bundle b = new Bundle();
m.setData(b);
assertThat(m.getData()).isEqualTo(b);
}
代码示例来源:origin: robolectric/robolectric
@Test
public void testGetTarget() throws Exception {
Message m = new Message();
Handler h = new Handler();
m.setTarget(h);
assertThat(m.getTarget()).isEqualTo(h);
}
内容来源于网络,如有侵权,请联系作者删除!