List of usage examples for android.widget ProgressBar setVisibility
@RemotableViewMethod public void setVisibility(@Visibility int visibility)
From source file:com.plnyyanks.frcnotebook.datafeed.EventListFetcher.java
@Override protected void onPostExecute(String result) { super.onPostExecute(result); //Log.d(Constants.LOG_TAG,"Event Data: "+result.toString()); //LinearLayout eventList = (LinearLayout) listActivity.findViewById(R.id.event_list_to_download); ListView eventList = (ListView) listActivity.findViewById(R.id.event_list_to_download); adapter = new ListViewArrayAdapter(listActivity, events, keys); eventList.setAdapter(adapter);/*w w w.j a v a2s . c om*/ eventList.setOnItemClickListener(new EventClickListener(keys)); //hide the progress bar ProgressBar prog = (ProgressBar) listActivity.findViewById(R.id.event_loading_progress); prog.setVisibility(View.GONE); }
From source file:id.zelory.benih.ui.view.BenihImageView.java
public void setImageUrl(String url, final ProgressBar progressBar, int errorResourceId) { imageUrl = url;/*from w ww .j a v a2 s. c o m*/ progressBar.setVisibility(VISIBLE); Glide.with(getContext()).load(url).listener(new RequestListener<String, GlideDrawable>() { @Override public boolean onException(Exception e, String model, Target<GlideDrawable> target, boolean isFirstResource) { progressBar.setVisibility(GONE); return false; } @Override public boolean onResourceReady(GlideDrawable resource, String model, Target<GlideDrawable> target, boolean isFromMemoryCache, boolean isFirstResource) { progressBar.setVisibility(GONE); return false; } }).error(errorResourceId).into(this); }
From source file:my.home.lehome.asynctask.LoadProfileHeaderBgAsyncTask.java
@Override protected void onPreExecute() { ImageView imageView = mImageView.get(); if (imageView != null) { imageView.setImageURI(null);/*from ww w . j a va2 s . co m*/ this.mWidth = imageView.getWidth(); this.mHeight = imageView.getHeight(); this.mScaleType = imageView.getScaleType(); } ProgressBar progressBar = mProgressBar.get(); if (progressBar != null) { progressBar.setVisibility(View.VISIBLE); } }
From source file:id.zelory.benih.ui.view.BenihImageView.java
public void setImageUrl(String url, final ProgressBar progressBar, Drawable errorDrawable) { imageUrl = url;/*from w w w . jav a 2 s . co m*/ progressBar.setVisibility(VISIBLE); Glide.with(getContext()).load(url).listener(new RequestListener<String, GlideDrawable>() { @Override public boolean onException(Exception e, String model, Target<GlideDrawable> target, boolean isFirstResource) { progressBar.setVisibility(GONE); return false; } @Override public boolean onResourceReady(GlideDrawable resource, String model, Target<GlideDrawable> target, boolean isFromMemoryCache, boolean isFirstResource) { progressBar.setVisibility(GONE); return false; } }).error(errorDrawable).into(this); }
From source file:my.home.lehome.asynctask.LoadProfileHeaderBgAsyncTask.java
@Override protected void onPostExecute(Bitmap resultBitmap) { ProgressBar progressBar = mProgressBar.get(); if (progressBar != null) { progressBar.setVisibility(View.GONE); }/* w w w . j a v a2s . c om*/ ImageView imageView = mImageView.get(); if (imageView != null) { // recycle previous bitmap Drawable drawable = imageView.getDrawable(); if (drawable != null && drawable instanceof BitmapDrawable) { BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable; Bitmap bitmap = bitmapDrawable.getBitmap(); if (bitmap != null) bitmap.recycle(); imageView.setImageBitmap(null); } imageView.setImageBitmap(resultBitmap); } }
From source file:org.onebusaway.android.report.ui.BaseReportActivity.java
protected void setUpProgressBar() { ActionBar.LayoutParams params = new ActionBar.LayoutParams(ActionBar.LayoutParams.WRAP_CONTENT, ActionBar.LayoutParams.WRAP_CONTENT); params.gravity = Gravity.END;/*from w w w.ja v a 2 s. co m*/ ProgressBar progressBar = new ProgressBar(this); progressBar.setIndeterminate(true); progressBar.setVisibility(View.GONE); progressBar.setIndeterminate(true); progressBar.setLayoutParams(params); progressBar.getIndeterminateDrawable().setColorFilter(Color.WHITE, android.graphics.PorterDuff.Mode.MULTIPLY); ActionBar ab = getSupportActionBar(); if (ab != null) { ab.setDisplayShowCustomEnabled(true); ab.setCustomView(progressBar); } }
From source file:org.mariotaku.twidere.util.MediaLoadingHandler.java
@Override public void onLoadingComplete(final String imageUri, final View view, final Bitmap bitmap) { if (view == null) return;/*from ww w . j a v a2 s . c om*/ mLoadingUris.remove(view); final ViewGroup parent = (ViewGroup) view.getParent(); setVideoIndicator(view, parent); final ProgressBar progress = findProgressBar(parent); if (progress != null) { progress.setVisibility(View.GONE); } }
From source file:org.getlantern.firetweet.util.ImageLoadingHandler.java
@Override public void onLoadingComplete(final String imageUri, final View view, final Bitmap bitmap) { if (view == null) return;// ww w. ja va 2 s . c o m mLoadingUris.remove(view); final ViewGroup parent = (ViewGroup) view.getParent(); if (view instanceof ForegroundImageView) { final Drawable foreground; if (isVideoItem(parent)) { foreground = ResourcesCompat.getDrawable(view.getResources(), R.drawable.ic_card_media_play, null); } else { foreground = null; } ((ForegroundImageView) view).setForeground(foreground); } final ProgressBar progress = findProgressBar(parent); if (progress != null) { progress.setVisibility(View.GONE); } }
From source file:com.microsoft.office.sfb.healthcare.SkypeCall.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_skype_call); ButterKnife.inject(this); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar);/*from w w w. j a v a 2s . c o m*/ getSupportActionBar().setDisplayHomeAsUpEnabled(false); ProgressBar progressBar = (ProgressBar) findViewById(R.id.progressBar); progressBar.setVisibility(View.VISIBLE); mConversation = startToJoinMeeting(); mConversation.addOnPropertyChangedCallback(new ConversationPropertyChangeListener()); }
From source file:org.getlantern.firetweet.util.ImageLoadingHandler.java
@Override public void onLoadingCancelled(final String imageUri, final View view) { if (view == null || imageUri == null || imageUri.equals(mLoadingUris.get(view))) return;// w w w.j a va 2 s .c om mLoadingUris.remove(view); if (view instanceof ForegroundImageView) { ((ForegroundImageView) view).setForeground(null); } final ProgressBar progress = findProgressBar(view.getParent()); if (progress != null) { progress.setVisibility(View.GONE); } }