Comments (3)
the button does not animate when click
You mean when you are setting progress second time it's not visible?
Can you tell me following:
- are you using
PROGRESS
orENDLESS
mode? - before
onComplete()
method is called what isbSendPin.getProgress()
value?
from android-process-button.
Hi,
Thanks for the reply!
Here's an example video ; http://www.gfycat.com/BrilliantThoughtfulKawala
Yes, the progress is not visible on the second time.
I'm using ENDLESS
mode
This is the code used before the onComplete
is called. res
is a string result of a web request.
if (res.equals("success")) { //if web request is successful
button.setProgress(100); // set to 100% -> which means button's text = "Success"
} else {
button.setProgress(-1);
button.setText(res); // set button's text to web request fail text to display to user
}
mListener.onComplete();
And on the listener's onComplete function
public void onComplete() {
if (!bSendPin.getText().toString().equals("Success")) { // if there's an error message
bSendPin.setEnabled(true); //reenable button
bSendPin.setProgress(0); //set progress to 0
} else {
Toast.makeText(MainActivity.this, "SUCCESS", Toast.LENGTH_SHORT).show();
}
}
from android-process-button.
I've "fixed" it by changing the value of mProgress
to 0
, else the progress is 100
when I re-enable the button. Is it feasible to implement a function to re-enable the button automatically in the library or is this on the programmers' end to do it (set the progress back to 0 etc.)?
Thank you so much!
from android-process-button.
Related Issues (20)
- README HOT 3
- How to signal error HOT 1
- How to use it in eclipse
- Layout xml
- setText doesn't modify normal text
- Single Line True Does Not Show Progress Bar
- Question: re-enable button after tot secs HOT 2
- Re-enabling Button for user to click again. HOT 1
- Problem using your code HOT 1
- Round Corners HOT 1
- Decrease min SDK to 9, Update targetSdkVersion, compileSdkVersion to 24, update support library version to latest
- Owner, where are you? HOT 2
- drawable background dosnt work ..
- Start Progress start after task complete ?
- The text don't change
- How to change font?
- How to make Edges Rounded? HOT 1
- Action Process Button will show loading progress animation only on first time
- Binary XML file line #212: Binary XML file line #212: Error inflating class com.dd.CircularProgressButton HOT 1
- Process button
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-process-button.