fix: override setEnbled
This commit is contained in:
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@@ -8,6 +8,7 @@
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/corelibrary" />
|
||||
<option value="$PROJECT_DIR$/simple" />
|
||||
</set>
|
||||
</option>
|
||||
|
||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -37,7 +37,7 @@
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="Android API 23 Platform" project-jdk-type="Android SDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="Android API 23 Platform" project-jdk-type="Android SDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
1
.idea/modules.xml
generated
1
.idea/modules.xml
generated
@@ -3,6 +3,7 @@
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/VerificationCodeInput.iml" filepath="$PROJECT_DIR$/VerificationCodeInput.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/corelibrary/corelibrary.iml" filepath="$PROJECT_DIR$/corelibrary/corelibrary.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/simple/simple.iml" filepath="$PROJECT_DIR$/simple/simple.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
|
||||
@@ -68,7 +68,6 @@ Step 2. Add the dependency
|
||||
dependencies {
|
||||
compile 'com.github.liuguangli:VerificationCodeInput:1.0'
|
||||
}
|
||||
Share this release:
|
||||
|
||||
# MIT
|
||||
|
||||
|
||||
@@ -181,11 +181,22 @@ public class VerificationCodeInput extends ViewGroup {
|
||||
|
||||
if (listener != null) {
|
||||
listener.onComplete(stringBuilder.toString());
|
||||
setEnabled(false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnabled(boolean enabled) {
|
||||
int childCount = getChildCount();
|
||||
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
View child = getChildAt(i);
|
||||
child.setEnabled(enabled);
|
||||
}
|
||||
}
|
||||
|
||||
public void setOnCompleteListener(Listener listener){
|
||||
this.listener = listener;
|
||||
}
|
||||
@@ -239,7 +250,7 @@ public class VerificationCodeInput extends ViewGroup {
|
||||
|
||||
}
|
||||
|
||||
public static interface Listener {
|
||||
public interface Listener {
|
||||
void onComplete(String content);
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
include ':simple'//, ':corelibrary'
|
||||
include ':simple', ':corelibrary'
|
||||
|
||||
@@ -26,6 +26,6 @@ dependencies {
|
||||
})
|
||||
compile 'com.android.support:appcompat-v7:24.2.1'
|
||||
testCompile 'junit:junit:4.12'
|
||||
compile 'com.github.liuguangli:VerificationCodeInput:1.0'
|
||||
//compile project(':corelibrary');
|
||||
//compile 'com.github.liuguangli:VerificationCodeInput:1.0'
|
||||
compile project(':corelibrary');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user