本文整理汇总了Java中fr.castorflex.android.circularprogressbar.CircularProgressBar.setVisibility方法的典型用法代码示例。如果您正苦于以下问题:Java CircularProgressBar.setVisibility方法的具体用法?Java CircularProgressBar.setVisibility怎么用?Java CircularProgressBar.setVisibility使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fr.castorflex.android.circularprogressbar.CircularProgressBar
的用法示例。
在下文中一共展示了CircularProgressBar.setVisibility方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: 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);
}
示例3: 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);
}
}
示例4: 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;
}