diff --git a/README.md b/README.md index eec794b..8368852 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,24 @@ alias pixel4='$ANDROID_HOME/emulator/emulator -avd "Pixel_4_API_30"' // Navigate to skulls/ and generate the .aar binding: ebitenmobile bind -target android -javapkg com.<your-username>.skulls -o skulls.aar github.com/rootVIII/skulls/skullsebitenbind -// Import the new .aar as a module -// in app/src/main/java/<your username>/MainActivity.java place the following: +// Open an Empty Activity in Android Studio and name it SkullsMobile + +// Import the new .aar as a module: +// Select File, New, New Module, Import .jar/.aar Package, select the previously built .aar named skulls.aar +// In app/build.gradle, add this line to the dependencies: compile project(':skulls') +dependencies { + implementation 'androidx.appcompat:appcompat:1.3.0' + implementation 'com.google.android.material:material:1.3.0' + implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + testImplementation 'junit:junit:4.+' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + compile project(':skulls') +} +// Then synch the change to the build.gradle + + +// Place the following in app/src/main/java/<your username>/MainActivity.java: package com.<your-username>.skullsmobile; @@ -69,7 +85,7 @@ public class MainActivity extends AppCompatActivity { } } -// add a separate error handling class in app/src/main/java/<your username>/EbitenViewWithErrorHandling.java +// Add a separate error handling class in app/src/main/java/<your-username>/EbitenViewWithErrorHandling.java package com.solsticenet.skullsmobile; import android.content.Context; @@ -98,24 +114,20 @@ class EbitenViewWithErrorHandling extends EbitenView { // Add the below into app/src/main/res/AndroidManifest.xml: <?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="com.<your-username>.skullsmobile"> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/background_material_dark" + android:keepScreenOn="true" + tools:context="com.<your-username>.skullsmobile.MainActivity"> - <application - android:allowBackup="true" - android:icon="@mipmap/ic_launcher" - android:label="@string/app_name" - android:roundIcon="@mipmap/ic_launcher_round" - android:supportsRtl="true" - android:theme="@style/Theme.SkullsMobile"> - <activity android:name=".MainActivity"> - <intent-filter> - <action android:name="android.intent.action.MAIN" /> - <category android:name="android.intent.category.LAUNCHER" /> - </intent-filter> - </activity> - </application> -</manifest> + <com.solsticenet.skullsmobile.EbitenViewWithErrorHandling + android:id="@+id/ebitenview" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:focusable="true" /> +</RelativeLayout>