在控制台应用程序中,可以使用ascii微调器,如GUI等待光标,以指示正在完成工作.一个普通的微调器循环遍历这4个字符:'|','/',' - ','\'
什么是其他一些循环动画序列来为控制台应用程序增添趣味?
user-interface console-application throbber ascii-art progress-indicator
在处理JSF中的ajax按钮(特别是primefaces)时,可以将鼠标光标的形式更改为繁忙模式(例如:沙漏)?我希望更改我的光标的形式,而我的p:dataTable在我导航到下一页时加载数据.谢谢.
将VBA中的ProgressBar UserForms显示为模态还是无模式更好?在VBA中制定进度指标的最佳做法是什么?
无模式UserForms需要使用Application.Interactive = False
,而Modal UserForms本质上阻止与应用程序的任何交互,直到核心过程完成或被取消.
Application.Interactive = False
但是,如果使用了,则Esc键会中断代码执行,因此在UserForm和调用过程中都需要使用Application.EnableCancelKey = xlErrorHandler
和错误处理(Err.Number = 18
).
资源密集型调用程序也能导致CommandButton_Click
和UserForm_Activate
在无模式用户窗体哑火事件.
通常,使用模态UserForms的进度指示器似乎更简单,因为正在执行的代码完全包含在UserForm模块中,并且不需要传递变量.
但是,对于进度指示器使用模态UserForms的问题是,每个需要进度指示器的过程都需要单独的UserForm模块,因为调用过程必须在UserForm_Activate过程中.
因此,虽然在无模式UserForm中可以有一个可重用的进度指示器,但它比在多个模态UserForms中执行代码的可靠性低.
哪种方式更好?
谢谢!
我需要改变颜色的SystemTray.ProgressIndicator
颜色,我该怎么办?
我试着设置ForegroundColor
了SystemTray
,它适用于纯文本不Inicator.指示灯始终使用PhoneAccent颜色.
我必须在设备上下载一些图像和视频,并且我喜欢通过在确定模式下覆盖一个圆形进度条来跟踪进度。
问题是,无论如何,ProgressBar 仍然是不确定的。
有没有办法让它循环并处于确定模式?
布局
<ProgressBar
android:layout_width="40dp"
android:layout_height="40dp"
android:progressTint="@color/colorPrimary"
android:indeterminate="false"
android:max="100"
android:layout_gravity="center"
android:id="@+id/message_media_preview_progress"
android:visibility="gone"
/>
Run Code Online (Sandbox Code Playgroud)
代码
final ProgressBar progressBar = (ProgressBar) mView.findViewById(R.id.message_media_preview_progress);
progressBar.setVisibility(View.VISIBLE);
progressBar.setProgress(0);
storageController.downloadMedia(context, message.getVideoFile(),
new ProgressListener<Integer>() {
@Override
public void onResult(Integer result) {
progressBar.setProgress(result);
}
},
new ResultListener<Boolean>() {
@Override
public void onResult(Boolean result) {
if(result) {
progressBar.setVisibility(View.GONE);
setMediaClickListener(message);
}else{
Toast.makeText(context,"Error downloading file",Toast.LENGTH_SHORT).show();
}
}
});
Run Code Online (Sandbox Code Playgroud) android progress-indicator android-progressbar material-design
我创建了一个扩展 MaterialButton 的自定义视图,在加载时用 CircularProgressIndicator 替换可绘制对象。
但是,当我用 CircularProgressIndicator 替换可绘制对象时, iconGravity 不再起作用。我不明白我做错了什么。
我已经能够将课程归结为:
class LoadingButton constructor(context: Context) : MaterialButton(context) {
private val progressIndicatorDrawable by lazy {
val progressIndicatorSpec = CircularProgressIndicatorSpec(context, null, 0, R.style.Widget_MaterialComponents_CircularProgressIndicator_ExtraSmall)
progressIndicatorSpec.indicatorColors = intArrayOf(getColor(context, R.color.white))
IndeterminateDrawable.createCircularDrawable(context, progressIndicatorSpec).apply {
setVisible(true, true)
}
}
init {
// the following drawable is aligned to the start of the view (incorrect).
icon = progressIndicatorDrawable
// the following drawable is aligned to the start of the text (correct).
// icon = DrawableUtil.getDrawable(context, R.drawable.icon_delete)
text = …
Run Code Online (Sandbox Code Playgroud) android progress-indicator android-gravity material-components material-components-android
我需要显示加载项目子项的进度.请告知如何实现像在Mail应用程序中完成的进度指示器:
大纲视图中的进度指标http://www.quicksnapper.com/files/10513/5329281414A48CEBA2FFE0_m.png
PS这里是使用指标子视图的源代码:http://snippets.dzone.com/posts/show/7684
我想要一个获取Perl输出的进度指示器
system('make')
Run Code Online (Sandbox Code Playgroud)
并且对于从make命令输出到STDOUT的每一行,我想输出一个点作为进度指示器.不幸的是,我正在使用Term :: ReadLine :: Gnu Perl mod.
在make命令运行时,如何重定向STDOUT以捕获和计算行?
android ×3
ajax ×1
ascii-art ×1
cocoa ×1
jsf ×1
libreadline ×1
macos ×1
material-components-android ×1
modal-dialog ×1
modeless ×1
mouse-cursor ×1
objective-c ×1
outline-view ×1
perl ×1
primefaces ×1
styling ×1
throbber ×1
userform ×1
vba ×1