com.pnikosis.materialishprogress.ProgressWheel Java Examples

The following examples show how to use com.pnikosis.materialishprogress.ProgressWheel. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MainActivity.java    From Moticons with GNU General Public License v3.0 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    this.context = this;
    this.appPreferences = MoticonsApplication.getAppPreferences();

    initUI();
    isFirstRun();

    recyclerView = (RecyclerView) findViewById(R.id.moticonList);
    fastScroller = (VerticalRecyclerViewFastScroller) findViewById(R.id.fast_scroller);
    progressWheel = (ProgressWheel) findViewById(R.id.progress);
    noResults = (LinearLayout) findViewById(R.id.noResults);

    recyclerView.setHasFixedSize(true);
    LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
    linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
    recyclerView.setLayoutManager(linearLayoutManager);

    fastScroller.setRecyclerView(recyclerView);
    recyclerView.setOnScrollListener(fastScroller.getOnScrollListener());
    progressWheel.setVisibility(View.VISIBLE);

    new getMoticons().execute();
}
 
Example #2
Source File: LoadingHelp.java    From Ticket-Analysis with MIT License 6 votes vote down vote up
public void initView(Context context) {
        loadingView = LayoutInflater.from(context).inflate(R.layout.tcc_loading_page, null);

        rlLoading = (RelativeLayout) loadingView.findViewById(R.id.rlLoading);
        mProgressWheel = (ProgressWheel) loadingView.findViewById(R.id.progress);
        tvMsg = (TextView) loadingView.findViewById(R.id.tv_msg);


        rlFailed = (RelativeLayout) loadingView.findViewById(R.id.rlFailed);
        ivLoadImg = (ImageView) loadingView.findViewById(R.id.ivLoadImg);
        tvLoadMsg = (TextView) loadingView.findViewById(R.id.tvLoadMsg);
        tvLoadHint = (TextView) loadingView.findViewById(R.id.tvLoadHint);
//        btnLoadRefresh = (TextView) loadingView.findViewById(R.id.btnLoadRefresh);

        rlLoading.setVisibility(View.GONE);
        rlFailed.setVisibility(View.GONE);
    }
 
Example #3
Source File: EntriesListFragment.java    From narrate-android with Apache License 2.0 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    mRoot = inflater.inflate(R.layout.fragment_entries, container, false);

    mLoadingIndicator = (ProgressWheel) mRoot.findViewById(R.id.loading_indicator);

    mNoEntriesGraphic = findViewById(R.id.no_entries_graphic);
    mNoEntriesTextView = (TextView) findViewById(R.id.no_entries_text);
    mNoEntriesTextView.setText(getString(R.string.no_entries).toLowerCase());

    setupListView();

    return mRoot;
}
 
Example #4
Source File: MoticoinsActivity.java    From Moticons with GNU General Public License v3.0 5 votes vote down vote up
private void initScreenElements() {
    // VIDEO
    progressWheel = (ProgressWheel) findViewById(R.id.progress);
    show_ad = (LinearLayout) findViewById(R.id.show_ad);
    show_ad_description = (TextView) findViewById(R.id.show_ad_description);
    moticoins_amount = (TextView) findViewById(R.id.moticoins_amount);
    moticoins_video = (CardView) findViewById(R.id.moticoins_video);

    // GOOGLE PLUS
    card_googleplus = (CardView) findViewById(R.id.card_googleplus);
    card_googleplus_description = (TextView) findViewById(R.id.card_googleplus_description);

    // REMOVE ADS (MOTICOINS)
    remove_ads_moticoins = (CardView) findViewById(R.id.remove_ads_moticoins);
    remove_ads_label_moticoins = (TextView) findViewById(R.id.remove_ads_label_moticoins);

    // REMOVE ADS (INAPP)
    remove_ads_inapp = (CardView) findViewById(R.id.remove_ads_inapp);
    remove_ads_label_inapp = (TextView) findViewById(R.id.remove_ads_label_inapp);

    // UNLOCK MOTICONS (MOTICOINS)
    unlock_moticons_moticoins = (CardView) findViewById(R.id.unlock_moticons_moticoins);
    unlock_moticons_label_moticoins = (TextView) findViewById(R.id.unlock_moticons_label_moticoins);

    // UNLOCK MOTICONS (INAPP)
    unlock_moticons_inapp = (CardView) findViewById(R.id.unlock_moticons_inapp);
    unlock_moticons_label_inapp = (TextView) findViewById(R.id.unlock_moticons_label_inapp);
}
 
