当前位置: 首页>>代码示例>>Java>>正文


Java CircularProgressBar类代码示例

本文整理汇总了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;
}
 
开发者ID:an-garcia,项目名称:MovieGuide,代码行数:22,代码来源:PeopleFragment.java

示例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);

}
 
开发者ID:EyeSeeTea,项目名称:malariapp,代码行数:22,代码来源:LoginActivity.java

示例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);
}
 
开发者ID:dhis2,项目名称:dhis2-android-eventcapture,代码行数:22,代码来源:FormSectionActivity.java

示例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;
}
 
开发者ID:an-garcia,项目名称:MovieGuide,代码行数:34,代码来源:HomeFragment.java

示例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;
}
 
开发者ID:an-garcia,项目名称:MovieGuide,代码行数:36,代码来源:FavoritesFragment.java

示例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;
}
 
开发者ID:an-garcia,项目名称:MovieGuide,代码行数:29,代码来源:DiscoverResultFragment.java

示例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;
}
 
开发者ID:an-garcia,项目名称:MovieGuide,代码行数:29,代码来源:UniversalFragment.java

示例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);
    }
}
 
开发者ID:konglinghai123,项目名称:zhai,代码行数:12,代码来源:LoadingDialog.java

示例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;
}
 
开发者ID:konglinghai123,项目名称:zhai,代码行数:16,代码来源:MainFragment.java

示例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);

}
 
开发者ID:konglinghai123,项目名称:zhai,代码行数:41,代码来源:ViewImagesActivity.java

示例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);
    }
}
 
开发者ID:EyeSeeTea,项目名称:pictureapp,代码行数:33,代码来源:LoginActivity.java

示例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;
}
 
开发者ID:actorapp,项目名称:actor-platform,代码行数:37,代码来源:GroupPermissionsFragment.java

示例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);
    }
}
 
开发者ID:an-garcia,项目名称:MovieGuide,代码行数:11,代码来源:FragmentUtils.java

示例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;
}
 
开发者ID:actorapp,项目名称:actor-platform,代码行数:77,代码来源:MessagesFragment.java


注:本文中的fr.castorflex.android.circularprogressbar.CircularProgressBar类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。