Skip to content

Commit

Permalink
Merge pull request #58 from ome450901/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
williamyyu committed Jul 13, 2018
2 parents ff1ddda + be5f63f commit c0902ee
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 29 deletions.
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -16,7 +16,8 @@ Current we already have three RatingBars :
![](images/screenshot.png)
Icon made by [Freepik](http://www.freepik.com/) from www.flaticon.com

## What's New (v1.4.1)
## What's New (v1.4.2)
- Fix bug when the format of number is different in different country
- Fix minimum stars not working in recyclerView bug
- Implement minimum stars property
- Add setStarWidth and setStarHeight API (unit is pixel)
Expand Down Expand Up @@ -48,7 +49,7 @@ allprojects {
}
dependencies {
compile 'com.github.ome450901:SimpleRatingBar:1.4.1'
compile 'com.github.ome450901:SimpleRatingBar:1.4.2'
}
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -7,7 +7,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
20 changes: 10 additions & 10 deletions example/build.gradle
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
compileSdkVersion 27
buildToolsVersion '27.0.3'

defaultConfig {
applicationId "com.willy.example"
minSdkVersion 15
targetSdkVersion 26
targetSdkVersion 27
versionCode 1
versionName "1.0"

Expand All @@ -23,14 +23,14 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
testCompile 'junit:junit:4.12'
compile project(':library')
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
androidTestImplementation 'junit:junit:4.12'
implementation project(':library')
}
2 changes: 1 addition & 1 deletion example/src/main/java/com/willy/example/DemoFragment.java
Expand Up @@ -30,7 +30,7 @@ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
final BaseRatingBar baseRatingBar = (BaseRatingBar) view.findViewById(R.id.baseratingbar_main);
final ScaleRatingBar scaleRatingBar = (ScaleRatingBar) view.findViewById(R.id.scaleRatingBar);
final RotationRatingBar rotationRatingBar = (RotationRatingBar) view.findViewById(R.id.rotationratingbar_main);

baseRatingBar.setClearRatingEnabled(false);
baseRatingBar.setOnRatingChangeListener(new BaseRatingBar.OnRatingChangeListener() {
@Override
public void onRatingChange(BaseRatingBar ratingBar, float rating) {
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Mon Nov 20 09:17:27 CST 2017
#Wed Apr 18 14:06:28 CST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
14 changes: 7 additions & 7 deletions library/build.gradle
Expand Up @@ -3,12 +3,12 @@ apply plugin: 'com.github.dcendents.android-maven'
group = 'com.github.ome450901'

android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
compileSdkVersion 27
buildToolsVersion '27.0.3'

defaultConfig {
minSdkVersion 15
targetSdkVersion 26
targetSdkVersion 27
versionCode 1
versionName "1.0"

Expand All @@ -24,10 +24,10 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:26.1.0'
testCompile 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:27.1.1'
androidTestImplementation 'junit:junit:4.12'
}
9 changes: 4 additions & 5 deletions library/src/main/AndroidManifest.xml
@@ -1,13 +1,12 @@
<manifest package="com.willy.ratingbar"

xmlns:android="http://schemas.android.com/apk/res/android"
>

<application android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true"
>

<application
android:label="@string/app_name"
>

</application>

</manifest>
Expand Up @@ -4,6 +4,7 @@

import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.Locale;

/**
* Created by willy on 2018/3/8.
Expand Down Expand Up @@ -50,7 +51,7 @@ static float getValidMinimumStars(float minimumStars, int numStars, float stepSi

static DecimalFormat getDecimalFormat() {
if (mDecimalFormat == null) {
DecimalFormatSymbols symbols = new DecimalFormatSymbols();
DecimalFormatSymbols symbols = new DecimalFormatSymbols(Locale.ENGLISH);
symbols.setDecimalSeparator('.');
mDecimalFormat = new DecimalFormat("#.##", symbols);
}
Expand Down

0 comments on commit c0902ee

Please sign in to comment.