本文整理汇总了Java中com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar类的典型用法代码示例。如果您正苦于以下问题:Java CircleProgressBar类的具体用法?Java CircleProgressBar怎么用?Java CircleProgressBar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CircleProgressBar类属于com.lsjwzh.widget.materialloadingprogressbar包,在下文中一共展示了CircleProgressBar类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
progress1 = (CircleProgressBar) findViewById(R.id.progress1);
progress2 = (CircleProgressBar) findViewById(R.id.progress2);
progressWithArrow = (CircleProgressBar) findViewById(R.id.progressWithArrow);
progressWithoutBg = (CircleProgressBar) findViewById(R.id.progressWithoutBg);
// progress1.setColorSchemeResources(android.R.color.holo_blue_bright);
progress2.setColorSchemeResources(android.R.color.holo_green_light,android.R.color.holo_orange_light,android.R.color.holo_red_light);
progressWithArrow.setColorSchemeResources(android.R.color.holo_orange_light);
progressWithoutBg.setColorSchemeResources(android.R.color.holo_red_light);
handler = new Handler();
for (int i = 0; i < 10; i++) {
final int finalI = i;
handler.postDelayed(new Runnable() {
@Override
public void run() {
if(finalI *10>=90){
progress1.setVisibility(View.VISIBLE);
progress2.setVisibility(View.INVISIBLE);
}else {
progress2.setProgress(finalI * 10);
}
}
},1000*(i+1));
}
}
示例2: onCreate
import com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (setupToolbar) {
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
}
if (setupProgressBar) {
progressBar = (CircleProgressBar) findViewById(R.id.progressbar);
}
}
示例3: onCreate
import com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
progress1 = (CircleProgressBar) findViewById(R.id.progress1);
progress2 = (CircleProgressBar) findViewById(R.id.progress2);
progressWithArrow = (CircleProgressBar) findViewById(R.id.progressWithArrow);
progressWithoutBg = (CircleProgressBar) findViewById(R.id.progressWithoutBg);
// progress1.setColorSchemeResources(android.R.color.holo_blue_bright);
progress2.setColorSchemeResources(android.R.color.holo_green_light);
progressWithArrow.setColorSchemeResources(android.R.color.holo_orange_light);
progressWithoutBg.setColorSchemeResources(android.R.color.holo_red_light);
handler = new Handler();
for (int i = 0; i < 10; i++) {
final int finalI = i;
handler.postDelayed(new Runnable() {
@Override
public void run() {
if(finalI *10>=90){
progress2.setVisibility(View.INVISIBLE);
}else {
progress2.setProgress(finalI * 10);
}
}
},1000*(i+1));
}
}
示例4: onCreateView
import com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Set fragment layout
View rootView = inflater.inflate(R.layout.fragment_recipes, container, false);
if (savedInstanceState != null) {
mCurrentKey = savedInstanceState.getString(Utils.ARG_KEY);
mActivePage = savedInstanceState.getString(Utils.ARG_PAGE);
}
// Connect view objects and view id on xml.
mList = (RecyclerView) rootView.findViewById(R.id.recycler_view);
mPrgLoading = (CircleProgressBar) rootView.findViewById(R.id.prgLoading);
mTxtEmpty = (TextView) rootView.findViewById(R.id.txtEmpty);
//mAdView = (AdView) rootView.findViewById(R.id.adView);
//mIsAdmobVisible = Utils.admobVisibility(mAdView, Utils.IS_ADMOB_VISIBLE);
mPrgLoading.setColorSchemeResources(R.color.accent_color);
mList.setHasFixedSize(true);
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getActivity());
mList.setLayoutManager(layoutManager);
// Load ad in background using asynctask class
//new SyncShowAd(mAdView).execute();
// Create object of database helpers.
mDBhelperRecipes = new DbHelperRecipes(getActivity());
mDBhelperFavorites = new DbHelperFavorites(getActivity());
// Create database of recipes.
try {
mDBhelperRecipes.createDataBase();
mDBhelperFavorites.createDataBase();
}catch(IOException ioe){
throw new Error("Unable to create database");
}
openDatabase();
mAdapterRecipes = new RecipesAdapter(getActivity());
// When item on list selected, send recipe id and to onRecipeSelected method
mAdapterRecipes.setOnTapListener(new OnTapListener() {
@Override
public void onTapView(String ID, String CategoryName) {
mCallback.onRecipeSelected(ID, "");
}
});
return rootView;
}
示例5: onCreateView
import com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Set fragment layout
View rootView = inflater.inflate(R.layout.fragment_recipes_categories, container, false);
// Connect view objects with view id in xml
mList = (RecyclerView) rootView.findViewById(R.id.recycler_view);
mPrgLoading = (CircleProgressBar) rootView.findViewById(R.id.prgLoading);
// Set recyclerview layout
mList.setHasFixedSize(true);
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getActivity());
mList.setLayoutManager(layoutManager);
// Create object of database helpers
mDBhelperRecipes = new DbHelperRecipes(getActivity());
// Create recipes database
try {
mDBhelperRecipes.createDataBase();
}catch(IOException ioe){
throw new Error("Unable to create database");
}
// Open recipes database
mDBhelperRecipes.openDataBase();
mAdapterCategories = new CategoriesAdapter(getActivity());
// Retrieve data from database in background using asynctask
new syncGetData().execute();
// When item on list selected, send category id and name to onCategorySelected method
mAdapterCategories.setOnTapListener(new OnTapListener() {
@Override
public void onTapView(String ID, String CategoryName) {
mCallback.onCategorySelected(ID, CategoryName);
}
});
return rootView;
}
示例6: initViews
import com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar; //导入依赖的package包/类
private void initViews() {
progressBar= (CircleProgressBar) findViewById(R.id.progressBar);
entriesRv= (RecyclerView) findViewById(R.id.recycler_entries);
entriesRv.setHasFixedSize(true);
entriesRv.setLayoutManager(new LinearLayoutManager(me));
entriesView=new EntryListView(){
@Override
public void showLoading() {
progressBar.setVisibility(View.VISIBLE);
}
@Override
public void hideLoading() {
progressBar.setVisibility(View.INVISIBLE);
}
@Override
public void showRetry() {}
@Override
public void hideRetry() {}
@Override
public void showError(String message) {}
@Override
public Context context() {
return me.getApplicationContext();
}
@Override
public void renderList(GetEntriesUseCase.EntriesResult result) {
if (adapter==null){
adapter=new EntriesRVadapter(result);
adapter.setOnItemClickListener(new EntriesRVadapter.OnItemClickListener() {
@Override
public void onEntryClicked(DisplayEntry entry) {
EntryActivity.jump(me,entry.getEntryId());
}
});
entriesRv.setAdapter(adapter);
}
else {
adapter.updateDate(result);
adapter.notifyDataSetChanged();
}
}
@Override
public void viewEntry(DisplayEntry entry) {
}
};
}
示例7: onCreate
import com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent i=getIntent();
entryId=i.getIntExtra(INTENT_KEY_ENTRYKEY,ENTRYKEY_default);
setTitle("图片");
me=this;
setContentView(R.layout.activity_entry);
progressBar= (CircleProgressBar) findViewById(R.id.progressBar_entry);
iv= (ImageView) findViewById(R.id.image_entry);
ev=new EntryView() {
@Override
public void renderEntry(GetEntryUseCase.EntryReturn result) {
iv.setImageDrawable(result.getRetImage());
}
@Override
public void showLoading() {
progressBar.setVisibility(View.VISIBLE);
}
@Override
public void hideLoading() {
progressBar.setVisibility(View.INVISIBLE);
}
@Override
public void showRetry() {
}
@Override
public void hideRetry() {
}
@Override
public void showError(String message) {
}
@Override
public Context context() {
return me;
}
};
DataStore remote=new RemoteDataStore(getApplicationContext());
getEntry=new GetEntryUseCase(new JobExecutor(),new UIThread(),remote,entryId);
presenter=new ViewEntryPresenter(getEntry);
presenter.setView(ev);
presenter.initialize();
}