Skip to content

Commit

Permalink
fix a bug with measuring more than 3 items
Browse files Browse the repository at this point in the history
  • Loading branch information
shuhart committed Nov 26, 2017
1 parent 65f5253 commit 982e7ee
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Usage
-----

1. Add jcenter() to repositories block in your gradle file.
2. Add `compile 'com.shuhart.stepview:stepview:1.0'` to your dependencies.
2. Add `compile 'com.shuhart.stepview:stepview:1.0.1'` to your dependencies.
2. Add `StepView` into your layouts or view hierarchy.
3. Look into the sample for additional details on how to use and configure the library.

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.android.tools.build:gradle:3.0.1'


// NOTE: Do not place your application dependencies here; they belong
Expand Down
2 changes: 1 addition & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
compile project(':stepview')
implementation project(':stepview')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ protected void onCreate(Bundle savedInstanceState) {
add("Beginning");
add("Intermediate\npage");
add("End");
add("Post step");
}});
findViewById(R.id.next).setOnClickListener(new View.OnClickListener() {
@Override
Expand Down
2 changes: 1 addition & 1 deletion stepview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ext {
siteUrl = 'https://github.com/shuhart/StepView'
gitUrl = 'https://github.com/shuhart/StepView.git'

libraryVersion = '1.0'
libraryVersion = '1.0.1'

developerId = 'shuhart'
developerName = 'Redrick Shuhart'
Expand Down
2 changes: 1 addition & 1 deletion stepview/src/main/java/com/shuhart/stepview/StepView.java
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ private int[] getCirclePositions(int[] textWidth) {
float spaceLeft = result[textWidth.length - 1] - result[0];
int margin = (int) (spaceLeft / (textWidth.length - 1));
for (int i = 1; i < textWidth.length - 1; i++) {
result[i] = result[i - 1] + i * margin;
result[i] = result[i - 1] + margin;
}
return result;
}
Expand Down

0 comments on commit 982e7ee

Please sign in to comment.