本文整理汇总了Java中fr.castorflex.android.smoothprogressbar.SmoothProgressBar类的典型用法代码示例。如果您正苦于以下问题:Java SmoothProgressBar类的具体用法?Java SmoothProgressBar怎么用?Java SmoothProgressBar使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SmoothProgressBar类属于fr.castorflex.android.smoothprogressbar包,在下文中一共展示了SmoothProgressBar类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreateView
import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.choose_recipient, container, false);
getActivity().setTitle(getString(R.string.choose_recipient_title));
initCourseSpinner();
initRecycleView();
progressBar = (SmoothProgressBar) rootView.findViewById(R.id.progressbar);
if (loaded) {
progressBar.setVisibility(View.GONE);
} else {
progressBar.setVisibility(View.VISIBLE);
}
return rootView;
}
示例2: onCreateView
import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Inflate the layout for this fragment
View rootView = inflater.inflate(R.layout.fragment_file_browser, container, false);
getActivity().setTitle(R.string.btn_file_browser);
progressBar = (SmoothProgressBar) rootView.findViewById(R.id.progressbar);
if (filesLoaded || foldersLoaded) {
progressBar.setVisibility(View.GONE);
} else {
progressBar.setVisibility(View.VISIBLE);
}
initRecycleView(rootView);
mainList.setVisibility(View.VISIBLE);
noContentTextView = (TextView) rootView.findViewById(R.id.noContentTextview);
return rootView;
}
示例3: onCreateView
import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_course, container, false);
// Set toolbar title to course name
getActivity().setTitle(course.getTrimmedName());
progressbar = (SmoothProgressBar) rootView.findViewById(R.id.progressbar);
initRecycleView(rootView);
// Hide progress bar if data is already loaded
if (isLoaded()) {
progressbar.setVisibility(View.GONE);
mainList.setVisibility(View.VISIBLE);
} else {
progressbar.setVisibility(View.VISIBLE);
}
return rootView;
}
示例4: onCreateView
import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_recycler_view, container, false);
getActivity().setTitle(R.string.course_title);
smoothProgressBar = (SmoothProgressBar) rootView.findViewById(R.id.progressbar);
initRecycleView(rootView);
// Hide progress bar if data is already loaded
if (loaded) {
smoothProgressBar.setVisibility(View.GONE);
} else {
smoothProgressBar.setVisibility(View.VISIBLE);
}
return rootView;
}
示例5: onCreateView
import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_recycler_view, container, false);
progressBar = (SmoothProgressBar) rootView.findViewById(R.id.progressbar);
// Hide progress bar if data is already loaded
if (loaded) {
progressBar.setVisibility(View.GONE);
} else {
progressBar.setVisibility(View.VISIBLE);
}
// Set label for toolbar
getActivity().setTitle(getString(R.string.announcements_title));
initRecycleView(rootView);
initOnClickListener();
return rootView;
}
示例6: onCreateView
import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.fragment_conversation, container, false);
progressbar = (SmoothProgressBar) rootView.findViewById(R.id.progressbar);
initRecycleView();
initFabButton();
if (loaded) {
fab.setEnabled(true);
progressbar.setVisibility(View.GONE);
} else {
fab.setEnabled(false);
progressbar.setVisibility(View.VISIBLE);
}
return rootView;
}
示例7: initView
import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; //导入依赖的package包/类
private void initView() {
mView = (CoordinatorLayout) findViewById(R.id.coordinator_layout);
mPocketBar = (SmoothProgressBar) findViewById(R.id.pocketProgressBar);
mPocketBar.setSmoothProgressDrawableCallbacks(new SmoothProgressDrawable.Callbacks() {
@Override
public void onStop() {
mPocketBar.setVisibility(View.INVISIBLE);
}
@Override
public void onStart() {
mPocketBar.setVisibility(View.VISIBLE);
}
});
fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(this);
mSnackbar = Snackbar.make(mView, getString(R.string.fetch_token_msg), Snackbar.LENGTH_INDEFINITE);
}
示例8: LoadingDialog
import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; //导入依赖的package包/类
/**
* Default constructor
* @param context - Application context.
*/
public LoadingDialog(Context context){
this.context = context;
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this.context);
LayoutInflater inflater = LayoutInflater.from(this.context);
dialogView = inflater.inflate(R.layout.ui_loading_dialog, null);
this.title = (TextView) dialogView.findViewById(R.id.dialog_title);
this.title.setText("");
this.message= (TextView) dialogView.findViewById(R.id.dialog_message);
this.message.setText("");
this.message.setMovementMethod(new ScrollingMovementMethod());
this.progressView = (SmoothProgressBar) dialogView.findViewById(R.id.progress_bar);
this.postiveButton = (FloatingActionButton) dialogView.findViewById(R.id.pos);
this.postiveButton.hide(false);
this.postiveButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
dismiss();
}
});
dialogBuilder.setView(dialogView);
dialog = dialogBuilder.create();
this.dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
if (allowAnimation)
dialog.getWindow().getAttributes().windowAnimations = R.style.customDialogAnimation;
}
示例9: onViewCreated
import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; //导入依赖的package包/类
@Override
public void onViewCreated(Activity activity, View headerView, int progresBarColor) {
mHeaderView = headerView;
// Get ProgressBar and MenuSlidingTabStrip
mHeaderProgressBar = (SmoothProgressBar) headerView.findViewById(R.id.pm_progress);
mSlidingTabStrip = (MenuSlidingTabStrip)headerView.findViewById(R.id.menuIndicator);
mContentLayout = (ViewGroup) headerView.findViewById(R.id.pm_content);
mAnimationDuration = activity.getResources().getInteger(android.R.integer.config_shortAnimTime);
// mProgressDrawableColor = activity.getResources().getColor(R.color.default_progress_bar_color);
// Setup the View styles
setupViewsFromStyles(activity, headerView);
//applyProgressBarStyle();
setProgressBarColor(progresBarColor);
// Apply any custom ProgressBar colors and corner radius
applyProgressBarSettings();
// FIXME: I do not like this call here
onReset();
}
示例10: onCreate
import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_view_story);
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
width = size.x;
db = new DatabaseHandler(this);
funcs = new NetworkFunctions();
pref = new SharedPref(this);
layout = (RelativeLayout)findViewById(R.id.view_story_progress_layout);
progressBar = (SmoothProgressBar)findViewById(R.id.pocket_view_story);
progressBar.setSmoothProgressDrawableBackgroundDrawable(SmoothProgressBarUtils.generateDrawableWithColors(getResources().getIntArray(R.array.pocket_background_colors), ((SmoothProgressDrawable) progressBar.getIndeterminateDrawable()).getStrokeWidth()));
dwn_txt = (TextView)findViewById(R.id.dwn_txt_view_story);
storyBody = (TextView)findViewById(R.id.news_body);
storyImage = (ImageView)findViewById(R.id.story_image);
headline = (TextView)findViewById(R.id.news_headline);
new GetArticleInfo().execute(pref.getSelectedNews());
}
示例11: RefreshNowProgressIndicator
import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; //导入依赖的package包/类
public RefreshNowProgressIndicator(final Context context, final AttributeSet attrs, final int defStyle) {
super(context, attrs, defStyle);
final Resources res = context.getResources();
final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.SmoothProgressBar, defStyle, 0);
final int color = a.getColor(R.styleable.SmoothProgressBar_spb_color, res.getColor(R.color.spb_default_color));
final int width = a.getDimensionPixelSize(R.styleable.SmoothProgressBar_spb_stroke_width,
R.dimen.spb_default_stroke_width);
a.recycle();
final IndicatorConfig.Builder builder = new IndicatorConfig.Builder(context);
builder.progressColor(color);
builder.progressStrokeWidth(width);
setConfig(builder.build());
setMax(1000);
setIndeterminate(false);
updateVisibility();
}
示例12: onCreateView
import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.fragment_conversation, container, false);
getActivity().setTitle(R.string.inbox_title);
progressbar = (SmoothProgressBar) rootView.findViewById(R.id.progressbar);
initRecyclerView(rootView);
if (loaded) {
progressbar.setVisibility(View.GONE);
} else {
progressbar.setVisibility(View.VISIBLE);
}
return rootView;
}
示例13: finView
import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; //导入依赖的package包/类
private void finView() {
mWebView = (WebView) findViewById(R.id.chapter_Detail);
mToolbar = (Toolbar) findViewById(R.id.mToolbar);
mSmoothProgressBar = (SmoothProgressBar) findViewById(R.id.web_progress);
mFloatingActionButton = (FloatingActionButton) findViewById(R.id.fab);
mArticle_share = (ImageButton) findViewById(R.id.article_share);
}
示例14: onCreateView
import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View frag = super.onCreateView(inflater, container, savedInstanceState);
View progress = frag.findViewById(R.id.progressbar);
if(progress instanceof SmoothProgressBar){
progressBar = (SmoothProgressBar) progress;
}
return frag;
}
示例15: onCreate
import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
db = new DatabaseHandler(this);
mPocketBar = (SmoothProgressBar) findViewById(R.id.pocket);
mPocketBar.setSmoothProgressDrawableBackgroundDrawable(SmoothProgressBarUtils.generateDrawableWithColors(getResources().getIntArray(R.array.pocket_background_colors), ((SmoothProgressDrawable) mPocketBar.getIndeterminateDrawable()).getStrokeWidth()));
dwntext = (TextView)findViewById(R.id.dwn_txt);
fadeIn = AnimationUtils.loadAnimation(this, R.anim.abc_fade_in);
fadeOut = AnimationUtils.loadAnimation(this, R.anim.abc_fade_out);
pushLeftIn = AnimationUtils.loadAnimation(this, R.anim.push_left_in);
pushLeftOut = AnimationUtils.loadAnimation(this, R.anim.push_left_out);
pushRightIn = AnimationUtils.loadAnimation(this, R.anim.push_right_in);
pushRightOut = AnimationUtils.loadAnimation(this, R.anim.push_right_out);
if(isNetworkAvailable()){
db.clearTempTables();
new LoadInitialData().execute();
} else {
//Proceed to offline reading activity
if(db.offlineAvailable()){
startActivity(new Intent(this, ViewOfflineActivity.class));
overridePendingTransition(R.anim.push_left_in, R.anim.fadeout);
finish();
} else {
Toast.makeText(SplashScreen.this, "Please turn on mobile data or WiFi", Toast.LENGTH_SHORT).show();
monitorNetwork();
}
}
}