Example #5
Source File: WheelSurfaceView.java    From nono-android with GNU General Public License v3.0 5 votes vote down vote up
public void setCallback(ProgressWheel.ProgressCallback progressCallback) {
    callback = progressCallback;

    if (!isSpinning) {
        runCallback();
    }
}
 
Example #6
Source File: WheelSurfaceView.java    From nono-android with GNU General Public License v3.0 5 votes vote down vote up
public WheelSurfaceView(Context context, AttributeSet attrs) {
    super(context, attrs);

    parseAttributes(context.obtainStyledAttributes(attrs, R.styleable.ProgressWheel));

    setAnimationEnabled();
    iniSurfaceView();
}
 
Example #7
Source File: BaseFragment.java    From YuanNewsForAndroid with Apache License 2.0 5 votes vote down vote up
private void initProgress() {
    wheel = new ProgressWheel(getContext());
    wheel.setBarColor(Color.GREEN);
    wheel.setEnabled(true);
    wheel.setBarColor(Color.BLUE);
    wheel.setBackgroundColor(Color.GRAY);
}
 
Example #8
Source File: SweetAlertDialog.java    From HaiNaBaiChuan with Apache License 2.0 5 votes vote down vote up
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.alert_dialog);

    mDialogView = getWindow().getDecorView().findViewById(android.R.id.content);
    mTitleTextView = (TextView)findViewById(R.id.title_text);
    mContentTextView = (TextView)findViewById(R.id.content_text);
    mErrorFrame = (FrameLayout)findViewById(R.id.error_frame);
    mErrorX = (ImageView)mErrorFrame.findViewById(R.id.error_x);
    mSuccessFrame = (FrameLayout)findViewById(R.id.success_frame);
    mProgressFrame = (FrameLayout)findViewById(R.id.progress_dialog);
    mSuccessTick = (SuccessTickView)mSuccessFrame.findViewById(R.id.success_tick);
    mSuccessLeftMask = mSuccessFrame.findViewById(R.id.mask_left);
    mSuccessRightMask = mSuccessFrame.findViewById(R.id.mask_right);
    mCustomImage = (ImageView)findViewById(R.id.custom_image);
    mWarningFrame = (FrameLayout)findViewById(R.id.warning_frame);
    mEditingFrame = (FrameLayout) findViewById(R.id.editing_frame);
    mSexFrame = (FrameLayout) findViewById(R.id.sex_frame);
    mPasswordLayout = (LinearLayout) findViewById(R.id.password_frame);
    mSignFrame = (FrameLayout) findViewById(R.id.sign_frame);
    mEditSign = (EditText) findViewById(R.id.etSign);
    mOldPassword = (EditText) findViewById(R.id.etOldPassword);
    mNewPassword = (EditText) findViewById(R.id.etNewPassword);
    mEditContent = (EditText) findViewById(R.id.etContent);
    mConfirmButton = (Button)findViewById(R.id.confirm_button);
    mCancelButton = (Button)findViewById(R.id.cancel_button);
    mSexGroup = (RadioGroup) findViewById(R.id.radio);
    mProgressHelper.setProgressWheel((ProgressWheel)findViewById(R.id.progressWheel));
    mConfirmButton.setOnClickListener(this);
    mCancelButton.setOnClickListener(this);

    setSex(currentChooseSex);
    setTitleText(mTitleText);
    setContentText(mContentText);
    setCancelText(mCancelText);
    setConfirmText(mConfirmText);
    changeAlertType(mAlertType, true);
    showCancelButton(mShowCancel);
    showConfirmButton(mShowCanfirm);
}
 
