List of usage examples for android.widget ProgressBar setVisibility
@RemotableViewMethod public void setVisibility(@Visibility int visibility)
From source file:Main.java
public static void showMessage(ViewGroup emptyView, String msg) { if (emptyView == null) { return;//from w w w . j a v a 2 s. c o m } ProgressBar pbLoading = (ProgressBar) emptyView.getChildAt(0); pbLoading.setVisibility(View.GONE); TextView tvEmptyMsg = (TextView) emptyView.getChildAt(1); tvEmptyMsg.setVisibility(View.VISIBLE); tvEmptyMsg.setText(msg); }
From source file:Main.java
public static void hideStatusMessage(TextView statusText, ProgressBar progressBar) { statusText.setVisibility(View.INVISIBLE); progressBar.setVisibility(View.INVISIBLE); }
From source file:Main.java
public static void setStatusMessage(TextView statusText, ProgressBar progressBar, String message) { statusText.setVisibility(View.VISIBLE); progressBar.setVisibility(View.VISIBLE); statusText.setText(message);//from ww w. j a va 2 s . c o m }
From source file:Main.java
public static void setFinishedStatusMessage(TextView statusText, ProgressBar progressBar, String message) { statusText.setVisibility(View.VISIBLE); progressBar.setVisibility(View.INVISIBLE); statusText.setText(message);/*from w ww . jav a 2s .c om*/ }
From source file:com.cloverstudio.spika.utils.Utils.java
/** * //www .j a va 2 s.c o m * @param fileId * @param imageView * @param progressBar * @param size * @param stubId */ public static void displayImage(String fileId, ImageView imageView, ProgressBar progressBar, String size, int stubId, boolean downloadFromUrl) { if (fileId != null && !fileId.equals("null") && !fileId.equals("")) { ImageLoader.getImageLoader().DisplayImage(fileId, imageView, progressBar, size, downloadFromUrl); } else { ImageLoader.getImageLoader().cancelDisplayTaskFor(imageView); imageView.setImageResource(stubId); progressBar.setVisibility(View.GONE); } }
From source file:com.myapps.upesse.upes_spefest.ui.utils.GlideUtil.java
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) public static void loadImage(String url, ImageView mPhotoView, final ProgressBar mProgress) { Context context = mPhotoView.getContext(); if (context != null || (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1)) { assert context != null; ColorDrawable cd = new ColorDrawable(ContextCompat.getColor(context, R.color.blue_grey_500)); mProgress.setEnabled(true);/*from ww w .j av a 2 s.c o m*/ Glide.with(context).load(url).listener(new RequestListener<String, GlideDrawable>() { @Override public boolean onException(Exception e, String model, Target<GlideDrawable> target, boolean isFirstResource) { mProgress.setVisibility(View.GONE); return false; } @Override public boolean onResourceReady(GlideDrawable resource, String model, Target<GlideDrawable> target, boolean isFromMemoryCache, boolean isFirstResource) { mProgress.setVisibility(View.GONE); return false; } }).placeholder(cd).crossFade().centerCrop().into(mPhotoView); } }
From source file:com.kubotaku.android.code4kyoto5374.BaseActivity.java
protected void enabledProgress(boolean enabled) { final ProgressBar progressBar = (ProgressBar) findViewById(R.id.progress); if (enabled) { progressBar.setVisibility(View.VISIBLE); } else {// www. ja v a 2 s . c om progressBar.setVisibility(View.GONE); } }
From source file:com.uowd.sport.nestdrecylerviews_vert_horizontal.ImagePagerAdapterMixCatalouge.java
@Override public Object instantiateItem(ViewGroup view, final int position) { final View imageLayout = inflater.inflate(R.layout.horizontal_item, view, false); final ImageView imageView = (ImageView) imageLayout.findViewById(R.id.random_image_view); final ProgressBar pBar = (ProgressBar) imageLayout.findViewById(R.id.progressBar); pBar.setVisibility(View.VISIBLE); pBar.getIndeterminateDrawable().setColorFilter(ContextCompat.getColor(ac, R.color.ColorPrimary), android.graphics.PorterDuff.Mode.MULTIPLY); imageView.setTag(position);//from w ww. j a v a 2s. c om String mCollectionType = "2"; Picasso.with(ac.getApplicationContext()) .load("https://gizbo.ae/GizboApp/GizboImages/catalogues/1155/" + mCollectionType + "/" + _mImagesName.get(position).replace("/thumbnails", "")) .into(imageView, new com.squareup.picasso.Callback() { @Override public void onSuccess() { pBar.setVisibility(View.GONE); } @Override public void onError() { //pBar.setVisibility(View.GONE); } }); view.addView(imageLayout, 0); return imageLayout; }
From source file:com.m2dl.mini_projet.mini_projet_android.fragment.MarkerDialogFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.marker_view, container, false); if (getArguments() != null) { ImageView bitmapDialog = (ImageView) v.findViewById(R.id.imageView); ProgressBar progress = (ProgressBar) v.findViewById(R.id.loadingPanel); progress.setVisibility(View.VISIBLE); BitmapUtil.loadBitmap(bitmapDialog, progress, getArguments().getString(ARG_URL)); TextView pseudoTV = (TextView) v.findViewById(R.id.textViewPseudo); pseudoTV.setText(pseudoTV.getText() + getArguments().getString(ARG_AUTHOR)); TextView dateTV = (TextView) v.findViewById(R.id.textViewDate); dateTV.setText(dateTV.getText() + dateFormatting(getArguments().getString(ARG_DATE))); TextView tagsTV = (TextView) v.findViewById(R.id.textViewTags); String tags = ""; for (String str : getArguments().getStringArrayList(ARG_TAGS)) { tags = tags + " " + str; }//from ww w .j av a 2 s . co m tagsTV.setText(tagsTV.getText() + tags); } getDialog().setTitle("Visualisation du marker"); Button buttonFermer = (Button) v.findViewById(R.id.buttonFermer); buttonFermer.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { getDialog().dismiss(); } }); return v; }
From source file:id.zelory.benih.ui.view.BenihImageView.java
public void setImageUrl(String url, final ProgressBar progressBar) { imageUrl = url;//from w w w. jav a 2 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; } }).into(this); }