Java 类android.support.v4.widget.ContentLoadingProgressBar 实例源码
项目:ascii_generate
文件:ImageAsciiActivity.java
@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();
}
项目:Bigbang
文件:FloatViewWhiteListActivity.java
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();
}
项目:Bigbang
文件:WhiteListActivity.java
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();
}
项目:Bigbang
文件:XposedAppManagerActivity.java
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();
}
项目:Android-CleanArchitecture-Java
文件:WikiEntryActivity.java
@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();
});
}
项目:aptoide-client-v8
文件:AppViewRateAndReviewsWidget.java
@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);
}
项目:FMTech
文件:ProfileEditorFlairsView.java
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));
}
项目:V.FlyoutTest
文件:ContentLoadingProgressBarActivity.java
@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);
}
项目:ascii_generate
文件:EmoticonsActivity.java
@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);
}
}
项目:RxJavaDownLoadMultipleFile
文件:DownLoadItem.java
@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;
}
项目:Mediator_Android
文件:PlanStandsListAdapter.java
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);
}
项目:Ikue
文件:SearchResultFragment.java
@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();
}
项目:Game-of-Thrones
文件:HousesListFragment.java
@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;
}
项目:Game-of-Thrones
文件:CharacterListByHouseFragment.java
@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;
}
项目:Game-of-Thrones
文件:CharacterListFragment.java
@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;
}
项目:Game-of-Thrones
文件:UserListFragment.java
@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;
}
项目:RecipeFinderJavaVersion
文件:DataBinder.java
@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();
}
项目:Chateau
文件:ImageMessageViewHolder.java
public ImageMessageViewHolder(@NonNull View itemView) {
super(itemView);
mMessageImage = (SimpleDraweeView) itemView.findViewById(R.id.message_image);
mImageProgress = (ContentLoadingProgressBar) itemView.findViewById(R.id.message_imageProgress);
final Resources resources = itemView.getResources();
final int shortAnimTime = resources.getInteger(android.R.integer.config_shortAnimTime);
final GenericDraweeHierarchy hierarchy = new GenericDraweeHierarchyBuilder(resources)
.setFadeDuration(shortAnimTime)
.setProgressBarImage(new ImageLoadingDrawable(resources))
.setFailureImage(resources.getDrawable(R.drawable.ic_upload_failed), ScalingUtils.ScaleType.CENTER_INSIDE)
.setActualImageScaleType(ScalingUtils.ScaleType.FIT_CENTER)
.build();
mMessageImage.setHierarchy(hierarchy);
}
项目:Curso-Testing-on-Android
文件:HomeActivity.java
@Override
public void initUi() {
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
informationCase = (TextView) findViewById(R.id.empty_and_error_case);
progressBar = (ContentLoadingProgressBar) findViewById(R.id.content_loading_progress_bar);
initRecyclerView();
initFAB();
addFABScrollBehavior();
}
项目:appkit
文件:CBActivityMvpToolbar.java
@NonNull @Override protected View createLoadingView() {
ContentLoadingProgressBar loadingView = (ContentLoadingProgressBar) super.createLoadingView();
loadingView.getIndeterminateDrawable()
.setColorFilter(ContextCompat.getColor(this, R.color.cb_progressbar_color), PorterDuff.Mode.SRC_ATOP);
return loadingView;
}
项目:binea_project_for_android
文件:MainActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mProgressBar = (HorizontalProgressBar) findViewById(R.id.id_progressbar01);
mHandler.sendEmptyMessage(MSG_PROGRESS_UPDATE);
ContentLoadingProgressBar content_progress_bar = (ContentLoadingProgressBar) findViewById(R.id.content_progress_bar);
content_progress_bar.show();
}
项目:GitHub
文件:SearchFragment.java
@Override
public void initViews(View view) {
Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
((SearchActivity)(getActivity())).setSupportActionBar(toolbar);
((SearchActivity)(getActivity())).getSupportActionBar().setDisplayHomeAsUpEnabled(true);
searchView = (SearchView) view.findViewById(R.id.searchView);
searchView.setIconified(false);
recyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
progressBar = (ContentLoadingProgressBar) view.findViewById(R.id.progressBar);
}
项目:Crypto-Assistant
文件:MWebFragment.java
/**
* Initialize recyclerview and adapters.
* call adapter.notifyDataSetChanged if the realm for currency is updated
*/
private void initializeViews(View rootView) {
webView = (WebView) rootView.findViewById(R.id.webview);
contentpbar = (ContentLoadingProgressBar) rootView.findViewById(R.id.contentpbar);
}
项目:LianXiZhihu
文件:SearchFragment.java
@Override
public void initViews(View view) {
Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
((SearchActivity)(getActivity())).setSupportActionBar(toolbar);
((SearchActivity)(getActivity())).getSupportActionBar().setDisplayHomeAsUpEnabled(true);
searchView = (SearchView) view.findViewById(R.id.searchView);
searchView.setIconified(false);
recyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
progressBar = (ContentLoadingProgressBar) view.findViewById(R.id.progressBar);
}
项目:ESeal
文件:AboutFragment.java
@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;
}
项目:got-challenge-for-android
文件:HomeActivity.java
@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_list, container, false);
final ContentLoadingProgressBar pb = (ContentLoadingProgressBar) rootView.findViewById(R.id.pb);
RecyclerView rv = (RecyclerView) rootView.findViewById(R.id.rv);
final GoTAdapter adp = new GoTAdapter(getActivity());
rv.setLayoutManager(new LinearLayoutManager(getActivity()));
rv.setHasFixedSize(true);
rv.setAdapter(adp);
new Thread(new Runnable() {
@Override
public void run() {
String url = "https://project-8424324399725905479.firebaseio.com/characters.json?print=pretty";
URL obj = null;
try {
obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
Type listType = new TypeToken<ArrayList<GoTCharacter>>() {
}.getType();
final List<GoTCharacter> characters = new Gson().fromJson(response.toString(), listType);
GoTListFragment.this.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
adp.addAll(characters);
adp.notifyDataSetChanged();
pb.hide();
}
});
} catch (IOException e) {
Log.e(TAG, e.getLocalizedMessage());
}
}
}).start();
return rootView;
}
项目:got-challenge-for-android
文件:HomeActivity.java
@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_list, container, false);
final ContentLoadingProgressBar pb = (ContentLoadingProgressBar) rootView.findViewById(R.id.pb);
RecyclerView rv = (RecyclerView) rootView.findViewById(R.id.rv);
final GoTHouseAdapter adp = new GoTHouseAdapter(getActivity());
rv.setLayoutManager(new LinearLayoutManager(getActivity()));
rv.setHasFixedSize(true);
rv.setAdapter(adp);
new Thread(new Runnable() {
@Override
public void run() {
String url = "https://project-8424324399725905479.firebaseio.com/characters.json?print=pretty";
URL obj = null;
try {
obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
Type listType = new TypeToken<ArrayList<GoTCharacter>>() {
}.getType();
final List<GoTCharacter> characters = new Gson().fromJson(response.toString(), listType);
GoTHousesListFragment.this.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
ArrayList<GoTCharacter.GoTHouse> hs = new ArrayList<GoTCharacter.GoTHouse>();
for (int i = 0; i < characters.size(); i++) {
boolean b = false;
for (int j = 0; j < hs.size(); j++) {
if (hs.get(j).n.equalsIgnoreCase(characters.get(i).hn)) {
b = true;
}
}
if (!b) {
if (characters.get(i).hi != null && !characters.get(i).hi.isEmpty()) {
GoTCharacter.GoTHouse h = new GoTCharacter.GoTHouse();
h.i = characters.get(i).hi;
h.n = characters.get(i).hn;
h.u = characters.get(i).hu;
hs.add(h);
b = false;
}
}
}
adp.addAll(hs);
adp.notifyDataSetChanged();
pb.hide();
}
});
} catch (IOException e) {
Log.e(TAG, e.getLocalizedMessage());
}
}
}).start();
return rootView;
}
项目:Pioneer
文件:ResourceLoadingIndicator.java
public ResourceLoadingIndicator(View loadingView) {
view = loadingView;
progressBar = (ContentLoadingProgressBar) view.findViewById(android.R.id.progress);
textView = (TextView) view.findViewById(android.R.id.text1);
}
项目:BlogClient
文件:MyRecyclerViewAdapter.java
public FooterViewHolder(View view) {
super(view);
progressBar = (ContentLoadingProgressBar) view.findViewById(R.id.progressbar);
footerText = (TextView) view.findViewById(R.id.footer_text);
}
项目:Atlas-Android
文件:ThreePartImageCellFactory.java
public CellHolder(View view) {
mImageView = (ImageView) view.findViewById(R.id.cell_image);
mProgressBar = (ContentLoadingProgressBar) view.findViewById(R.id.cell_progress);
}
项目:Atlas-Android
文件:SinglePartImageCellFactory.java
public CellHolder(View view) {
mImageView = (ImageView) view.findViewById(R.id.cell_image);
mProgressBar = (ContentLoadingProgressBar) view.findViewById(R.id.cell_progress);
}
项目:Atlas-Android
文件:TextCellFactory.java
public CellHolder(View view) {
mTextView = (TextView) view.findViewById(R.id.cell_text);
mProgressBar = (ContentLoadingProgressBar) view.findViewById(R.id.text_cell_progress);
}
项目:Atlas-Android
文件:LocationCellFactory.java
public CellHolder(View view) {
mImageView = (ImageView) view.findViewById(R.id.cell_image);
mProgressBar = (ContentLoadingProgressBar) view.findViewById(R.id.cell_progress);
}
项目:Atlas-Android
文件:AtlasImagePopupActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setBackgroundDrawableResource(R.color.atlas_image_popup_background);
setContentView(R.layout.atlas_image_popup);
mImageView = (SubsamplingScaleImageView) findViewById(R.id.image_popup);
mProgressBar = (ContentLoadingProgressBar) findViewById(R.id.image_popup_progress);
mImageView.setPanEnabled(true);
mImageView.setZoomEnabled(true);
mImageView.setDoubleTapZoomDpi(160);
mImageView.setMinimumDpi(80);
mImageView.setBitmapDecoderClass(MessagePartDecoder.class);
mImageView.setRegionDecoderClass(MessagePartRegionDecoder.class);
Intent intent = getIntent();
if (intent == null) return;
mMessagePartId = intent.getParcelableExtra("fullId");
Uri previewId = intent.getParcelableExtra("previewId");
ThreePartImageCellFactory.Info info = intent.getParcelableExtra("info");
mProgressBar.show();
if (previewId != null && info != null) {
// ThreePartImage
switch (info.orientation) {
case ThreePartImageUtils.ORIENTATION_0:
mImageView.setOrientation(SubsamplingScaleImageView.ORIENTATION_0);
mImageView.setImage(
ImageSource.uri(mMessagePartId).dimensions(info.width, info.height),
ImageSource.uri(previewId));
break;
case ThreePartImageUtils.ORIENTATION_90:
mImageView.setOrientation(SubsamplingScaleImageView.ORIENTATION_270);
mImageView.setImage(
ImageSource.uri(mMessagePartId).dimensions(info.height, info.width),
ImageSource.uri(previewId));
break;
case ThreePartImageUtils.ORIENTATION_180:
mImageView.setOrientation(SubsamplingScaleImageView.ORIENTATION_180);
mImageView.setImage(
ImageSource.uri(mMessagePartId).dimensions(info.width, info.height),
ImageSource.uri(previewId));
break;
case ThreePartImageUtils.ORIENTATION_270:
mImageView.setOrientation(SubsamplingScaleImageView.ORIENTATION_90);
mImageView.setImage(
ImageSource.uri(mMessagePartId).dimensions(info.height, info.width),
ImageSource.uri(previewId));
break;
}
} else {
// SinglePartImage
mImageView.setImage(ImageSource.uri(mMessagePartId));
}
mImageView.setOnImageEventListener(this);
}
项目:Pioneer
文件:ResourceLoadingIndicator.java
public ResourceLoadingIndicator(View loadingView) {
view = loadingView;
progressBar = (ContentLoadingProgressBar) view.findViewById(android.R.id.progress);
textView = (TextView) view.findViewById(android.R.id.text1);
}