diff --git a/README.md b/README.md index 3021743..c8d451f 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ repositories { } dependencies { - compile 'com.github.erz05:JoyStick:1.0.2@aar' + compile 'com.github.erz05:JoyStick:1.0.3@aar' } ``` diff --git a/app/build.gradle b/app/build.gradle index d0bfffa..9a05971 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 23 - buildToolsVersion "23.0.1" + compileSdkVersion 25 + buildToolsVersion "25" defaultConfig { applicationId "com.erz.joystick" minSdkVersion 11 - targetSdkVersion 23 + targetSdkVersion 25 versionCode 1 versionName "1.0" } @@ -22,7 +22,7 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' - compile 'com.android.support:appcompat-v7:23.1.0' - compile 'com.android.support:design:23.1.0' + compile 'com.android.support:appcompat-v7:25.0.0' + compile 'com.android.support:design:25.0.0' compile project(':joysticklibrary') -} +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index ad5a924..7266936 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -21,4 +21,4 @@ - + \ No newline at end of file diff --git a/app/src/main/java/com/erz/joystick/GameLoop.java b/app/src/main/java/com/erz/joystick/GameLoop.java index 00396ec..71e2b5f 100644 --- a/app/src/main/java/com/erz/joystick/GameLoop.java +++ b/app/src/main/java/com/erz/joystick/GameLoop.java @@ -46,4 +46,4 @@ public class GameLoop extends Thread { } catch (Exception ignore) {} } } -} +} \ No newline at end of file diff --git a/app/src/main/java/com/erz/joystick/GameView.java b/app/src/main/java/com/erz/joystick/GameView.java index 13a6d9f..4ff2ce7 100644 --- a/app/src/main/java/com/erz/joystick/GameView.java +++ b/app/src/main/java/com/erz/joystick/GameView.java @@ -78,13 +78,13 @@ public class GameView extends SurfaceView implements SurfaceHolder.Callback { canvas.drawColor(Color.BLACK); if (stars != null && stars.size() > 0) { - for (i=0; i width - radius) posX = width - radius; if (posX < radius) posX = radius; if (posY > height - radius) posY = height - radius; @@ -110,23 +110,23 @@ public class GameView extends SurfaceView implements SurfaceHolder.Callback { this.height = height; min = Math.min(width, height); - centerX = width/2; - centerY = height/2; + centerX = width / 2; + centerY = height / 2; posX = centerX; posY = centerY; - radius = min/12; + radius = min / 12; rectF = new RectF(posX - radius, posY - radius, posX + radius, posY + radius); - minSpeed = (int) (min/75); - maxSpeed = (int) (min/25); + minSpeed = (int) (min / 75); + maxSpeed = (int) (min / 25); - minRadius = (int) (min/250); - maxRadius = (int) (min/220); + minRadius = (int) (min / 250); + maxRadius = (int) (min / 220); if (maxRadius == minRadius) maxRadius += minRadius; stars = new Vector<>(); - for (i=0; i