本文整理了Java中android.widget.Button.setText()
方法的一些代码示例,展示了Button.setText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setText()
方法的具体详情如下:
包路径:android.widget.Button
类名称:Button
方法名:setText
暂无
代码示例来源:origin: daniulive/SmarterStreaming
public void onClick(View v) {
is_speex = !is_speex;
if (is_speex)
btnSpeex.setText("当前SPEEX编码");
else
btnSpeex.setText("当前AAC编码");
}
}
代码示例来源:origin: daniulive/SmarterStreaming
public void onClick(View v) {
isHardwareDecoder = !isHardwareDecoder;
if (isHardwareDecoder) {
btnHardwareDecoder.setText("当前硬解码");
} else {
btnHardwareDecoder.setText("当前软解码");
}
}
});
代码示例来源:origin: daniulive/SmarterStreaming
public void onClick(View v) {
is_hardware_encoder = !is_hardware_encoder;
if (is_hardware_encoder)
btnEncoderType.setText("当前硬编码");
else
btnEncoderType.setText("当前软编码");
}
}
代码示例来源:origin: daniulive/SmarterStreaming
public void onClick(View v) {
is_noise_suppression = !is_noise_suppression;
if (is_noise_suppression)
btnNoiseSuppression.setText("已打开噪音抑制");
else
btnNoiseSuppression.setText("已关闭噪音抑制");
}
}
代码示例来源:origin: daniulive/SmarterStreaming
public void onClick(View v) {
isFastStartup = !isFastStartup;
if (isFastStartup) {
btnFastStartup.setText("停用秒开");
} else {
btnFastStartup.setText("启用秒开");
}
}
});
代码示例来源:origin: daniulive/SmarterStreaming
public void onClick(View v)
{
is_push_agc = !is_push_agc;
if ( is_push_agc )
btnPushAGC.setText("停用AGC");
else
btnPushAGC.setText("启用AGC");
}
}
代码示例来源:origin: daniulive/SmarterStreaming
public void onClick(View v)
{
is_push_noise_suppression = !is_push_noise_suppression;
if ( is_push_noise_suppression )
btnPushNoiseSuppression.setText("停用噪音抑制");
else
btnPushNoiseSuppression.setText("启用噪音抑制");
}
}
代码示例来源:origin: daniulive/SmarterStreaming
public void onClick(View v) {
isCameraFaceFront = !isCameraFaceFront;
if (isCameraFaceFront)
btnSwitchCamera.setText("当前前置摄像头");
else
btnSwitchCamera.setText("当前后置摄像头");
}
}
代码示例来源:origin: daniulive/SmarterStreaming
public void onClick(View v)
{
is_push_speex = !is_push_speex;
if ( is_push_speex )
btnPushSpeex.setText("不使用Speex");
else
btnPushSpeex.setText("使用Speex");
}
}
代码示例来源:origin: daniulive/SmarterStreaming
public void onClick(View v) {
is_sw_vbr_mode = !is_sw_vbr_mode;
if (is_sw_vbr_mode)
btnBitrateControl.setText("当前可变码率");
else
btnBitrateControl.setText("当前固定码率");
}
}
代码示例来源:origin: daniulive/SmarterStreaming
public void onClick(View v) {
is_agc = !is_agc;
if (is_agc)
btnAGC.setText("已打开AGC");
else
btnAGC.setText("已关闭AGC");
}
}
代码示例来源:origin: daniulive/SmarterStreaming
public void onClick(View v) {
is_sw_vbr_mode = !is_sw_vbr_mode;
if (is_sw_vbr_mode)
btnBitrateControl.setText("当前可变码率");
else
btnBitrateControl.setText("当前固定码率");
}
}
代码示例来源:origin: daniulive/SmarterStreaming
public void onClick(View v) {
isLowLatency = !isLowLatency;
if (isLowLatency) {
playBuffer = 0;
Log.i(TAG, "low latency mode, set playBuffer to 0");
btnLowLatency.setText("正常延时");
} else {
btnLowLatency.setText("超低延时");
}
}
});
代码示例来源:origin: daniulive/SmarterStreaming
public void onClick(View v) {
is_mute = !is_mute;
if (is_mute)
btnMute.setText("取消静音");
else
btnMute.setText("实时静音");
if (libPublisher != null)
libPublisher.SmartPublisherSetMute(publisherHandle, is_mute ? 1 : 0);
}
}
代码示例来源:origin: daniulive/SmarterStreaming
public void onClick(View v) {
is_mirror = !is_mirror;
if (is_mirror)
btnMirror.setText("已打开镜像");
else
btnMirror.setText("已关闭镜像");
if (libPublisher != null)
libPublisher.SmartPublisherSetMirror(publisherHandle, is_mirror ? 1 : 0);
}
}
代码示例来源:origin: daniulive/SmarterStreaming
public void onClick(View v) {
isMute = !isMute;
if (isMute) {
btnMute.setText("取消静音");
} else {
btnMute.setText("静音");
}
if (playerHandle != 0) {
libPlayer.SmartPlayerSetMute(playerHandle, isMute ? 1 : 0);
}
}
});
代码示例来源:origin: daniulive/SmarterStreaming
public void onClick(View v)
{
is_push_mute = !is_push_mute;
if ( is_push_mute )
btnPushMute.setText("取消静音");
else
btnPushMute.setText("静音");
if ( libPublisher != null )
libPublisher.SmartPublisherSetMute(publisherHandle, is_push_mute?1:0);
}
}
代码示例来源:origin: daniulive/SmarterStreaming
public void onClick(View v)
{
is_push_mirror = !is_push_mirror;
if ( is_push_mirror )
btnPushMirror.setText("关镜像");
else
btnPushMirror.setText("开镜像");
if ( libPublisher != null )
libPublisher.SmartPublisherSetMirror(publisherHandle, is_push_mirror?1:0);
}
}
代码示例来源:origin: lingochamp/FileDownloader
public void updateDownloaded() {
taskPb.setMax(1);
taskPb.setProgress(1);
taskStatusTv.setText(R.string.tasks_manager_demo_status_completed);
taskActionBtn.setText(R.string.delete);
}
代码示例来源:origin: lingochamp/FileDownloader
private void checkEndAll() {
final boolean isEndAll = overTaskPb.getProgress() >= Integer.valueOf(taskCountTv.getText().toString());
if (isEndAll) {
Log.d(TAG, String.format("start[%d] over[%d]", GlobalMonitor.getImpl().getMarkStart(),
GlobalMonitor.getImpl().getMarkOver()));
stopTimeCount();
actionBtn.setTag(true);
actionBtn.setText("Start");
taskCountSb.setEnabled(true);
}
}
内容来源于网络,如有侵权,请联系作者删除!