Android CatLoadingView

Overview

Android CatLoadingView

This project idea is from Link.
Thanks for the idea.

I like the animation in this picture:

...as you see it right now, I hope you like it!

Step

Import this project into Android Studio... it's built with it.

Usage

Gradle

implementation 'com.roger.catloadinglibrary:catloadinglibrary:1.0.9'

config in java code

CatLoadingView mView;


@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

mView = new CatLoadingView();
findViewById(R.id.button).setOnClickListener(
	new View.OnClickListener() {
	    @Override public void onClick(View v) {
		mView.show(getSupportFragmentManager(), "");
	    }
	});
}

Set Background Color

	mView.setBackgroundColor(Color.parseColor("#000000"));

TODO

This view is adjusted in Nexus5 but not tested on other screen sizes.

About me

A small guy in Fujian, mainland China.

If you have any new ideas about this project, feel free to tell me. Tks. 😃

License

The MIT License (MIT)

Copyright © 2015 Roger

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Android Arsenal

Comments
  • Force closed with error message:

    Force closed with error message: "java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState"

    How to create the issue

    • Create and show CatLoadingView
    if (catLoadingView == null) {
        catLoadingView = CatLoadingView()
        catLoadingView?.isCancelable = false
    }
    catLoadingView?.show(supportFragmentManager, "")
    
    • Dismiss CatLoadingView
    catLoadingView?.dismiss()
    
    • Start other activity with startActivityOnResult
    • Dismiss the new activity with RESULT_OK
    • Show CatLoadingView again with the first code inside onActivityResult of the first Activity

    What I have try to solve the problem

    • Set the CatLoadingView to null after dismissed
    catLoadingView = null
    
    • Change the dismiss code with dismissAllowingStateLoss
    catLoadingView?.dismissAllowingStateLoss()
    
    • Override onSaveInstanceState based on https://stackoverflow.com/a/10261449/3940133
    override fun onSaveInstanceState(outState: Bundle) {
        outState.putString("WORKAROUND_FOR_BUG_19917_KEY", "WORKAROUND_FOR_BUG_19917_VALUE")
        super.onSaveInstanceState(outState)
    }
    

    But didn't help What working is wrapping the code with try catch that catch IllegalStateException but this workaround will make the CatLoadingView not showing at all after showed for the first time.

    Stack trace

    java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
    at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:2053)
    at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:2079)
    at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:678)
    at android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:632)
    at android.support.v4.app.DialogFragment.show(DialogFragment.java:143)
    ...
    
    opened by hendrawd 5
  • setBackgroundColor attribute not detected

    setBackgroundColor attribute not detected

    I wanna change background color of dialog but it doesnt detect setBackgroundColor attribute, what i need to do

    mView.setBackgroundColor(Color.parseColor("#000000"));

    opened by phishiewow 4
  • New Loading

    New Loading

    Hi, thanks you for this library. can you develop another LoadingView such as this image ?

    http://mmbiz.qpic.cn/mmbiz/TTkedQ4uv7Khpcbibt7ibb143EWlHyQKxj0pkDibOXfib25BYWZeWFyetVH5GsxDvtelwicWA4HeqB1d9J3Kxlzia9iaw/0?wx_fmt=gif&tp=webp&wxfrom=5&wx_lazy=1

    opened by tellfa 4
  • Cancelable and onResume event

    Cancelable and onResume event

    There are some bugs I've experienced in your library:

    • Cancelable = false is not working
    • If onPause event call some of the animations (mouse, eyeLeft, eyeRight) don't resume
    opened by AliAzaz 2
  • Cancelable and onResume event

    Cancelable and onResume event

    Fixed bugs reported in issue #40 and background color bug reported in #39

    *Cancelable = false is not working *If onPause event call some of the animations (mouse, eyeLeft, eyeRight) don't resume *Background color attribute was not working *Updated example and library gradle

    opened by AliAzaz 1
  • java.lang.IllegalStateException: Fragment already added: CatLoadingView

    java.lang.IllegalStateException: Fragment already added: CatLoadingView

    When I use the CatLoadingView in my activity, it works fine. But when I kill the activity and come back the second time to use the CatLoadingView I get: java.lang.IllegalStateException: Fragment already added: CatLoadingView.

    This is the method for display the CatLoadingView

    ` public void displayLoader(FragmentManager fm, boolean display) { if (view == null) { view = new CatLoadingView(); view.setBackgroundColor(Color.parseColor("#88003CC0")); view.setText("Please wait"); }

        if (display) {
            if (!view.isAdded())
                view.show(fm, TAG);
        } else if (!display && view.isVisible()){
            view.dismiss();
        }
    

    }`

    opened by ezechuka 1
  • Navigation Component

    Navigation Component

    kinda breaks navigation component if you use navHost.childFragmentManager, also apparently leaks, i'd suggest testing yourself with https://github.com/square/leakcanary :/ otherwise cool idea, using it in development builds for the laughs

    opened by kibotu 1
  • android support v7 support for fragments

    android support v7 support for fragments

    hey !

    I am trying to use your plugin to make a cordova plugin and I got hit with this error when trying to call the method show() :

    error: no suitable method found for show(android.app.FragmentManager,String)
    method DialogFragment.show(android.support.v4.app.FragmentManager,String) is not applicable
    (argument mismatch; android.app.FragmentManager cannot be converted to android.support.v4.app.FragmentManager)
    method DialogFragment.show(FragmentTransaction,String) is not applicable
    (argument mismatch; android.app.FragmentManager cannot be converted to FragmentTransaction)
    

    It is clearly a problem with android support library version. Is there anyway you can fix this in a newer version ?

    opened by moda20 1
  • Null pointer Exception in mView.dismiss() after configuration changes

    Null pointer Exception in mView.dismiss() after configuration changes

    I am getting -

    java.lang.NullPointerException: Attempt to invoke virtual method android.support.v4.app.FragmentTransaction android.support.v4.app.FragmentManager.beginTransaction()' on a null object reference when i rotate the phone and it crashes becuase of mView.dismiss(). Please help.)

    opened by gautam2682 1
