progress

Using UIActivityIndicatorView with UIWebView in Swift

无人久伴 提交于 2019-12-03 11:49:24
I'm trying to display an Activity Indicator View in my app to users while a url is being loaded into a WebView. I've tried toying with activity.startAnimating/activity.stopAnimating and tried placing them in functions, etc. but have not had any luck. The best I have been able to get is the Activity Indicator to appear and animate, but then not stop animating or hide once my url is loaded, so it continues spinning on top of the web page. In other situations, when trying to move around activity.startAnimating, I have encountered the "Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode

ability to get the progress on a Future<T> object

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 11:43:14
问题 With reference to the java.util.concurrent package and the Future interface I notice (unless I am mistaken) that the ability to start a lengthy tasks and be able to query on the progress only comes with the SwingWorker implementing class. This begs the following question: Is there a way, in a non-GUI, non-Swing application (imaging a console application) to start a lengthy task in the background and allow the other threads to inspect the progress ? It seems to me that there is no reason why

Is there any way to get upload progress correctly with HttpUrlConncetion

旧巷老猫 提交于 2019-12-03 11:37:57
Android Developers Blog recommend to use HttpURLConnection other than apache's HttpClient ( http://android-developers.blogspot.com/2011/09/androids-http-clients.html ). I take the advice and get problem in reporting file upload progress. my code to grab progress is like this: try { out = conncetion.getOutputStream(); in = new BufferedInputStream(fin); byte[] buffer = new byte[MAX_BUFFER_SIZE]; int r; while ((r = in.read(buffer)) != -1) { out.write(buffer, 0, r); bytes += r; if (null != mListener) { long now = System.currentTimeMillis(); if (now - lastTime >= mListener.getProgressInterval()) {

update progress bar during copy file with NSFileManager

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I copy files then my application is finish launching from resource to caches directory. but I want to update my progress bar during copying the files. I copy the file with the code below: -( BOOL ) copyDirectory :( NSString *) source toDirectory :( NSString *) targat { BOOL retVal = YES ; NSFileManager * fileManager = [[ NSFileManager alloc ] init ]; NSError * error ; if ([ fileManager fileExistsAtPath : targat ] == YES ) { NSError * error = nil ; [ fileManager removeItemAtPath : targat error :& error ]; } if (![ fileManager

Delphi: Copy Files from folder with Overall progress. CopyFileEx?

耗尽温柔 提交于 2019-12-03 10:16:43
问题 I have found examples of CopyFileEx with progress, but I need to copy some files from a folder with overall progress. Can anybody provide info how to do this? Or is there good alternative (component, function)? Big thanks for help!!! 回答1: Well, I had an answer - but I only just got around to digging it out :( But here it is anyway, I wrote this a few years ago as part of a program that was called "CopyFilesAndFailGraceFully.exe" :) I've modded it a bit to miss out the recovery stuff that

Flash in Gmail File Upload Progress Bar

匿名 (未验证) 提交于 2019-12-03 08:50:26
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Several resources I have found claim, that GMail File Upload incorporates Flash to display progress bar or to allow multiple file uploads. For example: http://anders.com/cms/290 http://www.neowin.net/news/gmail-enables-multi-attatchment-uploading My question is, it true, that GMail uses Flash to generate upload Progress Bar? If not, how does GMail achieve Progress Bars in IE9, which does not support FileAPI? I did several tests, and I was not able to confirm presence of Flash during GMail File Upload process: I installed FlashBlocker which

How to create Custom Horizontal progress bar

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Please help to create horizontal progress bar like this 回答1: You do not need a custom progress bar. Use style="@android:style/Widget.ProgressBar.Horizontal" in your layout xml file. You will also need to use ProgressBar.incrementProgressBy(int progress); See Android Developers|ProgressBar 回答2: Set style for horizontal progress bar style="?android:attr/progressBarStyleHorizontal" Create custom progress drawable: green_progress_drawable.xml <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res

Android - Custom SeekBar - round corners on progress bar

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Trying to make a custom SeekBar. I want to achieve this. What I have done so far is this. I can't find a way to round the corners on the progress bar. Can someone help with this? Here is my code main_activity.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:gravity="center"> <SeekBar android:id="@+id/seekBar1" android:layout_width="match_parent" android:layout_height="30dp" android:progressDrawable="

Inno Setup Get progress from .NET Framework 4.5 (or higher) installer to update progress bar position

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am currently installing .NET Framework 4.6.2 as a prerequisite in the PrepareToInstall event function so that I can obtain the exit code, set the NeedsReboot status, or abort if installation fails. My code is below and this is all working fine. var PrepareToInstallLabel: TNewStaticText; PrepareToInstallProgressBar: TNewProgressBar; intDotNetResultCode: Integer; CancelWithoutPrompt, AbortInstall: Boolean; function InitializeSetup(): Boolean; begin Result := True; OverwriteDB := False; CancelWithoutPrompt := False; AbortInstall := False; end

Is it possible to check progress of URLconnection.getInputStream()?

别来无恙 提交于 2019-12-03 07:46:06
I want to check progress of downloading file by URLconnection. Is it possible or should I use another library? This is my urlconnection function: public static String sendPostRequest(String httpURL, String data) throws UnsupportedEncodingException, MalformedURLException, IOException { URL url = new URL(httpURL); URLConnection conn = url.openConnection(); //conn.addRequestProperty("Content-Type", "text/html; charset=iso-8859-2"); conn.setDoOutput(true); OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream()); wr.write(data); wr.flush(); BufferedReader rd = new BufferedReader(new