Skip to content

Commit

Permalink
Fix for Android Studio 2.3.x freeze when in Layout Preview. (#215)
Browse files Browse the repository at this point in the history
Fixes Android Studio 2.3.x freeze when in Layout Preview.
Update plugin versions and build tools to the newest ones.
Library version update to 4.3.1
  • Loading branch information
zawadz88 authored Oct 5, 2017
1 parent c63fd62 commit c847fbf
Show file tree
Hide file tree
Showing 27 changed files with 77 additions and 32 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).


## [4.3.1]
### Fixed
- Android Studio 2.3.x freeze introduced with version 4.1.0 of the library when using tabs

## [4.3.0]
### Added
- A way to set bottom navigation button colors programmatically via:
Expand Down Expand Up @@ -40,6 +45,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- **Breaking change:** Changed `setNextButtonLabel` methods in `StepViewModel.Builder` to `setEndButtonLabel` so that it works for both Next and Complete buttons (issue #107)
- **Breaking change:** Split `content` stepper feedback type into `content_progress` and `content_fade`.

[4.3.1]: https://github.com/stepstone-tech/android-material-stepper/compare/v4.3.0...v4.3.1
[4.3.0]: https://github.com/stepstone-tech/android-material-stepper/compare/v4.2.0...v4.3.0
[4.2.0]: https://github.com/stepstone-tech/android-material-stepper/compare/v4.1.0...v4.2.0
[4.1.0]: https://github.com/stepstone-tech/android-material-stepper/compare/v4.0.0...v4.1.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,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:4.3.0'
compile 'com.stepstone.stepper:material-stepper:4.3.1'
```

*Note:* This library adds a transitive dependency to AppCompat `25.4.0`
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
ext.gradleAndroidVersion = '3.0.0-beta6'
ext.kotlinVersion = '1.1.3-2'
ext.gradleAndroidVersion = '3.0.0-beta7'
ext.kotlinVersion = '1.1.4-3'
ext.bintrayVersion = '1.7.3'
ext.mavenGradlePluginVersion = '2.0'

Expand Down Expand Up @@ -30,7 +30,7 @@ configure(allprojects) {
androidMinSdkVersion = 14
androidTargetSdkVersion = 25
androidCompileSdkVersion = 25
androidBuildToolsVersion = '25.0.2'
androidBuildToolsVersion = '26.0.2'
androidSupportLibraryVersion = '25.4.0'

junitVersion = '4.12'
Expand Down
4 changes: 2 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ machine:
dependencies:
pre:
- wget "https://services.gradle.org/distributions/gradle-4.1-bin.zip"; unzip gradle-4.1-bin.zip
- if [ ! -e /usr/local/android-sdk-linux/build-tools/25.0.2 ]; then echo y | android update sdk --all --no-ui --filter "build-tools-25.0.2"; fi;
- if [ ! -e /usr/local/android-sdk-linux/build-tools/26.0.2 ]; then echo y | android update sdk --all --no-ui --filter "build-tools-26.0.2"; fi;
- if [ ! -e /usr/local/android-sdk-linux/platforms/android-25 ]; then echo y | android update sdk --all --no-ui --filter "android-25"; fi;
- if ! $(grep -q "Revision=47.0.0" /usr/local/android-sdk-linux/extras/android/m2repository/source.properties); then echo y | android update sdk --all --no-ui --filter "extra-android-m2repository"; fi;
- echo y | android update sdk --no-ui --all --filter tool,extra-google-google_play_services
- printf 'bintray.user=dummy_user\nbintray.apikey=dummy_api_key\nsdk.dir=/usr/local/android-sdk-linux' > local.properties

cache_directories:
- /usr/local/android-sdk-linux/build-tools/25.0.2
- /usr/local/android-sdk-linux/build-tools/26.0.2
- /usr/local/android-sdk-linux/platforms/android-25
- /usr/local/android-sdk-linux/extras/android/m2repository

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
POM_GROUP_ID=com.stepstone.stepper
POM_ARTIFACT_ID=material-stepper
POM_TEST_ARTIFACT_ID=espresso-material-stepper
POM_VERSION=4.3.0
POM_VERSION=4.3.1

#Needed so that Robolectric is working: https://github.com/robolectric/robolectric/issues/3169
android.enableAapt2=false
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.stepstone.stepper.internal.type;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.RestrictTo;
import android.util.SparseArray;
Expand Down Expand Up @@ -53,10 +52,10 @@ public TabsStepperType(StepperLayout stepperLayout) {
mTabsContainer.setListener(stepperLayout);

if (stepperLayout.isInEditMode()) {
Context context = stepperLayout.getContext();
//noinspection ConstantConditions
mTabsContainer.setSteps(Arrays.asList(
new StepViewModel.Builder(context).setTitle("Step 1").create(),
new StepViewModel.Builder(context).setTitle("Step 2").setSubtitle("Optional").create())
new StepViewModel.Builder(null).setTitle("Step 1").create(),
new StepViewModel.Builder(null).setTitle("Step 2").setSubtitle("Optional").create())
);
mTabsContainer.updateSteps(0, new SparseArray<VerificationError>(), false);
mTabsContainer.setVisibility(View.VISIBLE);
Expand Down
2 changes: 1 addition & 1 deletion material-stepper/src/main/res/layout/ms_step_tab.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:orientation="vertical"
tools:layout_height="wrap_content"
tools:layout_width="wrap_content"
tools:parentTag="com.stepstone.stepper.internal.widget.StepTab"
tools:parentTag="android.widget.RelativeLayout"
tools:theme="@style/MSDefaultStepperLayoutTheme">

<FrameLayout
Expand Down
4 changes: 3 additions & 1 deletion sample/src/main/res/layout/activity_combination.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ms_stepperType="dots" />
app:ms_stepperType="dots"
tools:theme="@style/AppTheme" />
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ms_showBackButtonOnFirstStep="true"
app:ms_stepperType="dots"/>
app:ms_stepperType="dots"
tools:theme="@style/AppTheme" />
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
tools:theme="@style/AppTheme" />
4 changes: 3 additions & 1 deletion sample/src/main/res/layout/activity_default_dots.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ms_stepperType="dots"/>
app:ms_stepperType="dots"
tools:theme="@style/AppTheme" />
4 changes: 3 additions & 1 deletion sample/src/main/res/layout/activity_default_none.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ms_stepperType="none"/>
app:ms_stepperType="none"
tools:theme="@style/AppTheme" />
4 changes: 3 additions & 1 deletion sample/src/main/res/layout/activity_default_progress_bar.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ms_stepperType="progress_bar" />
app:ms_stepperType="progress_bar"
tools:theme="@style/AppTheme" />
4 changes: 3 additions & 1 deletion sample/src/main/res/layout/activity_default_tabs.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ms_stepperType="tabs" />
app:ms_stepperType="tabs"
tools:theme="@style/AppTheme" />
4 changes: 3 additions & 1 deletion sample/src/main/res/layout/activity_delayed_transition.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ms_stepperType="tabs"
app:ms_showErrorState="true" />
app:ms_showErrorState="true"
tools:theme="@style/AppTheme" />
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ms_stepperType="tabs"
app:ms_tabNavigationEnabled="false" />
app:ms_tabNavigationEnabled="false"
tools:theme="@style/AppTheme" />
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ms_stepperType="tabs"
app:ms_showErrorStateEnabled="true"
app:ms_errorColor="@color/colorButton"/>
app:ms_errorColor="@color/colorButton"
tools:theme="@style/AppTheme" />
4 changes: 3 additions & 1 deletion sample/src/main/res/layout/activity_error_tabs.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ms_stepperType="tabs"
app:ms_showErrorStateEnabled="true" />
app:ms_showErrorStateEnabled="true"
tools:theme="@style/AppTheme" />
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ms_stepperType="tabs"
app:ms_showErrorStateEnabled="true"
app:ms_showErrorMessageEnabled="true"/>
app:ms_showErrorMessageEnabled="true"
tools:theme="@style/AppTheme" />
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ms_showBottomNavigation="false"
app:ms_stepperType="tabs" />
app:ms_stepperType="tabs"
tools:theme="@style/AppTheme" />
4 changes: 3 additions & 1 deletion sample/src/main/res/layout/activity_no_frag.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ms_stepperType="tabs"
app:ms_showErrorState="true"
app:ms_showErrorStateOnBack="true"/>
app:ms_showErrorStateOnBack="true"
tools:theme="@style/AppTheme" />
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ms_stepperType="dots"
app:ms_showErrorState="true" />
app:ms_showErrorState="true"
tools:theme="@style/AppTheme" />
4 changes: 3 additions & 1 deletion sample/src/main/res/layout/activity_return_button.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ms_showBackButtonOnFirstStep="true"
app:ms_stepperType="dots"/>
app:ms_stepperType="dots"
tools:theme="@style/AppTheme" />
4 changes: 3 additions & 1 deletion sample/src/main/res/layout/activity_stepper_feedback.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -12,4 +13,5 @@
app:ms_stepperFeedbackType="tabs|content_progress|content_fade|disabled_bottom_navigation|disabled_content_interaction"
app:ms_stepperFeedback_contentFadeAlpha="0.3"
app:ms_stepperFeedback_contentOverlayBackground="@color/custom_overlay_background"
app:ms_stepperType="tabs" />
app:ms_stepperType="tabs"
tools:theme="@style/AppTheme" />
4 changes: 3 additions & 1 deletion sample/src/main/res/layout/activity_styled_dots.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -10,4 +11,5 @@
app:ms_backButtonColor="@color/ms_custom_button_text_color"
app:ms_nextButtonColor="@color/ms_custom_button_text_color"
app:ms_completeButtonColor="@color/ms_custom_button_text_color"
app:ms_bottomNavigationBackground="?attr/colorAccent" />
app:ms_bottomNavigationBackground="?attr/colorAccent"
tools:theme="@style/AppTheme" />
4 changes: 3 additions & 1 deletion sample/src/main/res/layout/activity_styled_progress_bar.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -15,4 +16,5 @@
app:ms_nextButtonText="GO"
app:ms_completeButtonText="FINISH"
app:ms_completeButtonBackground="@drawable/ms_button_background"
app:ms_stepperLayoutTheme="@style/StepperLayoutThemeWithCenteredCompleteButton"/>
app:ms_stepperLayoutTheme="@style/StepperLayoutThemeWithCenteredCompleteButton"
tools:theme="@style/AppTheme" />
4 changes: 3 additions & 1 deletion sample/src/main/res/layout/activity_themed_dots.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepperLayout"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
tools:theme="@style/AppTheme" />

0 comments on commit c847fbf

Please sign in to comment.