Releases(1.0.2)
Owner
Roger
Stay hungry Stay foolish
Roger
[Android] Round Corner Progress Bar Library for Android

RoundCornerProgressBar Round corner is cool. Let's make your progress bar to round corner Colorful progress bar with round corner on progress which yo

Akexorcist 2.3k Jan 7, 2023
Now deprecated. A small Android library allowing you to have a smooth and customizable horizontal indeterminate ProgressBar

Description Small library allowing you to make a smooth indeterminate progress bar. You can either user your progress bars and set this drawable or us

Antoine Merle 4.4k Dec 30, 2022
A beautiful, slim Android ProgressBar.

Android NumberProgressBar The NumberProgressBar is a bar, slim and sexy (every man wants! ). I decided to do this because I was really tired of androi

代码家 6k Jan 7, 2023
An android library to display a progressbar that goes around an image.

android-square-progressbar First things first This library is setup to work with the Android Studio and Gradle. If you're using the Eclipse environmen

Yannick Signer 1.3k Nov 15, 2022
Android library to display progress like google does in some of his services.

GoogleProgressBar This library is not maintained anymore and there will be no further releases Android library to display different kind of google rel

JPARDOGO 1.3k Dec 27, 2022
Android loading view

Loading Loading is a poject with kinds of Android loading view. Yan can see the wiki for more detail. RotateLoading BookLoading NewtonCradleLoading Us

null 1.2k Jan 1, 2023
Android fillable progress view working with SVG paths. This is a nice option too if you want to create an interesting branding logo for your app. Based on the iOS project: https://github.com/poolqf/FillableLoaders

Android FillableLoaders Android Open Source library providing an interesting fillable progress view working with SVG paths. This is a nice option too

Jorge Castillo 2k Jan 1, 2023
Android AlertDialog with moving dots progress indicator

Spots progress dialog Android AlertDialog with moving spots progress indicator packed as android library. =========== Usage The library available in m

Maksym Dybarskyi 1.1k Dec 26, 2022
An Android library providing to realize wave loading effect.

WaveLoadingView WaveLoadingView - An Android library that provides a realistic wave-loading effect. Sample Usage For a working implementation of this

Tang 1.7k Jan 2, 2023
A customizable, animated progress bar that features rounded corners. This Android library is designed to look great and be simple to use 🎉

RoundedProgressBar Easy, Beautiful, Customizeable The RoundedProgressBar library gives you a wide range of customizable options for making progress ba

null 541 Jan 1, 2023
Some beautiful android loading drawable, can be combined with any view as the LoadingView or the ProgressBar. Besides, some Drawable can customize the loading progress too.

LoadingDrawable: Android cool animation collection 前言 CircleRotate源码解析 Fish源码解析 LoadingDrawable is some android animations implement of drawable: a li

dinus_developer 4.1k Dec 27, 2022
A progress wheel for android, intended for use instead of the standard progress bar.

Deprecation warning This project is no-longer maintained, and has not been maintained for a few years now. If you're looking for an alternative librar

Todd Davies 2.7k Dec 29, 2022
An implement of ProgressHUD for Android, similar to MBProgressHUD, SVProgressHUD for iOS.

KProgressHUD A progress HUD implementation for Android. Inspired by MBProgressHUD for iOS. Compatibility Android 2.3 and later Adding KProgressHUD to

Kaopiz Software Co., Ltd. 1.6k Dec 27, 2022
A wave view of android,can be used as progress bar.

WaveView ![Gitter](https://badges.gitter.im/Join Chat.svg) A wave view of android,can be used as progress bar. Screenshot APK demo.apk What can be use

Kai Wang 1.3k Dec 28, 2022
A circular android ProgressBar library which extends View, and the usage same as ProgressBar, It has solid,line and solid_line three styles. Besides, progress value can be freely customized.

CircleProgressBar 中文版文档 The CircleProgressBar extends View, It has both solid and line two styles. Besides, progress value can be freely customized. I

dinus_developer 1.2k Jan 3, 2023
DownloadProgressBar is an android library that delivers awesome custom progress bar. You can manipulate it's state in every way.

Download Progress Bar Android progress bar with cool animation, inspired by : https://dribbble.com/shots/2012292-Download-Animation ###Attributes Attr

Mariusz Brona 978 Nov 10, 2022
Android - An action bar item which acts both as a refresh button and as a progress indicator

RefreshActionItem An action bar item that implements this common pattern: Initially it shows a refresh button. If the button is clicked, a background

Manuel Peinado Gallego 655 Nov 10, 2022
Android library for showing progress in a highly customizable pie.

ProgressPieView Android library for showing progress in a highly customizable pie. Choose from the broad spectre of styleable elements: ppvStrokeWidth

Filip Puđak 399 Dec 29, 2022
ColoringLoading 4.7 0.0 Java This project provide Coloring Loading View for Android. And this project is not using the image file!

ColoringLoading ![Release](https://img.shields.io/github/release/recruit-lifestyle/ColoringLoading.svg?label=maven version) This project provide Color

Recruit Lifestyle Co. Ltd. 379 Jul 25, 2022