Codota Logo
Activity.setProgress
Code IndexAdd Codota to your IDE (free)

How to use
setProgress
method
in
android.app.Activity

Best Java code snippets using android.app.Activity.setProgress (Showing top 20 results out of 315)

  • Common ways to obtain Activity
private void myMethod () {
Activity a =
  • Codota IconWeakReference mActivity;mActivity.get()
  • Codota IconStack activityStack;activityStack.lastElement()
  • Codota Icon(Activity) param.thisObject
  • Smart code suggestions by Codota
}
origin: stackoverflow.com

 getWindow().requestFeature(Window.FEATURE_PROGRESS);

WebView mWebView = (WebView) findViewById(R.id.mywebview);

mWebView.getSettings().setJavaScriptEnabled(true);

final Activity activity = this;

mWebView.setWebChromeClient(new WebChromeClient(){

     public void onProgressChanged(WebView view, int progress) {
         activity.setTitle("Loading...");
         activity.setProgress(progress * 100);
          if(progress == 100)
            activity.setTitle("My title");
         }
});

mWebView.loadUrl(URL);
origin: androidquery/androidquery

act.setProgress(0);
origin: androidquery/androidquery

public void reset(){
  
  if(pb != null){
    pb.setProgress(0);
    pb.setMax(10000);
  }
  if(pd != null){
    pd.setProgress(0);
    pd.setMax(10000);
  }
  
  if(act != null){
    act.setProgress(0);
  }
  unknown = false;
  current = 0;
  bytes = 10000;
  
}

origin: androidquery/androidquery

act.setProgress(0);
origin: stackoverflow.com

 final Activity activity = this;

final ProgressDialog progressDialog = new ProgressDialog(activity);
progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
progressDialog.setCancelable(false);

browser.setWebChromeClient(new WebChromeClient() {
  public void onProgressChanged(WebView view, int progress) {
    progressDialog.show();
    progressDialog.setProgress(0);
    activity.setProgress(progress * 1000);

    progressDialog.incrementProgressBy(progress);

    if(progress == 100 && progressDialog.isShowing())
      progressDialog.dismiss();
  }
});
origin: androidquery/androidquery

public void done(){
  
  if(pb != null){
    pb.setProgress(pb.getMax());
  }
  if(pd != null){
    pd.setProgress(pd.getMax());
  }
  
  if(act != null){
    act.setProgress(9999);
  }
  
}
origin: stackoverflow.com

mActivity .setProgress(progress * 100); //Make the bar disappear after URL is loaded
origin: androidquery/androidquery

public void increment(int delta){
  
  if(pb != null){		
    pb.incrementProgressBy(unknown ? 1 : delta);
  }
  
  if(pd != null){
    pd.incrementProgressBy(unknown ? 1 : delta);
  }
  
  if(act != null){
    int p;
    if(unknown){
      p = current++;
    }else{
      current+= delta;
      p = (10000 * current) / bytes;
    }
    if(p > 9999){
      p = 9999;
    }
    act.setProgress(p);
  }
  
}

origin: stackoverflow.com

activity.setProgress(progress * 1000);
origin: stackoverflow.com

 final Activity activity = this;
mWebView.setWebChromeClient(new WebChromeClient() {
  public void onProgressChanged(WebView view, int progress) {
    activity.setProgress(progress * 100);
  }
});
origin: com.uphyca/android-junit4-robolectric

/**
 * @param progress
 * @see android.app.Activity#setProgress(int)
 */
public final void setProgress(int progress) {
  mActivity.setProgress(progress);
}
origin: stackoverflow.com

final Activity activity = this;
webview.setWebChromeClient(new WebChromeClient() {
 public void onProgressChanged(WebView view, int progress) {
  // Activities and WebViews measure progress with different scales.
  // The progress meter will automatically disappear when we reach 100%
  activity.setProgress(progress * 1000);
 }
});
origin: fr3ts0n/AndrOBD

@Override
public void onProgressUpdate(Integer... values)
{
  activity.setProgress(values[0]);
}
origin: com.willowtreeapps/oak-demos

@Override
public void setProgress(int progress) {
  if (DEBUG) Log.d(TAG, "[setProgress] progress: " + progress);
  mActivity.setProgress(progress);
}
origin: com.actionbarsherlock/actionbarsherlock

@Override
public void setProgress(int progress) {
  if (ActionBarSherlock.DEBUG) Log.d(TAG, "[setProgress] progress: " + progress);
  mActivity.setProgress(progress);
}
origin: GoBelieveIO/im_android

  public void onProgressChanged(WebView view, int progress) {
    // Activities and WebViews measure progress with different scales.
    // The progress meter will automatically disappear when we reach 100%
    activity.setProgress(progress * 1000);
  }
});
origin: com.sdklite/sphere-hybrid-spi

@Override
public void onProgressChanged(final WebView view, final int newProgress) {
  final Context context = view.getContext();
  if (context instanceof Activity) {
    ((Activity) context).setProgress(newProgress);
  }
}
origin: stackoverflow.com

 final ProgressDialog pDialog = new ProgressDialog(context);
pDialog.setMessage("Please wait....");
pDialog.setCancelable(false);
pDialog.show();

String url = "url";

final Activity activity = (Activity) context;
pdfView.setWebChromeClient(new WebChromeClient() {
  public void onProgressChanged(WebView view, int progress)   
  {
    activity.setProgress(progress * 1000);
    pDialog.incrementProgressBy(progress);
    if(progress == 100 && pDialog.isShowing()) 
      pDialog.dismiss();
  }
});
origin: com.googlecode.android-query/android-query

public void done(){
  
  if(pb != null){
    pb.setProgress(pb.getMax());
  }
  if(pd != null){
    pd.setProgress(pd.getMax());
  }
  
  if(act != null){
    act.setProgress(9999);
  }
  
}
origin: stackoverflow.com

mWebview.setWebChromeClient(new WebChromeClient() {
    public void onProgressChanged(WebView view, int progress)   
    {
       //Make the bar disappear after URL is loaded, and changes string to Loading...
       Activity activity = getActivity();
       if (activity != null) {
        activity.setTitle("Loading...");
        activity.setProgress(progress * 100); //Make the bar disappear after URL is loaded
        // Return the app name after finish loading
        if(progress == 100)
        activity.setTitle(R.string.Fragment1);
       }
      }
    });
android.appActivitysetProgress

Popular methods of Activity

  • onCreate
  • getWindow
  • finish
  • onDestroy
  • onResume
  • findViewById
  • startActivity
  • getResources
  • startActivityForResult
  • onPause
  • getSystemService
  • getWindowManager
  • getSystemService,
  • getWindowManager,
  • runOnUiThread,
  • isFinishing,
  • getString,
  • onStop,
  • getApplicationContext,
  • onStart,
  • onOptionsItemSelected,
  • getPackageName

Popular in Java

  • Start an intent from android
  • requestLocationUpdates (LocationManager)
  • runOnUiThread (Activity)
  • onCreateOptionsMenu (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now