Skip to content

Commit

Permalink
update for Android Things
Browse files Browse the repository at this point in the history
  • Loading branch information
atsumi committed Jan 12, 2017
1 parent 8ac9009 commit 494a135
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 18 deletions.
18 changes: 9 additions & 9 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
Expand All @@ -82,6 +74,14 @@
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
Expand Down Expand Up @@ -115,7 +115,6 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" />
Expand Down Expand Up @@ -164,6 +163,7 @@
<orderEntry type="library" exported="" name="compilerCommon-2.2.3" level="project" />
<orderEntry type="library" exported="" name="kotlin-runtime-1.0.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-25.1.0" level="project" />
<orderEntry type="library" exported="" name="androidthings-0.1-devpreview" level="project" />
<orderEntry type="library" exported="" name="annotations-24.5.0" level="project" />
</component>
</module>
2 changes: 2 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,6 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'

provided 'com.google.android.things:androidthings:0.1-devpreview'
}
13 changes: 10 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@
xmlns:tools="http://schemas.android.com/tools"
package="info.nukoneko.android.lineandpoint">

<application android:allowBackup="true" android:label="@string/app_name"
android:icon="@drawable/ic_launcher" android:theme="@style/AppTheme"
tools:ignore="AllowBackup,GoogleAppIndexingWarning">
<application android:allowBackup="true"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
tools:ignore="AllowBackup,GoogleAppIndexingWarning,MissingApplicationIcon">
<uses-library android:name="com.google.android.things" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.IOT_LAUNCHER"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import info.nukoneko.android.lineandpoint.controller.FpsController;
import info.nukoneko.android.lineandpoint.controller.ObjectController;
import info.nukoneko.android.lineandpoint.databinding.ActivityMainBinding;

Expand All @@ -16,5 +17,6 @@ public void onCreate(Bundle savedIBundle) {

binding.animationView.setCanvasBackgroundColor(Color.argb(230, 0, 0, 0));
binding.animationView.addController(new ObjectController());
binding.animationView.addController(new FpsController());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ public void onUpdate() {

@Override
public void onDraw(Canvas c) {
c.drawText(String.format(Locale.getDefault(), "%.1f", mFps), 0, sFONT_SIZE - 2, mPaint);
c.drawText(String.format(Locale.getDefault(), "%.1f FPS", mFps), 0, sFONT_SIZE - 2, mPaint);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@SuppressWarnings("FieldCanBeLocal")
public class ObjectController extends NKAnimationBaseController {
private final static int BALL_NUM = 10;
private final static int BALL_NUM = 16;
private final static float __SIZE = 5;
private final float speed = 0.4f;

Expand Down
Binary file removed app/src/main/res/drawable-hdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-mdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xhdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary file not shown.
4 changes: 0 additions & 4 deletions app/src/main/res/values/styles.xml

This file was deleted.

0 comments on commit 494a135

Please sign in to comment.