Example #9
Source File: AudioView.java    From Silence with GNU General Public License v3.0 5 votes vote down vote up
public AudioView(Context context, AttributeSet attrs, int defStyleAttr) {
  super(context, attrs, defStyleAttr);
  inflate(context, R.layout.audio_view, this);

  this.container        = (ViewGroup) findViewById(R.id.audio_widget_container);
  this.controlToggle    = (AnimatingToggle) findViewById(R.id.control_toggle);
  this.playButton       = (ImageView) findViewById(R.id.play);
  this.pauseButton      = (ImageView) findViewById(R.id.pause);
  this.downloadButton   = (ImageView) findViewById(R.id.download);
  this.downloadProgress = (ProgressWheel) findViewById(R.id.download_progress);
  this.seekBar          = (SeekBar) findViewById(R.id.seek);
  this.timestamp        = (TextView) findViewById(R.id.timestamp);

  this.playButton.setOnClickListener(new PlayClickedListener());
  this.pauseButton.setOnClickListener(new PauseClickedListener());
  this.seekBar.setOnSeekBarChangeListener(new SeekBarModifiedListener());

  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    this.playButton.setImageDrawable(context.getDrawable(R.drawable.play_icon));
    this.pauseButton.setImageDrawable(context.getDrawable(R.drawable.pause_icon));
    this.playButton.setBackground(context.getDrawable(R.drawable.ic_circle_fill_white_48dp));
    this.pauseButton.setBackground(context.getDrawable(R.drawable.ic_circle_fill_white_48dp));
  }

  if (attrs != null) {
    TypedArray typedArray = context.getTheme().obtainStyledAttributes(attrs, R.styleable.AudioView, 0, 0);
    setTint(typedArray.getColor(R.styleable.AudioView_foregroundTintColor, Color.WHITE),
            typedArray.getColor(R.styleable.AudioView_backgroundTintColor, Color.WHITE));
    container.setBackgroundColor(typedArray.getColor(R.styleable.AudioView_widgetBackground, Color.TRANSPARENT));
    typedArray.recycle();
  }
}
 
Example #10
Source File: LoadWebData.java    From minx with MIT License 5 votes vote down vote up
public LoadWebData(String search_url, FragmentActivity activity) {
    super();
    this.search_url = search_url;
    this.activity = activity;
    progressViewLoading = (ProgressWheel) (activity).findViewById(R.id.progressViewLoading);
    title_txt = (FontText) (activity).findViewById(R.id.title_txt);
    body_txt = (FontText) (activity).findViewById(R.id.body_txt);
    btn_view_links = (Button) (activity).findViewById(R.id.btn_view_links);
    mainActivity=(MainActivity)activity;
    sharedPrefs=activity.getResources().getString(R.string.sharedPrefs);
    sharedPreferences=activity.getSharedPreferences(sharedPrefs, Context.MODE_PRIVATE);
    editor=sharedPreferences.edit();
}
 
Example #11
Source File: DefaultHeader.java    From Bailan with Apache License 2.0 5 votes vote down vote up
@Override
public View createView(LayoutInflater inflater, ViewGroup parent) {
    ViewGroup v = (ViewGroup) inflater.inflate(R.layout.prj_ptr_header_default, parent, true);
    View child = v.getChildAt(v.getChildCount() - 1);
    mStringIndicator = (TextView) child.findViewById(R.id.tv_header);
    progress_wheel = (ProgressWheel) v.findViewById(R.id.progress_wheel);
    default_rim_color = progress_wheel.getRimColor();
    return child;
}
 
Example #12
Source File: DefaultFooter.java    From Bailan with Apache License 2.0 5 votes vote down vote up
@Override
public View createView(LayoutInflater inflater, ViewGroup parent) {
    ViewGroup v = (ViewGroup) inflater.inflate(R.layout.prj_ptr_footer_default, parent, true);
    View child = v.getChildAt(v.getChildCount() - 1);
    mStringIndicator = (TextView) child.findViewById(R.id.tv_footer);
    progress_wheell = (ProgressWheel) v.findViewById(R.id.progress_wheell);
    default_rim_color = progress_wheell.getRimColor();
    return child;
}
 
Example #13
Source File: DefaultHeader.java    From Bailan with Apache License 2.0 5 votes vote down vote up
@Override
public View createView(LayoutInflater inflater, ViewGroup parent) {
    ViewGroup v = (ViewGroup) inflater.inflate(R.layout.prj_ptr_header_default, parent, true);
    View child = v.getChildAt(v.getChildCount() - 1);
    mStringIndicator = (TextView) child.findViewById(R.id.tv_header);
    progress_wheel = (ProgressWheel) v.findViewById(R.id.progress_wheel);
    default_rim_color = progress_wheel.getRimColor();
    return child;
}
 
