akexorcist / roundcornerprogressbar Goto Github PK
View Code? Open in Web Editor NEW[Android] Round Corner Progress Bar Library for Android
License: Apache License 2.0
[Android] Round Corner Progress Bar Library for Android
License: Apache License 2.0
When I want to build my project only with the gradle addition of your project I receive the following errors...
\app\build\intermediates\res\debug\values\values.xml:497: error: Attribute "progress" has already been defined
\app\build\intermediates\res\debug\values\values.xml:497: error: Attribute "max" has already been defined
\app\build\intermediates\res\debug\values\values.xml:497: error: Attribute "iconSize" has already been defined
\app\build\intermediates\res\debug\values\values.xml:497: error: Attribute "iconPadding" has already been defined
Maybe add a prefix to all your custom attributes?
Hi i'm getting this through Firebase Crash Console, this happens when i put my app in background (recent list) for a while and then open it again after i dont know several minutes, then app crashes, thanks to firebase i can see the error. This is what it shows:
Thanks in advance.
Exception java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ayc.ayc_app/com.ayc.ayc_app.HolderActivity}: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.akexorcist.roundcornerprogressbar.common.BaseRoundCornerProgressBar$SavedState
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2209)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2269)
android.app.ActivityThread.access$800 (ActivityThread.java:139)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1210)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:136)
android.app.ActivityThread.main (ActivityThread.java:5102)
java.lang.reflect.Method.invokeNative (Method.java)
java.lang.reflect.Method.invoke (Method.java:515)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:803)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:619)
dalvik.system.NativeStart.main (NativeStart.java)
arrow_drop_down
Caused by android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.akexorcist.roundcornerprogressbar.common.BaseRoundCornerProgressBar$SavedState
android.os.Parcel.readParcelableCreator (Parcel.java:2154)
android.os.Parcel.readParcelable (Parcel.java:2104)
android.view.AbsSavedState.<init> (AbsSavedState.java:57)
android.view.View$BaseSavedState.<init> (View.java:18779)
com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar$SavedState.<init> (TextRoundCornerProgressBar.java:318)
com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar$SavedState.<init> (TextRoundCornerProgressBar.java:306)
com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar$SavedState$1.createFromParcel (TextRoundCornerProgressBar.java:340)
com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar$SavedState$1.createFromParcel (TextRoundCornerProgressBar.java:338)
android.os.Parcel.readParcelable (Parcel.java:2111)
android.os.Parcel.readValue (Parcel.java:2020)
android.os.Parcel.readSparseArrayInternal (Parcel.java:2382)
android.os.Parcel.readSparseArray (Parcel.java:1742)
android.os.Parcel.readValue (Parcel.java:2077)
android.os.Parcel.readArrayMapInternal (Parcel.java:2321)
android.os.Bundle.unparcel (Bundle.java:249)
android.os.Bundle.getSparseParcelableArray (Bundle.java:1275)
android.support.v4.app.FragmentManagerImpl.moveToState (FragmentManager.java:997)
android.support.v4.app.FragmentManagerImpl.moveToState (FragmentManager.java:1252)
android.support.v4.app.FragmentManagerImpl.moveToState (FragmentManager.java:1234)
android.support.v4.app.FragmentManagerImpl.dispatchCreate (FragmentManager.java:2041)
android.support.v4.app.Fragment.performCreate (Fragment.java:1964)
android.support.v4.app.FragmentManagerImpl.moveToState (FragmentManager.java:1029)
android.support.v4.app.FragmentManagerImpl.moveToState (FragmentManager.java:1252)
android.support.v4.app.FragmentManagerImpl.moveToState (FragmentManager.java:1234)
android.support.v4.app.FragmentManagerImpl.dispatchCreate (FragmentManager.java:2041)
android.support.v4.app.FragmentController.dispatchCreate (FragmentController.java:163)
android.support.v4.app.FragmentActivity.onCreate (FragmentActivity.java:331)
android.support.v7.app.AppCompatActivity.onCreate (AppCompatActivity.java:85)
com.ayc.ayc_app.HolderActivity.onCreate (HolderActivity.java:45)
android.app.Activity.performCreate (Activity.java:5248)
android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1110)
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2173)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2269)
android.app.ActivityThread.access$800 (ActivityThread.java:139)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1210)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:136)
android.app.ActivityThread.main (ActivityThread.java:5102)
java.lang.reflect.Method.invokeNative (Method.java)
java.lang.reflect.Method.invoke (Method.java:515)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:803)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:619)
dalvik.system.NativeStart.main (NativeStart.java)
Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@1b179a5d: Unmarshalling unknown type code 7471204 at offset 1112
STR:
Enable Don't keep activities in Developer options. Start the app and go to activity with the rc progressbar.
Get out of app and go back to it. crash.
From what i gathered
Happens due to progaurd
Need to add
-keepclassmembers class * implements android.os.Parcelable {
static ** CREATOR;
}
in progaurd-rules
The backgrouns color of progress doesn't change if I use the progress.setbackground
settting radius on IconRoundCornerProgressBar doens't work
Error:(52) No resource identifier found for attribute 'rcBackgroundRadius' in package 'xxxxx'
guess you forgot to add one line of code somewhere :)
Hello, nice work. I would like to suggest an addition. Instead of adding an icon at the beginning of progress bar, why not to add a TextView or another view.
Or is it already implemented?
Included com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar into xml.
compile 'com.akexorcist:RoundCornerProgressBar:2.0.3'
classpath 'com.android.tools.build:gradle:1.5.0'
buildToolsVersion '23.0.2'
Warning: com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar$2: can't find referenced method 'android.widget.TextView access$000(com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar)' in program class com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar
Warning: com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar$2: can't find enclosing method 'void setTextProgressAlign()' in program class com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar
Every time i get this error in xml layout unable to instantiate view.
Rendering Problems The following classes could not be instantiated:
- com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar (Open Class, Show Exception)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE Exception Details
java.lang.NullPointerException
at com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar.setBackgroundColor(RoundCornerProgressBar.java:194)
at com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar.(RoundCornerProgressBar.java:81)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:413)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:105)
at com.android.tools.idea.rendering.LayoutlibCallback.loadView(LayoutlibCallback.java:176)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:206)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:131)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:756)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:728)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:373)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:391)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:337)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350)
at com.android.tools.idea.rendering.RenderService$5.compute(RenderService.java:708)
at com.android.tools.idea.rendering.RenderService$5.compute(RenderService.java:697)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:932)
at com.android.tools.idea.rendering.RenderService.createRenderSession(RenderService.java:697)
at com.android.tools.idea.rendering.RenderService.render(RenderService.java:816)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.doRender(AndroidLayoutPreviewToolWindowManager.java:646)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.access$1700(AndroidLayoutPreviewToolWindowManager.java:82)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7$1.run(AndroidLayoutPreviewToolWindowManager.java:589)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7.run(AndroidLayoutPreviewToolWindowManager.java:584)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:327)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
I came to a issue where I was trying to get progress value on first inflation but I was getting only default value (0.0), not the one I set in xml. The problem got solved by chaning position of if branch
if (!isProgressSetBeforeDraw) {
progress = typedArray.getFloat(R.styleable.RoundCornerProgress_rcProgress, DEFAULT_CURRENT_PROGRESS);
secondaryProgress = typedArray.getFloat(R.styleable.RoundCornerProgress_rcSecondaryProgress, DEFAULT_SECONDARY_PROGRESS);
}
if (!isProgressColorSetBeforeDraw) {
setProgressColor(
typedArray.getColor(R.styleable.RoundCornerProgress_rcProgressColor, DEFAULT_PROGRESS_COLOR),
typedArray.getColor(R.styleable.RoundCornerProgress_rcSecondaryProgressColor, DEFAULT_SECONDARY_PROGRESS_COLOR)
);
}
if (!isMaxProgressSetBeforeDraw) {
max = typedArray.getFloat(R.styleable.RoundCornerProgress_rcMax, DEFAULT_MAX_PROGRESS);
}
I have used TextRoundCornerProgressBar and i want to suggest a enhancement of text gravity .
Currently it's rendering left of progress view and we can add this alignment as per user oriented like left,right or center.
Any plans of adding animation effects in the near future?
I use the color code #1577F0 (blue) but it seems to be drawing with #36303F (tuna), screenshot and code below
Screenshot => http://i.imgur.com/jf1c8PD.png
Code
productionDetailProgressBar.setProgressColor(R.color.colorPrimary);
productionDetailProgressBar.setMax(100);
And in xml
<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
android:id="@+id/progress_1"
android:layout_width="match_parent"
android:layout_height="30dp"
android:padding="8dp" />
Wondering if the pb can be rotated that way be display vertical sided?
I mean programmatically can be done by setRotation() method, the thing its i need like 5 progress bar's in conjuction and need them perfectly aligned one after another one.
Great work
hi,
I'm trying to use your library to implement a loading bar. However, when I use settings like :
I don't see any progress happening. Just an empty bar.
But when I explicitly put for example layout_width = 250dp , then it works without any problem. Here is a image of my layout xml :
Any suggestions? thank yoi
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.routeyou.startup/com.routeyou.ui.DownloadRouteActivity}: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.akexorcist.roundcornerprogressbar.common.BaseRoundCornerProgressBar$SavedState at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3184) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3294) at android.app.ActivityThread.access$1000(ActivityThread.java:210) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1704) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6938) at java.lang.reflect.Method.invoke(Method.java) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) Caused by android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.akexorcist.roundcornerprogressbar.common.BaseRoundCornerProgressBar$SavedState at android.os.Parcel.readParcelableCreator(Parcel.java:2295) at android.os.Parcel.readParcelable(Parcel.java:2245) at android.view.AbsSavedState.<init>(AbsSavedState.java:57) at android.view.View$BaseSavedState.<init>(View.java:21487) at com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar$SavedState.<init>(TextRoundCornerProgressBar.java:318) at com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar$SavedState.<init>(TextRoundCornerProgressBar.java:306) at com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar$SavedState$1.createFromParcel(TextRoundCornerProgressBar.java:340) at com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar$SavedState$1.createFromParcel(TextRoundCornerProgressBar.java:338) at android.os.Parcel.readParcelable(Parcel.java:2252) at android.os.Parcel.readValue(Parcel.java:2152) at android.os.Parcel.readSparseArrayInternal(Parcel.java:2546) at android.os.Parcel.readSparseArray(Parcel.java:1874) at android.os.Parcel.readValue(Parcel.java:2209) at android.os.Parcel.readArrayMapInternal(Parcel.java:2485) at android.os.BaseBundle.unparcel(BaseBundle.java:221) at android.os.Bundle.getSparseParcelableArray(Bundle.java:822) at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:2290) at android.app.Activity.onRestoreInstanceState(Activity.java:1170) at android.app.Activity.performRestoreInstanceState(Activity.java:1115) at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1190) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3157) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3294) at android.app.ActivityThread.access$1000(ActivityThread.java:210) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1704) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6938) at java.lang.reflect.Method.invoke(Method.java) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
Is it possible to use this libraries ProgressBar as a SeekBar?
If it's not a built in feature, how easy would it be to implement such a ability?
Please add minSdkVersion to library because of the strange beahviour described in the following stackoverflow discussion:
http://stackoverflow.com/questions/27490598/why-does-my-app-has-the-read-phone-state-permission-although-its-not-declared-i
I just experienced this when upgrading from 1.0.0 to 1.2.0
Thanks !
I'm trying out the component, but for me, the first 10% or so of the progress shows the bar being flattened at the leading edge. Once it gets to that 10% point and to the end (100%) it's fine, it just starts out flat.
Screencast : http://screencast.com/t/9pPW0k3cEVm
I am using 30dp radius.
Hey, i tried to use your progressBar but i had a window that is split into 2 sides left and right, i tried to use your progressbar but it tries to use the whore screen as the main width instead of one side.
using compile 'com.akexorcist:RoundCornerProgressBar:1.2.0'
my xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:baselineAligned="false"
android:orientation="horizontal"
android:paddingBottom="@dimen/main_screen_between_padding">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1.0"
android:layout_marginRight="@dimen/main_screen_between_padding"
android:layout_marginStart="@dimen/main_screen_between_padding"
android:layout_marginLeft="@dimen/main_screen_zero_dp"
android:layout_marginEnd="@dimen/main_screen_zero_dp"
android:background="@drawable/background_note"
android:id="@+id/note_button">
<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
android:id="@+id/audio_progress"
android:layout_width="fill_parent"
android:layout_height="20dp"
android:layout_above="@+id/textView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_margin="10dp"
app:rcProgressColor="@color/progressBarColor"
app:rcProgress="30"
app:rcMax="100"
app:rcBackgroundPadding="2dp"
app:rcBackgroundRadius="5dp"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:layout_marginEnd="@dimen/main_screen_zero_dp"
android:layout_marginLeft="@dimen/main_screen_between_padding"
android:layout_marginRight="@dimen/main_screen_zero_dp"
android:layout_marginStart="@dimen/main_screen_between_padding"
android:background="@drawable/background_pic"
android:id="@+id/photo_button">
</RelativeLayout>
</LinearLayout>
</LinearLayout>
When i try to render it in android studio:
java.lang.NullPointerException
at com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar.setBackgroundLayoutSize(RoundCornerProgressBar.java:48)
at com.akexorcist.roundcornerprogressbar.BaseRoundCornerProgressBar.onMeasure(BaseRoundCornerProgressBar.java:218)
at android.view.View.measure(View.java:17547)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:727)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:463)
at android.view.View.measure(View.java:17547)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5535)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)
at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1083)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:615)
at android.view.View.measure(View.java:17547)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5535)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:722)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:613)
at android.view.View.measure(View.java:17547)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5535)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:436)
at android.support.v7.internal.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:124)
at android.view.View.measure(View.java:17547)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5535)
at android.support.v7.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:444)
at android.view.View.measure(View.java:17547)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5535)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:722)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:613)
at android.view.View.measure(View.java:17547)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:875)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:613)
at android.view.View.measure(View.java:17547)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.measureView(RenderSessionImpl.java:640)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.render(RenderSessionImpl.java:540)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:323)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:497)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:485)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:894)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:485)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:590)
at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$6.run(AndroidDesignerEditorPanel.java:480)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:351)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Hello, will be gradle repo available for 1.2.4 release?
Hi,
I think we cannot add roundcornerprogressbar programmatically? Am i right? There is no roundcornerprogressbar(Context ctx).
To start, love the library. I am changing the padding of the progressbar pragmatically and it does not refresh the view to match the progress. How would I solve this issue. I will post two photos of the issue.
The progress bar is below the toolbar. I have set the max to 100 and progress to 50
Here is what the progress bar looks like when I change the padding on the left and right of it.
rcReverse
is reversed.layout_width
and layout_height
are switched.Hello. Tell me please, can I set drawable resource for progress, not color? Something like rcProgressDrawable
attribute. I would like to fill progress with drawable texture with tile mode. Can your library provide this feature? If not, is it planned in the future? Thanks in advance.
Hi!
I have this error on preview layout:
java.lang.NullPointerException at com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar.setBackgroundLayoutSize(RoundCornerProgressBar.java:50) at com.akexorcist.roundcornerprogressbar.common.BaseRoundCornerProgressBar.onMeasure(BaseRoundCornerProgressBar.java:220)
this is my layout file:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center">
<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
android:id="@+id/progress_splash_screen"
android:layout_height="32dp"
android:layout_width="match_parent"
app:backgroundPadding="5dp" />
</LinearLayout>
why??
im using 2.0.2, since its the only one that worked properly, but im having problems with corners, even when the radius is set, the bars corners do change by the bars view itself has corners , not sure how to get rid of it, i tried changing the background of it to transparent but does nothing ,
All *.iml files, as well as import-summary.txt shouldn't be at repository :P
Hi,
In onSizeChanged, there are 2 calls to drawPrimaryProgress with same parameters. The calls are on different threads , if I remove one of them the progress is not drawn. Why does the postDelayed needed? Why doesnt the first call take effect? I am asking because the postDelayed call causes an unwanted blink.
Thanks.
Hello!
How to emulate android:indeterminate?
http://www.materialdoc.com/content/images/2015/11/intro-v1.gif
Hello, nice work. I would like to suggest a new feature. Like set the property Text Alignment on the TextRoundCorner (Center, Left or Right)
Or is it already implemented?
Regards
When I set GONE visibility on the progressbar or the surrounding layout ,when visibility is set back to visible progress is not showing.Working normaly when INVISIBLE and back to VISIBLE ,but with GONE has a problem
Is it possible add a textview or a text inside the progressbar to show the percentage number?
I created an IconProgressBar. If I start the activity the icon is show very big for like a half second in the middle of the screen and dissapears then. This looks awful.
I used the 1.2.0 version before but I needed setOnIconClickListener() method,
So I upgrade to 2.0.0 and now all the attributes from the xml don't appear.
Even when set to app:rcRadius="1000dp"
it rcRadius doesn't change the default radius
Hey, how can I animate the whole progressBar?
I want to set the width from 0 to match parent with an animation.
Anyone knows how?
there is l
end of google play link and cause of google couldn't find this library on play store, fix it 👍
I have set rcMax as app:rcMax="10000"
and when I try to set progress such as 6000 the progress bar is stuck at a level of 5000
can you make ivProgressIcon
public.
There is some issues with view state restoring:
SavedState of BaseRoundCornerProgressBar does not write all the values in write in writeToParcel,
correct code is:
public void writeToParcel(Parcel out, int flags) {
super.writeToParcel(out, flags);
out.writeFloat(this.max);
out.writeFloat(this.progress);
out.writeFloat(this.secondaryProgress);
out.writeInt(this.backgroundWidth);
out.writeInt(this.backgroundHeight);
out.writeInt(this.radius);
out.writeInt(this.padding);
out.writeInt(this.progressColor);
out.writeInt(this.secondaryProgressColor);
out.writeInt(this.backgroundColor);
out.writeInt(this.layoutBackgroundColor);
out.writeInt(this.layoutProgress);
out.writeInt(this.layoutSecondaryProgress);
out.writeByte((byte) (this.isProgressBarCreated ? 1 : 0));
out.writeByte((byte) (this.isProgressSetBeforeDraw ? 1 : 0));
out.writeByte((byte) (this.isMaxProgressSetBeforeDraw ? 1 : 0));
out.writeByte((byte) (this.isBackgroundColorSetBeforeDraw ? 1 : 0));
out.writeByte((byte) (this.isProgressColorSetBeforeDraw ? 1 : 0));
out.writeByte((byte) (this.isScreenMeasure ? 1 : 0));
out.writeByte((byte) (this.isBackgroundLayourSet ? 1 : 0));
}
After fixing this issue I am getting other issues with IconRoundCornerProgressBar
Caused by: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.ake
xorcist.roundcornerprogressbar.common.BaseRoundCornerProgressBar$SavedState
E at android.os.Parcel.readParcelableCreator(Parcel.java:2289)
E at android.os.Parcel.readParcelable(Parcel.java:2239)
E at android.view.AbsSavedState.(AbsSavedState.java:57)
E at android.view.View$BaseSavedState.(View.java:20038)
E at com.akexorcist.roundcornerprogressbar.IconRoundCornerProgressBar$SavedState.(IconRo
undCornerProgressBar.java:216)
E at com.akexorcist.roundcornerprogressbar.IconRoundCornerProgressBar$SavedState.(IconRo
undCornerProgressBar.java:202)
E at com.akexorcist.roundcornerprogressbar.IconRoundCornerProgressBar$SavedState$1.createFromP
arcel(IconRoundCornerProgressBar.java:240)
E at com.akexorcist.roundcornerprogressbar.IconRoundCornerProgressBar$SavedState$1.createFromP
arcel(IconRoundCornerProgressBar.java:238)
E at android.os.Parcel.readParcelable(Parcel.java:2246)
E at android.os.Parcel.readValue(Parcel.java:2146)
E at android.os.Parcel.readSparseArrayInternal(Parcel.java:2540)
E at android.os.Parcel.readSparseArray(Parcel.java:1868)
E at android.os.Parcel.readValue(Parcel.java:2203)
E at android.os.Parcel.readArrayMapInternal(Parcel.java:2479)
E at android.os.BaseBundle.unparcel(BaseBundle.java:221)
E at android.os.Bundle.getSparseParcelableArray(Bundle.java:871)
E at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1979)
E at android.app.Activity.onRestoreInstanceState(Activity.java:1022)
E at android.app.Activity.performRestoreInstanceState(Activity.java:977)
E at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1161)
E at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2271)
All tested with the sample prject and with don't keep actitivties activated
Hi, I need a vertical round corner progress bar that match parent's height.
Any solution?
With last version(2.0.2), who is the new attribute name
@akexorcist The 1.2.0 release is missing BaseRoundCornerProgressBar. Could you cut a 1.3.0 release off of master?
Thanks
Tommy
I would like to implement this progress bar but with a vertical orientation.
Is that possible? If so what syntax would i need?
Thanks in advance
Hello, I made a temporary implementation while waiting for the request to be evaluated.
This is a simple tutorial in which you will need to create some custom files.
Create a class with a custom name. In example, let's say CenteredProgressBar.java.
What you need is:
to extend com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar:
import com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar;
public class CenteredProgressBar extends RoundCornerProgressBar {
}
to create two constructors matching super class:
public CenteredProgressBar(Context context, AttributeSet attrs) {
super(context, attrs);
}
public CenteredProgressBar(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
since @akexorcist uses them both and we need to use them
to override the drawProgress method, using MarginLayoutParams to simulate a left margin equal to (max width - current width) / 2:
@SuppressWarnings("deprecation")
@Override
protected void drawProgress(LinearLayout layoutProgress, float max, float progress, float totalWidth,
int radius, int padding, int colorProgress, boolean isReverse) {
super.drawProgress(layoutProgress, max, progress, totalWidth, radius, padding, colorProgress, isReverse);
MarginLayoutParams params = (MarginLayoutParams) layoutProgress.getLayoutParams();
float ratio = max / progress;
float progressWidth = (totalWidth - (padding * 2)) / ratio;
float deltaWidth = totalWidth - progressWidth;
params.setMargins((int) (deltaWidth / 2), params.topMargin, (int) (deltaWidth / 2), params.bottomMargin);
layoutProgress.setLayoutParams(params);
}
It's simple! Just call your custom object in your layout.
<com.your.app.package.CenteredProgressBar
android:layout_width="80dp"
android:layout_height="8dp"
android:layout_gravity="center_horizontal|center_vertical"
android:layout_margin="8dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:rcBackgroundPadding="1dp"
app:rcBackgroundColor="#000000"
app:rcProgress="0.3"
app:rcMax="1" />
Here is an example. The grey background is from my external layout, you would not see it if you copy paste.
The gradient bar color is explained in another issue: #39
I would like to give my thanks to @akexorcist for his awesome work. It really boosted my app development!
Hi guys,
I am using your widget on my app. In android 2.3.7 version, I have an error although I use 1.1.0 version. It crashes while inflating the view. And there is logcat below:
882-882/com.sembozdemir.dortislem E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.NoSuchMethodError: android.view.ViewTreeObserver.removeOnGlobalLayoutListener
at com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar$1.onGlobalLayout(RoundCornerProgressBar.java:109)
at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:549)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1189)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1859)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
by the way: Click here if you want to see the app
Hi thanks for sharing the library.
I wonder
that in the version 'com.akexorcist: RoundCornerProgressBar: 1.0.0' not found "TextRoundCornerProgressBar" class;
?
sorry for my bad English :)
Method "removeOnGlobalLayoutListener" is API Level 16
Method "setProgressColor" in RoundCornerProgressBar class is wrong.
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
layoutBackground.setBackground(gradient);
} else {
layoutBackground.setBackgroundDrawable(gradient);
}
Please fix it.
Nice library. Thx.
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.