Skip to content

Commit

Permalink
* Fixed an issue where tab navigation should be disabled when using '…
Browse files Browse the repository at this point in the history
…tabs' stepper feedback & disabled tab navigation attribute (issue #105).

* Updated Android Support Library to 25.3.1
* Updated library version to 3.2.1
  • Loading branch information
Piotr Zawadzki authored and zawadz88 committed May 10, 2017
1 parent 2706769 commit 7cf654e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Moreover, you can find there other examples, e.g. how to persist state on rotati

### Download (from JCenter)
```groovy
compile 'com.stepstone.stepper:material-stepper:3.2.0'
compile 'com.stepstone.stepper:material-stepper:3.2.1'
```

### Create layout in XML
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ configure(allprojects) {
androidTargetSdkVersion = 25
androidCompileSdkVersion = 25
androidBuildToolsVersion = "25.0.2"
androidSupportLibraryVersion = "25.2.0"
androidSupportLibraryVersion = "25.3.1"

junitVersion = "4.12"
mockitoVersion = "1.10.19"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@

POM_GROUP_ID=com.stepstone.stepper
POM_ARTIFACT_ID=material-stepper
POM_VERSION=3.2.0
POM_VERSION=3.2.1
Original file line number Diff line number Diff line change
Expand Up @@ -539,20 +539,24 @@ public void updateErrorFlag(boolean hasError) {
}

/**
* Shows a progress indicator. This does not have to be a progress bar and it depends on chosen stepper feedback types.
* Shows a progress indicator if not already shown. This does not have to be a progress bar and it depends on chosen stepper feedback types.
* @param progressMessage optional progress message if supported by the selected types
*/
public void showProgress(@NonNull String progressMessage) {
mInProgress = true;
mStepperFeedbackType.showProgress(progressMessage);
if (!mInProgress) {
mStepperFeedbackType.showProgress(progressMessage);
mInProgress = true;
}
}

/**
* Hides the progress indicator.
* Hides the progress indicator if visible.
*/
public void hideProgress() {
mInProgress = false;
mStepperFeedbackType.hideProgress();
if (mInProgress) {
mInProgress = false;
mStepperFeedbackType.hideProgress();
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public class TabsStepperFeedbackType implements StepperFeedbackType {

private final float mProgressMessageTranslationWhenHidden;

private boolean mTabNavigationEnabled;

private TextView mProgressMessageTextView;

private View mTabs;
Expand All @@ -54,6 +56,7 @@ public TabsStepperFeedbackType(@NonNull StepperLayout stepperLayout) {

@Override
public void showProgress(@NonNull String progressMessage) {
mTabNavigationEnabled = mStepperLayout.isTabNavigationEnabled();
setTabNavigationEnabled(false);
mProgressMessageTextView.setText(progressMessage);
mProgressMessageTextView.animate()
Expand All @@ -70,7 +73,7 @@ public void showProgress(@NonNull String progressMessage) {

@Override
public void hideProgress() {
setTabNavigationEnabled(true);
setTabNavigationEnabled(mTabNavigationEnabled);

mProgressMessageTextView.animate()
.setStartDelay(0)
Expand Down

0 comments on commit 7cf654e

Please sign in to comment.