rogero0o / catloadingview Goto Github PK
View Code? Open in Web Editor NEWAndroid CatLoadingView
Android CatLoadingView
你好,我现在遇到这样的问题:
当我从关闭另一个activity的时候得到onActivityResult的回调,这个时候再次调用catLoadingView的时候会崩溃,异常是not perform this action after onsavedInstanceState,意思是保存状态之后我不能再添加commit这个事务了,那么我应该如何再次show出catLoadView.
how can i dismiss this dialogue onBackPressed( ) ?
i am using catLoadingView.setCancelable(false);
this is not working for me. Please guide me.
在使用了AndroidX的项目中无法使用
I would like to change the cat and rat image?
Is that possible?
Thank you
not work
I dont know how to change the text
I wanna change background color of dialog but it doesnt detect setBackgroundColor attribute, what i need to do
mView.setBackgroundColor(Color.parseColor("#000000"));
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
if (catLoadingView == null) {
catLoadingView = CatLoadingView()
catLoadingView?.isCancelable = false
}
catLoadingView?.show(supportFragmentManager, "")
catLoadingView?.dismiss()
startActivityOnResult
RESULT_OK
onActivityResult
of the first ActivitycatLoadingView = null
catLoadingView?.dismissAllowingStateLoss()
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.
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)
...
Please help me !
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();
}
}`
Caused by android.content.res.Resources$NotFoundException
Fatal Exception: android.view.InflateException
How can I change background color? The color doesn't match with my theme
The minSDKVersion = 19, please can you reduce it to a lower minSDKVersion like 15 ?
Btw, awesome Library!!!.
Thanks
InflateException: Binary XML file line #35: Error inflating class com.roger.catloadinglibrary.EyelidView
按返回键时都会dismiss,即便是加了
catLoadingView.setCancelable(false);
catLoadingView.setClickCancelAble(false);
这两行也是一样,这两行只能让点击不能取消,但是返回键还是可以,有什么办法让返回键不能dismiss吗?
android4.4.2不显示LOADING...字,是什么原因?
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 ?
湖建啊 可以啊
Hi, thanks you for this library.
can you develop another LoadingView such as this image ?
There are some bugs I've experienced in your library:
Function to change the text (Loading) to any desired text.
Also, the background color is not changing.
如果直接继承View可以获得更宽的适应性,仅仅只是建议哈,感谢开源分享~辛苦了
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.)
在nexus的机子上run都没有问题,可是在非google手机上,like 华为,run的时候,loading的下半部分被遮住了!ToT!
有的时候眼睛,eyelipview与猫脸的背景没有对齐,导致眼珠转到了外面!
希望对你改进这个设计有帮助!!
实在太喜欢这个设计了!谢谢。
love this lib but it leaks a lot ^^'
在转动了几十次之后眼珠会被眼皮覆盖掉。
希望对你有帮助。
By clicking on the screen, you can close the dialog.
Please add the ability to make the dialog not closable.
thank you for answ .But it still not working . Here my code :
mView = new CatLoadingView();
GraduallyTextView mGraduallyTextView = new GraduallyTextView(getApplicationContext());
mGraduallyTextView.setText("Loading...");
findViewById(R.id.button).setOnClickListener(
new View.OnClickListener() {
@OverRide
public void onClick(View v) {
mView.show(getSupportFragmentManager(), "");
}
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.