Example #14
Source File: DefaultFooter.java    From Bailan with Apache License 2.0 5 votes vote down vote up
@Override
public View createView(LayoutInflater inflater, ViewGroup parent) {
    ViewGroup v = (ViewGroup) inflater.inflate(R.layout.prj_ptr_footer_default, parent, true);
    View child = v.getChildAt(v.getChildCount() - 1);
    mStringIndicator = (TextView) child.findViewById(R.id.tv_footer);
    progress_wheell = (ProgressWheel) v.findViewById(R.id.progress_wheell);
    default_rim_color = progress_wheell.getRimColor();
    return child;
}
 
Example #15
Source File: SweetAlertDialog.java    From pe-protector-moe with GNU General Public License v3.0 5 votes vote down vote up
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.alert_dialog);

    mDialogView = getWindow().getDecorView().findViewById(android.R.id.content);
    mTitleTextView = (TextView)findViewById(R.id.title_text);
    mContentTextView = (TextView)findViewById(R.id.content_text);
    mErrorFrame = (FrameLayout)findViewById(R.id.error_frame);
    mErrorX = (ImageView)mErrorFrame.findViewById(R.id.error_x);
    mSuccessFrame = (FrameLayout)findViewById(R.id.success_frame);
    mProgressFrame = (FrameLayout)findViewById(R.id.progress_dialog);
    mSuccessTick = (SuccessTickView)mSuccessFrame.findViewById(R.id.success_tick);
    mSuccessLeftMask = mSuccessFrame.findViewById(R.id.mask_left);
    mSuccessRightMask = mSuccessFrame.findViewById(R.id.mask_right);
    mCustomImage = (ImageView)findViewById(R.id.custom_image);
    mWarningFrame = (FrameLayout)findViewById(R.id.warning_frame);
    mConfirmButton = (Button)findViewById(R.id.confirm_button);
    mCancelButton = (Button)findViewById(R.id.cancel_button);
    mProgressHelper.setProgressWheel((ProgressWheel)findViewById(R.id.progressWheel));
    mConfirmButton.setOnClickListener(this);
    mCancelButton.setOnClickListener(this);

    setTitleText(mTitleText);
    setContentText(mContentText);
    setCancelText(mCancelText);
    setConfirmText(mConfirmText);
    changeAlertType(mAlertType, true);

}
 
Example #16
Source File: MainActivity.java    From MLManager with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    this.appPreferences = MLManagerApplication.getAppPreferences();
    this.activity = this;
    this.context = this;

    setInitialConfiguration();
    checkAndAddPermissions(activity);
    setAppDir();

    recyclerView = (RecyclerView) findViewById(R.id.appList);
    pullToRefreshView = (PullToRefreshView) findViewById(R.id.pull_to_refresh);
    fastScroller = (VerticalRecyclerViewFastScroller) findViewById(R.id.fast_scroller);
    progressWheel = (ProgressWheel) findViewById(R.id.progress);
    noResults = (LinearLayout) findViewById(R.id.noResults);

    pullToRefreshView.setEnabled(false);

    recyclerView.setHasFixedSize(true);
    LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
    linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
    recyclerView.setLayoutManager(linearLayoutManager);

    drawer = UtilsUI.setNavigationDrawer((Activity) context, context, toolbar, appAdapter, appSystemAdapter, appFavoriteAdapter, appHiddenAdapter, recyclerView);

    progressWheel.setBarColor(appPreferences.getPrimaryColorPref());
    progressWheel.setVisibility(View.VISIBLE);
    new getInstalledApps().execute();

}
 
Example #17
Source File: ProgressHelper.java    From HaiNaBaiChuan with Apache License 2.0 4 votes vote down vote up
public void setProgressWheel (ProgressWheel progressWheel) {
    mProgressWheel = progressWheel;
    updatePropsIfNeed();
}
 
Example #18
Source File: ProgressHelper.java    From pe-protector-moe with GNU General Public License v3.0 4 votes vote down vote up
public ProgressWheel getProgressWheel () {
    return mProgressWheel;
}
 
Example #19
Source File: ProgressHelper.java    From HaiNaBaiChuan with Apache License 2.0 4 votes vote down vote up
public ProgressWheel getProgressWheel () {
    return mProgressWheel;
}
 
Example #20
Source File: ProgressHelper.java    From pe-protector-moe with GNU General Public License v3.0 4 votes vote down vote up
public void setProgressWheel (ProgressWheel progressWheel) {
    mProgressWheel = progressWheel;
    updatePropsIfNeed();
}