android.support.v4.widget.ContentLoadingProgressBar Java Examples
The following examples show how to use
android.support.v4.widget.ContentLoadingProgressBar.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StudyFragment.java From Alibaba-Android-Certification with MIT License | 6 votes |
private void loadData(){ // ((ContentLoadingProgressBar)$(R.id.study_load)).show(); VISIBLE($(R.id.study_load)); DataManager.getInstance().readListAsync(mContext, CACHE_HISTORY_STUDY, new DataManager.OnReadListener() { @Override public void onSuccess(Object mObj) { ArrayList<QuestionModel> list= (ArrayList<QuestionModel>) mObj; ((ContentLoadingProgressBar)$(R.id.study_load)).hide(); $(R.id.t_start).setEnabled(true); if(list!=null&&list.size()>0){ int current= (int) SessionData.getObject(mContext,SP_STUDY_LAST_CURRENT,0); setText(R.id.study_start_tip,current==0?"开始练习":"上次做到第"+current+"题"); VISIBLE($(R.id.study_delete)); }else{ GONE($(R.id.study_delete)); setText(R.id.study_start_tip,""); } } }); }
Example #2
Source File: XposedAppManagerActivity.java From timecat with Apache License 2.0 | 6 votes |
private void initView() { mSelectedApplicationInfos = new HashSet<>(); mLoadingProgressBar = (ContentLoadingProgressBar) findViewById(R.id.loading); mAppListView = (RecyclerView) findViewById(R.id.app_list); mLoadingProgressBar.show(); final Handler handler = new Handler(); new Thread(new Runnable() { @Override public void run() { queryFilterAppInfo(); querySelectedApp(); handler.post(new Runnable() { @Override public void run() { mLoadingProgressBar.hide(); initAppList(); mAppListView.setVisibility(View.VISIBLE); } }); } }).start(); }
Example #3
Source File: WebViewActivity.java From android with MIT License | 6 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mPage = getIntent().getStringExtra(Const.BundleKeys.PAGE); setContentView(R.layout.activity_webview); setTitle(null); getSupportActionBar().setElevation(0); // getSupportActionBar().setBackgroundDrawable( // ContextCompat.getDrawable(this, R.drawable.bg_webview_header)); mWebView = (WebView) findViewById(R.id.activity_main_webview); mWebView.setWebViewClient(new PrkngWebViewClient()); vProgressBar = (ContentLoadingProgressBar) findViewById(R.id.progress); // vProgressBar.getIndeterminateDrawable() // .setColorFilter(getResources().getColor(R.color.color_background), PorterDuff.Mode.SRC_IN); loadPage(mPage); }
Example #4
Source File: ContentLoadingProgressBarActivity.java From V.FlyoutTest with MIT License | 6 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.content_loading_progressbar); mBar = (ContentLoadingProgressBar)findViewById(R.id.progressbar); mShowButton = (Button)findViewById(R.id.show); mShowButton.setOnClickListener(this); mHideButton = (Button)findViewById(R.id.hide); mHideButton.setOnClickListener(this); mShowText = (TextView)findViewById(R.id.show_text); mShowTextDone = (TextView)findViewById(R.id.show_text_done); mHideText = (TextView)findViewById(R.id.hide_text); mHideTextDone = (TextView)findViewById(R.id.hide_text_done); mLastVisibility = mBar.getVisibility(); mBar.getViewTreeObserver().addOnGlobalLayoutListener(this); }
Example #5
Source File: MainActivity.java From HideImageMaker with Apache License 2.0 | 5 votes |
private void handleStartButtonEvent() { if (isInputImage1Ready && isInputImage2Ready) { isInputImage1Ready = isInputImage2Ready = false; new Thread() { @Override public void run() { isHanding = true; Bitmap bitmap1 = ((BitmapDrawable) ((ImageView) findViewById(R.id.input_image_view1)).getDrawable()).getBitmap(); Bitmap bitmap2 = ((BitmapDrawable) ((ImageView) findViewById(R.id.input_image_view2)).getDrawable()).getBitmap(); if (bitmap1.getByteCount() > bitmap2.getByteCount()) { bitmap1 = BitmapPixelUtil.scaleBitmap(bitmap1, bitmap2.getWidth(), bitmap2.getHeight()); } else if (bitmap1.getByteCount() < bitmap2.getByteCount()) { bitmap2 = BitmapPixelUtil.scaleBitmap(bitmap2, bitmap1.getWidth(), bitmap1.getHeight()); } Bitmap resultBitmap = BitmapPixelUtil.makeHideImage(bitmap1, bitmap2, progress -> runOnUiThread(() -> ((ContentLoadingProgressBar) findViewById(R.id.progress_bar)).setProgress((int) (progress * 100)))); runOnUiThread(() -> { ((ImageView) findViewById(R.id.output_image_view)).setImageBitmap(resultBitmap); isInputImage1Ready = isInputImage2Ready = true; isHanding = false; Snackbar snackbar = MySnackBar.show(findViewById(R.id.root_view), getString(R.string.finish), Snackbar.LENGTH_INDEFINITE); try { Snackbar.SnackbarLayout root = (Snackbar.SnackbarLayout) snackbar.getView(); SnackbarContentLayout contentLayout = (SnackbarContentLayout) root.getChildAt(0); Class<SnackbarContentLayout> clazz = SnackbarContentLayout.class; Method method = clazz.getDeclaredMethod("getMessageView"); method.setAccessible(true); TextView tv = (TextView) method.invoke(contentLayout); tv.setMaxLines(10); } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { e.printStackTrace(); } snackbar.setAction(R.string.i_know, v -> snackbar.dismiss()).setActionTextColor(getResources().getColor(R.color.md_green_A400)); }); } }.start(); } }
Example #6
Source File: HousesListFragment.java From Game-of-Thrones with Apache License 2.0 | 5 votes |
@Override public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) { initDagger(); View rootView = inflater.inflate(R.layout.fragment_list, container, false); rv = (RecyclerView) rootView.findViewById(R.id.recycler_view); pb = (ContentLoadingProgressBar) rootView.findViewById(R.id.content_loading_progress_bar); gotHouseListPresenter.setView(this); gotHouseListPresenter.init(); return rootView; }
Example #7
Source File: CharacterListByHouseFragment.java From Game-of-Thrones with Apache License 2.0 | 5 votes |
@Override public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) { initDagger(); View rootView = inflater.inflate(R.layout.fragment_list, container, false); rv = (RecyclerView) rootView.findViewById(R.id.recycler_view); pb = (ContentLoadingProgressBar) rootView.findViewById(R.id.content_loading_progress_bar); characterListByHousePresenter.setView(this); characterListByHousePresenter.init(house); return rootView; }
Example #8
Source File: CharacterListFragment.java From Game-of-Thrones with Apache License 2.0 | 5 votes |
@Override public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) { initDagger(); View rootView = inflater.inflate(R.layout.fragment_list, container, false); recyclerView = (RecyclerView) rootView.findViewById(R.id.recycler_view); progressBar = (ContentLoadingProgressBar) rootView.findViewById(R.id.content_loading_progress_bar); gotCharacterListPresenter.setView(this); gotCharacterListPresenter.init(); return rootView; }
Example #9
Source File: UserListFragment.java From Game-of-Thrones with Apache License 2.0 | 5 votes |
@Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_list, container, false); recyclerView = (RecyclerView) rootView.findViewById(R.id.recycler_view); progressBar = (ContentLoadingProgressBar) rootView.findViewById(R.id.content_loading_progress_bar); initUi(); return rootView; }
Example #10
Source File: AboutFragment.java From ESeal with Apache License 2.0 | 4 votes |
@Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_about, container, false); aboutContent = view.findViewById(R.id.about_content); webContent = view.findViewById(R.id.web_content); webView = (WebView) view.findViewById(R.id.webView); progressBar = (ContentLoadingProgressBar) view.findViewById(R.id.progress); webErrorContent = view.findViewById(R.id.web_error_content); appVersionName = (AppCompatTextView) view.findViewById(R.id.app_version_name); appNewVersionHint = (AppCompatTextView) view.findViewById(R.id.app_new_version_hint); appNewVersionName = (AppCompatTextView) view.findViewById(R.id.app_new_version_name); String versionName = VersionHelper.getVersionName(getContext()); appVersionName.setText(versionName); view.findViewById(R.id.update_version_area).setOnClickListener(__ -> mPresenter.checkUpdateVersion(false)); view.findViewById(R.id.app_introduction).setOnClickListener(__ -> showIntroduction()); view.findViewById(R.id.app_thanks).setOnClickListener(__ -> showThanks()); view.findViewById(R.id.app_about_me).setOnClickListener(__ -> showAboutMe()); toolbar = (Toolbar) getActivity().findViewById(R.id.toolbar); toolbar.setNavigationOnClickListener(__ -> { if (webContent.getVisibility() == View.VISIBLE) { webContent.setVisibility(View.GONE); aboutContent.setVisibility(View.VISIBLE); toolbar.setTitle(R.string.about); } else if (webContent.getVisibility() == View.GONE) { getActivity().onBackPressed(); } }); setupWebView(); return view; }
Example #11
Source File: ResourceLoadingIndicator.java From Pioneer with Apache License 2.0 | 4 votes |
public ResourceLoadingIndicator(View loadingView) { view = loadingView; progressBar = (ContentLoadingProgressBar) view.findViewById(android.R.id.progress); textView = (TextView) view.findViewById(android.R.id.text1); }
Example #12
Source File: SupportCoreUiDSL.java From anvil with MIT License | 4 votes |
public static BaseDSL.ViewClassResult contentLoadingProgressBar() { return BaseDSL.v(ContentLoadingProgressBar.class); }
Example #13
Source File: SupportCoreUiDSL.java From anvil with MIT License | 4 votes |
public static Void contentLoadingProgressBar(Anvil.Renderable r) { return BaseDSL.v(ContentLoadingProgressBar.class, r); }
Example #14
Source File: ResourceLoadingIndicator.java From Pioneer with Apache License 2.0 | 4 votes |
public ResourceLoadingIndicator(View loadingView) { view = loadingView; progressBar = (ContentLoadingProgressBar) view.findViewById(android.R.id.progress); textView = (TextView) view.findViewById(android.R.id.text1); }