本文整理汇总了Java中fr.castorflex.android.circularprogressbar.CircularProgressBar类的典型用法代码示例。如果您正苦于以下问题:Java CircularProgressBar类的具体用法?Java CircularProgressBar怎么用?Java CircularProgressBar使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CircularProgressBar类属于fr.castorflex.android.circularprogressbar包,在下文中一共展示了CircularProgressBar类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreateView
import fr.castorflex.android.circularprogressbar.CircularProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_universal, container, false);
progressBar = (CircularProgressBar) view.findViewById(R.id.progressBar);
mCustomErrorView = (CustomErrorView) view.findViewById(R.id.error);
recycler = (RecyclerView) view.findViewById(R.id.recycler);
recycler.setHasFixedSize(true);
int columns = (getResources().getConfiguration().orientation == ORIENTATION_PORTRAIT) ? 3 : 4;
RecyclerView.LayoutManager layoutManager = new GridLayoutManager(getContext(), columns);
recycler.setLayoutManager(layoutManager);
mLang = FragmentUtils.getFormatLocale(getActivity());
adapter = new PosterAdapter(getContext(), PEOPLE);
recycler.setAdapter(adapter);
FragmentUtils.updateProgressBar(progressBar, true);
return view;
}
示例2: onCreate
import fr.castorflex.android.circularprogressbar.CircularProgressBar; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
Log.d(TAG, "onCreate");
super.onCreate(savedInstanceState);
mLoginActivity = this;
requestPermissions();
PreferencesState.getInstance().initalizateActivityDependencies();
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
mLoginActivityStrategy.onCreate();
if (User.getLoggedUser() != null && !ProgressActivity.PULL_CANCEL
&& sharedPreferences.getBoolean(
getApplicationContext().getResources().getString(R.string.pull_metadata), false)) {
launchActivity(LoginActivity.this, DashboardActivity.class);
}
ProgressActivity.PULL_CANCEL = false;
getServerUrl().setText(R.string.login_info_dhis_default_server_url);
progressBar = (CircularProgressBar) findViewById(R.id.progress_bar_circular);
loginViewsContainer = (CardView) findViewById(R.id.layout_login_views);
}
示例3: setupPickers
import fr.castorflex.android.circularprogressbar.CircularProgressBar; //导入依赖的package包/类
private void setupPickers() {
textViewReportDate = (TextView) findViewById(R.id.textview_report_date);
linearLayoutCoordinates = (LinearLayout) findViewById(R.id.linearlayout_coordinates);
editTextLatitude = (EditText) findViewById(R.id.edittext_latitude);
editTextLongitude = (EditText) findViewById(R.id.edittext_longitude);
locationIcon = (AppCompatImageView) findViewById(R.id.imagevew_location);
locationIconCancel = (AppCompatImageView) findViewById(R.id.imagevew_location_cancel);
locationProgressBar = (CircularProgressBar) findViewById(R.id.progress_bar_circular_location);
locationButtonLayout = (FrameLayout) findViewById(R.id.button_location_layout);
// set on click listener to text view report date
textViewReportDate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
showDatePickerDialog();
}
});
// since coordinates are optional, initially they should be hidden
linearLayoutCoordinates.setVisibility(View.GONE);
}
示例4: onCreateView
import fr.castorflex.android.circularprogressbar.CircularProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
mLang = FragmentUtils.getFormatLocale(getActivity());
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_summary, container, false);
mCustomErrorView = (CustomErrorView) view.findViewById(R.id.error);
LinearLayout moreMovies = (LinearLayout) view.findViewById(R.id.home_in_theaters);
moreMovies.setOnClickListener(this);
mRecyclerViewMovies = (RecyclerView) view.findViewById(R.id.recycler_view_movies);
progressBarMovies = (CircularProgressBar) view.findViewById(R.id.progress_bar_movies);
mMovies = new ArrayList<>();
mAdapterMovies = new HomeMovieAdapter(mMovies);
LinearLayout moreTV = (LinearLayout) view.findViewById(R.id.home_on_tv);
moreTV.setOnClickListener(this);
mRecyclerViewTV = (RecyclerView) view.findViewById(R.id.recycler_view_tv);
progressBarTV = (CircularProgressBar) view.findViewById(R.id.progress_bar_tv);
mTVList = new ArrayList<>();
mAdapterTV = new HomeTVAdapter(mTVList);
LinearLayout morePeople = (LinearLayout) view.findViewById(R.id.home_people);
morePeople.setOnClickListener(this);
mRecyclerViewPeople = (RecyclerView) view.findViewById(R.id.recycler_view_people);
progressBarPeople = (CircularProgressBar) view.findViewById(R.id.progress_bar_people);
mPeople = new ArrayList<>();
mAdapterPeople = new HomePersonAdapter(mPeople);
return view;
}
示例5: onCreateView
import fr.castorflex.android.circularprogressbar.CircularProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_summary, container, false);
mCustomErrorView = (CustomErrorView) view.findViewById(R.id.error);
LinearLayout moreMovies = (LinearLayout) view.findViewById(R.id.home_in_theaters);
moreMovies.setOnClickListener(this);
mRecyclerViewMovies = (RecyclerView) view.findViewById(R.id.recycler_view_movies);
progressBarMovies = (CircularProgressBar) view.findViewById(R.id.progress_bar_movies);
TextView moviesTitle = (TextView) view.findViewById(R.id.movies_title);
moviesTitle.setText(getText(R.string.menu_option_movies));
mMovies = new ArrayList<>();
mAdapterMovies = new HomeMovieAdapter(mMovies);
LinearLayout moreTV = (LinearLayout) view.findViewById(R.id.home_on_tv);
moreTV.setOnClickListener(this);
mRecyclerViewTV = (RecyclerView) view.findViewById(R.id.recycler_view_tv);
progressBarTV = (CircularProgressBar) view.findViewById(R.id.progress_bar_tv);
TextView tvTitle = (TextView) view.findViewById(R.id.tv_title);
tvTitle.setText(getText(R.string.menu_option_tv_shows));
mTVList = new ArrayList<>();
mAdapterTV = new HomeTVAdapter(mTVList);
LinearLayout morePeople = (LinearLayout) view.findViewById(R.id.home_people);
morePeople.setOnClickListener(this);
mRecyclerViewPeople = (RecyclerView) view.findViewById(R.id.recycler_view_people);
progressBarPeople = (CircularProgressBar) view.findViewById(R.id.progress_bar_people);
mPeople = new ArrayList<>();
mAdapterPeople = new HomePersonAdapter(mPeople);
return view;
}
示例6: onCreateView
import fr.castorflex.android.circularprogressbar.CircularProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_universal, container, false);
progressBar = (CircularProgressBar) view.findViewById(R.id.progressBar);
mCustomErrorView = (CustomErrorView) view.findViewById(R.id.error);
SharedPreferences prefs = getActivity().getSharedPreferences(SHARED_PREF_NAME, 0);
mLang = FragmentUtils.getFormatLocale(getActivity());
mGenres = prefs.getString(DISCOVER_GENRES, null);
mGenres = (mGenres == null) ? "" : mGenres;
mSortBy = prefs.getString(DISCOVER_SORT_TYPE, DISCOVER_DEFAULT_SORT_TYPE);
mMinRating = prefs.getString(DISCOVER_MIN_RATING, DISCOVER_DEFAULT_MIN_RATING);
recycler = (RecyclerView) view.findViewById(R.id.recycler);
recycler.setHasFixedSize(true);
int columns = (getResources().getConfiguration().orientation == ORIENTATION_PORTRAIT) ? 2 : 3;
RecyclerView.LayoutManager layoutManager = new GridLayoutManager(getContext(), columns);
recycler.setLayoutManager(layoutManager);
itemType = prefs.getString(DISCOVER_TYPE, MOVIES);
adapter = new PosterAdapter(getContext(), itemType);
recycler.setAdapter(adapter);
FragmentUtils.updateProgressBar(progressBar, true);
return view;
}
示例7: onCreateView
import fr.castorflex.android.circularprogressbar.CircularProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
if (getArguments() != null)
itemType = getArguments().getString(ITEM_CATEGORY, UPCOMING_MOVIES);
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_universal, container, false);
progressBar = (CircularProgressBar) view.findViewById(R.id.progressBar);
mCustomErrorView = (CustomErrorView) view.findViewById(R.id.error);
mLang = FragmentUtils.getFormatLocale(getActivity());
recycler = (RecyclerView) view.findViewById(R.id.recycler);
recycler.setHasFixedSize(true);
int columns = (getResources().getConfiguration().orientation == ORIENTATION_PORTRAIT) ? 2 : 3;
RecyclerView.LayoutManager layoutManager = new GridLayoutManager(getContext(), columns);
recycler.setLayoutManager(layoutManager);
String posterType = (itemType.contentEquals(POPULAR_MOVIES)
|| itemType.contentEquals(UPCOMING_MOVIES)
|| itemType.contentEquals(NOW_PLAYING_MOVIES)
|| itemType.contentEquals(TOP_RATED_MOVIES))? MOVIES : TV_SHOWS;
adapter = new PosterAdapter(getContext(), posterType);
recycler.setAdapter(adapter);
FragmentUtils.updateProgressBar(progressBar, true);
return view;
}
示例8: onCreate
import fr.castorflex.android.circularprogressbar.CircularProgressBar; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.dialog_loading);
this.getWindow().getAttributes().gravity = Gravity.CENTER;
CircularProgressBar pb=(CircularProgressBar)this.findViewById(R.id.pb_loading);
if (onDismissListener!=null){
this.setOnDismissListener(onDismissListener);
}
}
示例9: onCreateView
import fr.castorflex.android.circularprogressbar.CircularProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final View view =inflater.inflate(R.layout.activity_imagedetailed, container,false);
toolbar=(Toolbar)view.findViewById(R.id.toolbar);
toolbar.setVisibility(View.GONE);
recyclerView=(RecyclerView)view.findViewById(R.id.rv_imagedetailed);
recyclerView.setHasFixedSize(true);
circularProgressBar=(CircularProgressBar)view.findViewById(R.id.pb_imagedetail_loading);
circularProgressBar.setVisibility(View.VISIBLE);
StaggeredGridLayoutManager layoutManager = new StaggeredGridLayoutManager(3, StaggeredGridLayoutManager.VERTICAL);
recyclerView.setLayoutManager(layoutManager);
pictureDetailedAdapter=new PictureDetailedAdapter(getActivity(),list);
refresh();
return view;
}
示例10: onCreate
import fr.castorflex.android.circularprogressbar.CircularProgressBar; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_imagedetailed);
setNeedBackGesture(true);
toolbar=(Toolbar)findViewById(R.id.toolbar);
((TextView)toolbar.findViewById(R.id.toolbar_title)).setText("图片详细");
toolbar.setNavigationIcon(getResources().getDrawable(R.mipmap.ic_back));
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_right);
finish();
}
});
recyclerView=(RecyclerView)findViewById(R.id.rv_imagedetailed);
pictureDetailedAdapter=new PictureDetailedAdapter(this,list);
recyclerView.setHasFixedSize(true);
circularProgressBar=(CircularProgressBar)findViewById(R.id.pb_imagedetail_loading);
circularProgressBar.setVisibility(View.VISIBLE);
StaggeredGridLayoutManager layoutManager=null;
imageDetailedPresenter=new ImageDetailedPresenter(this,this);
if (getIntent().getStringExtra("type").equals("ApiGrils")){
layoutManager = new StaggeredGridLayoutManager(
2, StaggeredGridLayoutManager.VERTICAL);
imageDetailedPresenter.loadImageDetailed(((ImageListBean)getIntent().getSerializableExtra("Gallery")).getUrl());
}else if(getIntent().getStringExtra("type").equals("Beautify")){
layoutManager = new StaggeredGridLayoutManager(
3, StaggeredGridLayoutManager.VERTICAL);
imageDetailedPresenter.loadmeitu(((ImageListBean)getIntent().getSerializableExtra("Beautify")).getUrl());
}else if(getIntent().getStringExtra("type").equals("NewApiGrils")){
layoutManager = new StaggeredGridLayoutManager(
3, StaggeredGridLayoutManager.VERTICAL);
imageDetailedPresenter.loadbeilaqi(((ImageListBean) getIntent().getSerializableExtra("Beautify")).getUrl());
}
recyclerView.setLayoutManager(layoutManager);
recyclerView.setAdapter(pictureDetailedAdapter);
}
示例11: initProgressBar
import fr.castorflex.android.circularprogressbar.CircularProgressBar; //导入依赖的package包/类
private void initProgressBar() {
bar = (CircularProgressBar) findViewById(R.id.progress_bar_circular);
float progressBarStrokeWidth = getResources()
.getDimensionPixelSize(R.dimen.progressbar_stroke_width);
bar.setIndeterminateDrawable(new CircularProgressDrawable.Builder(this)
.color(ContextCompat.getColor(this, R.color.color_primary_default))
.style(CircularProgressDrawable.STYLE_ROUNDED)
.strokeWidth(progressBarStrokeWidth)
.rotationSpeed(1f)
.sweepSpeed(1f)
.build());
onPostAnimationListener = new OnPostAnimationListener();
/* adding transition animations to root layout */
if (isGreaterThanOrJellyBean()) {
layoutTransition = new LayoutTransition();
layoutTransition.enableTransitionType(LayoutTransition.CHANGING);
layoutTransition.addTransitionListener(onPostAnimationListener);
RelativeLayout loginLayoutContent = (RelativeLayout) findViewById(
org.hisp.dhis.client.sdk.ui.R.id.layout_content);
loginLayoutContent.setLayoutTransition(layoutTransition);
} else {
layoutTransitionSlideIn = AnimationUtils.loadAnimation(this,
org.hisp.dhis.client.sdk.ui.R.anim.in_up);
layoutTransitionSlideOut = AnimationUtils.loadAnimation(this,
org.hisp.dhis.client.sdk.ui.R.anim.out_down);
layoutTransitionSlideIn.setAnimationListener(onPostAnimationListener);
layoutTransitionSlideOut.setAnimationListener(onPostAnimationListener);
}
}
示例12: onCreateView
import fr.castorflex.android.circularprogressbar.CircularProgressBar; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View res = inflater.inflate(R.layout.fragment_edit_permissions, container, false);
View rootContainer = res.findViewById(R.id.rootContainer);
rootContainer.setBackgroundColor(style.getBackyardBackgroundColor());
canEditInfo = (CheckBox) res.findViewById(R.id.canEditValue);
canEditInfoTV = (TextView) res.findViewById(R.id.canEditTitle);
canEditInfoTV.setText(isChannel ? R.string.channel_can_edit_info_members : R.string.group_can_edit_info_members);
canAdminsEditInfo = (CheckBox) res.findViewById(R.id.canAdminsEditValue);
canAdminsEditInfoTV = (TextView) res.findViewById(R.id.canAdminsEditTitle);
canAdminsEditInfoTV.setText(isChannel ? R.string.channel_can_edit_info_admins : R.string.group_can_edit_info_admins);
canSendInvitations = (CheckBox) res.findViewById(R.id.canMembersInviteValue);
canSendInvitationsTV = (TextView) res.findViewById(R.id.canMembersInviteTitle);
canSendInvitationsTV.setText(isChannel ? R.string.channel_can_invite_members : R.string.group_can_invite_members);
if (!isChannel) {
showLeaveJoin = (CheckBox) res.findViewById(R.id.showJoinLeaveValue);
showLeaveJoinTV = (TextView) res.findViewById(R.id.showJoinLeaveTitle);
showLeaveJoinTV.setText(isChannel ? R.string.channel_show_leave_join : R.string.group_show_leave_join);
} else {
res.findViewById(R.id.showJoinLeaveContainer).setVisibility(View.GONE);
}
showAdminsToMembers = (CheckBox) res.findViewById(R.id.showAdminsToMembersValue);
showAdminsToMembersTV = (TextView) res.findViewById(R.id.showAdminsToMembersTitle);
showAdminsToMembersTV.setText(isChannel ? R.string.channel_show_admin_to_members : R.string.group_show_admin_to_members);
scrollContainer = res.findViewById(R.id.scrollContainer);
progress = (CircularProgressBar) res.findViewById(R.id.progress);
progress.setIndeterminate(true);
return res;
}
示例13: updateProgressBar
import fr.castorflex.android.circularprogressbar.CircularProgressBar; //导入依赖的package包/类
/**
* Changes to visible or gone the circular progress bar.
* @param progressBar progress Bar
* @param visibility boolean
*/
public static void updateProgressBar(CircularProgressBar progressBar, boolean visibility) {
if (progressBar != null) {
progressBar.setVisibility(visibility ? View.VISIBLE : View.GONE);
}
}
示例14: onCreateView
import fr.castorflex.android.circularprogressbar.CircularProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
//
// Loading arguments
//
try {
peer = Peer.fromBytes(getArguments().getByteArray("EXTRA_PEER"));
conversationVM = messenger().getConversationVM(peer);
} catch (IOException e) {
throw new RuntimeException(e);
}
//
// Display List
//
BindedDisplayList<Message> displayList = onCreateDisplayList();
if (isPrimaryMode) {
displayList.setLinearLayoutCallback(b -> {
if (layoutManager != null) {
layoutManager.setStackFromEnd(b);
}
});
}
//
// Main View
//
View res = inflate(inflater, container, R.layout.fragment_messages, displayList);
progressView = (CircularProgressBar) res.findViewById(R.id.loadingProgress);
progressView.setIndeterminate(true);
progressView.setVisibility(View.INVISIBLE);
//
// Loading background
//
Drawable background;
int[] backgrounds = ActorSDK.sharedActor().style.getDefaultBackgrouds();
String selectedWallpaper = messenger().getSelectedWallpaper();
if (selectedWallpaper != null) {
background = getResources().getDrawable(backgrounds[0]);
if (selectedWallpaper.startsWith("local:")) {
for (int i = 1; i < backgrounds.length; i++) {
if (getResources().getResourceEntryName(backgrounds[i]).equals(selectedWallpaper.replaceAll("local:", ""))) {
background = getResources().getDrawable(backgrounds[i]);
}
}
} else {
background = Drawable.createFromPath(BaseActorSettingsFragment.getWallpaperFile());
}
} else {
background = getResources().getDrawable(backgrounds[0]);
}
((ImageView) res.findViewById(R.id.chatBackgroundView)).setImageDrawable(background);
//
// List Padding
//
View footer = new View(getActivity());
footer.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, Screen.dp(8)));
addHeaderView(footer); // Add Footer as Header because of reverse layout
View header = new View(getActivity());
header.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, Screen.dp(64)));
addFooterView(header); // Add Header as Footer because of reverse layout
//
// Init unread message index if available
//
recalculateUnreadMessageIfNeeded();
return res;
}