AnimatedCircleLoadingView
AnimatedCircleLoadingView copied to clipboard
AnimatedCircleLoadingView, the Odyssey.
Hi, as happened many times before, I had this problem, I followed all the steps, I even force gradle to update the dependencies, this is my project build.gradle:
buildscript { repositories { maven {url "http://dl.bintray.com/jlmd/maven"} google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.0.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { maven {url "http://dl.bintray.com/jlmd/maven"} google() jcenter() } }
this is my module build.gradle:
apply plugin: 'com.android.application' android { compileSdkVersion 26 defaultConfig { applicationId "com.company.holmes.myteste" minSdkVersion 21 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } android { useLibrary 'org.apache.http.legacy' } buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:26.1.0' implementation 'com.android.support:cardview-v7:26.1.0' implementation 'com.android.support:gridlayout-v7:26.1.0' implementation 'com.android.support.constraint:constraint-layout:1.0.2' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' compile 'com.github.jlmd:AnimatedCircleLoadingView:1.1.5@aar' }
And this is my error:
`Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute application@label value=(Agenda de Serviço) from AndroidManifest.xml:8:9-42 is also present at [com.github.jlmd:AnimatedCircleLoadingView:1.1.5] AndroidManifest.xml:13:9-41 value=(@string/app_name). Suggestion: add 'tools:replace="android:label"' to
element at AndroidManifest.xml:5:5-25:19 to override.`
Could you help me? I've already delete the .gradle file on C:/Users/(My User)/ and recompiled the dependencies. I don't anymore what to do.
huehuehuhe, I'm such a fool, I've manually changed the android:label="@string/app_name" to the label I wanted in the AndroidManifest, but now I'm getting this error:
``Error:error: attribute 'com.company.holmes.myteste:animCircleLoadingView_mainColor' not found.
Error:error: attribute 'com.company.holmes.myteste:animCircleLoadingView_secondaryColor' not found.
Error:error: attribute 'com.company.holmes.myteste:animCircleLoadingView_textColor' not found.
Error:attribute 'com.company.holmes.myteste:animCircleLoadingView_mainColor' not found.
Error:attribute 'com.company.holmes.myteste:animCircleLoadingView_secondaryColor' not found.
Error:attribute 'com.company.holmes.myteste:animCircleLoadingView_textColor' not found.
Error:failed linking file resources.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.
Failed to execute aapt`` can you help me?
After a long night with a lot of coffee, I've pass for a shitload of problems and finally, I've made it work!!!!
this my last issue I've corrected using this:
xmlns:app="http://schemas.android.com/apk/lib-auto" android:background="@android:color/holo_blue_dark" app:animCircleLoadingView_mainColor="@android:color/" app:animCircleLoadingView_secondaryColor="@android:color/black" app:animCircleLoadingView_textColor="@android:color/black"
After that, It was the time of the animation to appear, this was funny, see, the animation only started after I lock and unlock my phone, than I thought it was something with the view not being fully loaded as stated here: https://github.com/jlmd/AnimatedCircleLoadingView/issues/20
Then, I did this:
I called .startDeteminate() at an onWindowFocusChanged(boolean hasFocus), like this:
public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); animatedCircleLoadingView.startDeterminate();
but see. this onWindowFocusChanged() is called after every focus changed, so it runs only once, a made intern boolean, so the startDeterminate() is called only once, like stated here: https://stackoverflow.com/questions/19312109/execute-a-method-after-an-activity-is-visible-to-user
Is something like:
private boolean skipMethod = false; @Override public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); if(!jskipMethod){ animatedCircleofDeath.startDeterminate(); } skipMethod = true;
After this is one, I had others issues, but minor ones, till now is working!.
I hope this novel of mine might help someone.
@jlmd can you leave this as open?, so the people can find more easily?
Hey I just create a file xml. the name is attrs.xml and inside you put this.
<?xml version="1.0" encoding="utf-8"?> <resources> <declare-styleable name="AnimatedCircleLoadingView"> <attr name="animCircleLoadingView_mainColor" format="color" localization="suggested" /> <attr name="animCircleLoadingView_secondaryColor" format="color" localization="suggested" /> <attr name="animCircleLoadingView_checkMarkTintColor" format="color" localization="suggested" /> <attr name="animCircleLoadingView_failureMarkTintColor" format="color" localization="suggested" /> <attr name="animCircleLoadingView_textColor" format="color" localization="suggested" /> </declare-styleable> </resources>