本文整理汇总了Java中android.support.v4.widget.ContentLoadingProgressBar类的典型用法代码示例。如果您正苦于以下问题:Java ContentLoadingProgressBar类的具体用法?Java ContentLoadingProgressBar怎么用?Java ContentLoadingProgressBar使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ContentLoadingProgressBar类属于android.support.v4.widget包,在下文中一共展示了ContentLoadingProgressBar类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import android.support.v4.widget.ContentLoadingProgressBar; //导入依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ascii_art);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
setTitle(R.string.ascii_art);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
mRecyclerView = (RecyclerView) findViewById(R.id.recycle_view);
mRecyclerView.setHasFixedSize(true);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mAdapter = new ImageAsciiAdapter(this);
mRecyclerView.setAdapter(mAdapter);
mProgressBar = (ContentLoadingProgressBar) findViewById(R.id.progress_bar);
mPresenter = new EmoticonPresenter(this, this);
loadAdViewIfNeed();
}
示例2: initView
import android.support.v4.widget.ContentLoadingProgressBar; //导入依赖的package包/类
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();
}
示例3: onCreate
import android.support.v4.widget.ContentLoadingProgressBar; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//WikiEntry feature component scope start here
((CleanArchApp)getApplication()).buildWikiEntryComponent();
setContentView(R.layout.activity_main);
title = (EditText) findViewById(R.id.entryTitle);
TextView extract = (TextView) findViewById(R.id.entryDetails);
Button submitButton = (Button) findViewById(R.id.submitButton);
submitButton.setOnClickListener(submitButtonOnClickListener);
progressBar = (ContentLoadingProgressBar) findViewById(R.id.progressBar);
wikiEntryViewModel = ViewModelProviders.of(this).get(WikiEntryViewModel.class);
wikiEntryViewModel.getWikiEntry().observe(this, wikiEntry -> {
Log.d(TAG, "received update for wikiEntry");
extract.setText(wikiEntry.getExtract());
progressBar.hide();
});
}
示例4: assignViews
import android.support.v4.widget.ContentLoadingProgressBar; //导入依赖的package包/类
@Override protected void assignViews(View itemView) {
emptyReviewsLayout = itemView.findViewById(R.id.empty_reviews_layout);
ratingLayout = itemView.findViewById(R.id.rating_layout);
commentsLayout = itemView.findViewById(R.id.comments_layout);
usersVotedTextView = (TextView) itemView.findViewById(R.id.users_voted);
emptyReviewTextView = (TextView) itemView.findViewById(R.id.empty_review_text);
ratingValue = (TextView) itemView.findViewById(R.id.rating_value);
ratingBar = (RatingBar) itemView.findViewById(R.id.rating_bar);
rateThisButton = (Button) itemView.findViewById(R.id.rate_this_button);
rateThisButtonLarge = (Button) itemView.findViewById(R.id.rate_this_button2);
readAllButton = (Button) itemView.findViewById(R.id.read_all_button);
topReviewsList = (RecyclerView) itemView.findViewById(R.id.top_comments_list);
topReviewsProgress =
(ContentLoadingProgressBar) itemView.findViewById(R.id.top_comments_progress);
}
示例5: onFinishInflate
import android.support.v4.widget.ContentLoadingProgressBar; //导入依赖的package包/类
protected final void onFinishInflate()
{
super.onFinishInflate();
this.a = ((Switch)findViewById(ehr.R));
this.c = findViewById(ehr.S);
this.b = ((Switch)findViewById(ehr.T));
this.d = ((TextView)findViewById(ehr.U));
this.e = ((ContentLoadingProgressBar)findViewById(ehr.M));
String str1 = efj.a(getContext(), "plus_profile_tab", "https://support.google.com/plus/?hl=%locale%").toString();
String str2 = getContext().getString(aw.A, new Object[] { str1 });
if (efj.aaz == null) {
efj.aaz = new lwi();
}
SpannableStringBuilder localSpannableStringBuilder = new SpannableStringBuilder(Html.fromHtml(str2, null, efj.aaz));
lxw.a(localSpannableStringBuilder, null, false);
this.d.setText(localSpannableStringBuilder);
this.d.setMovementMethod(lxy.a());
this.f = findViewById(ehr.Q);
this.a.setOnClickListener(new gxn(this));
this.b.setOnClickListener(new gxn(this));
this.g = ((dij)mbb.a(getContext(), dij.class));
}
示例6: onCreate
import android.support.v4.widget.ContentLoadingProgressBar; //导入依赖的package包/类
@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);
}
示例7: onCreate
import android.support.v4.widget.ContentLoadingProgressBar; //导入依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_emoticons);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
setTitle(R.string.emoticons);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
mHeader = (RecyclerView) findViewById(R.id.recycle_view_header);
mHeader.setHasFixedSize(true);
mHeader.setLayoutManager(new LinearLayoutManager(this));
mAdapter = new HeaderAdapter(this);
mHeader.setAdapter(mAdapter);
mHeader.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL));
mAdapter.setListener(this);
mProgressBar = (ContentLoadingProgressBar) findViewById(R.id.progress_bar);
mProgressBar.hide();
mContent = (RecyclerView) findViewById(R.id.recycle_view_content);
mContent.setHasFixedSize(true);
mContent.setLayoutManager(new GridLayoutManager(this, 1));
mContentAdapter = new EmoticonsAdapter(this);
mContent.setAdapter(mContentAdapter);
loadAdViewIfNeed();
SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(this);
String lastPath = pref.getString("last_path", "");
if (!lastPath.isEmpty()) {
onHeaderClick(lastPath);
}
}
示例8: bindViews
import android.support.v4.widget.ContentLoadingProgressBar; //导入依赖的package包/类
@Override public void bindViews(View view) {
btn_status = (Button) view.findViewById(R.id.btn_status);
tv_key = (TextView) view.findViewById(R.id.tv_key);
progress = (ContentLoadingProgressBar) view.findViewById(R.id.progress);
checkBox = (AppCompatCheckBox) view.findViewById(R.id.checkbox);
rootView = view;
}
示例9: StandViewHolder
import android.support.v4.widget.ContentLoadingProgressBar; //导入依赖的package包/类
public StandViewHolder(View itemView) {
super(itemView);
progressBar = (ContentLoadingProgressBar) itemView.findViewById(R.id.progress_bar);
container = itemView.findViewById(R.id.ll_container);
header = (ImageView) itemView.findViewById(R.id.iv_header);
logo = (ImageView) itemView.findViewById(R.id.iv_logo);
title = (TextView) itemView.findViewById(R.id.tv_title);
}
示例10: onViewCreated
import android.support.v4.widget.ContentLoadingProgressBar; //导入依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
// Toolbar
Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
AppCompatActivity activity = (AppCompatActivity) getActivity();
activity.setSupportActionBar(toolbar);
if (activity.getSupportActionBar() != null) {
activity.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
activity.getSupportActionBar().setTitle(R.string.results_view_toolbar_title);
activity.getSupportActionBar().setSubtitle(searchQuery);
}
setHasOptionsMenu(true);
// Progressbar
progressBar = (ContentLoadingProgressBar) view.findViewById(R.id.search_progress_bar);
// Recycler view
recyclerView = (RecyclerView) view.findViewById(R.id.search_recycler_view);
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
recyclerView.setLayoutManager(layoutManager);
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(recyclerView.getContext(),
layoutManager.getOrientation());
recyclerView.addItemDecoration(dividerItemDecoration);
recyclerView.setAdapter(adapter);
// We need to run the AsyncTask here instead of onCreate so we know that ProgressBar has been
// instantiated. If we run it on onCreate the AsyncTask will try to show a ProgressBar on a
// possible non-existing ProgressBar and crash.
task = new SearchDatabaseTask(listener, helper, searchQuery, searchType).execute();
}
示例11: onCreateView
import android.support.v4.widget.ContentLoadingProgressBar; //导入依赖的package包/类
@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;
}
示例12: onCreateView
import android.support.v4.widget.ContentLoadingProgressBar; //导入依赖的package包/类
@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;
}
示例13: onCreateView
import android.support.v4.widget.ContentLoadingProgressBar; //导入依赖的package包/类
@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;
}
示例14: onCreateView
import android.support.v4.widget.ContentLoadingProgressBar; //导入依赖的package包/类
@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;
}
示例15: setProgressValue
import android.support.v4.widget.ContentLoadingProgressBar; //导入依赖的package包/类
@BindingAdapter("progressValue")
public static void setProgressValue(ContentLoadingProgressBar progressBar, int progressValue) {
ObjectAnimator objectAnimator = ObjectAnimator.ofInt(progressBar, "progress", 0, progressValue);
objectAnimator.setDuration(350);
objectAnimator.setStartDelay(250);
objectAnimator.start();
}