From a414491b7b37ce599d897b6ed92e7b6212097d9c Mon Sep 17 00:00:00 2001 From: Tilman Kranz Date: Fri, 23 Mar 2018 22:30:54 +0100 Subject: [PATCH] more README, less logging --- README.md | 23 +++++++++++++------ app/src/main/cpp/native-lib.cpp | 2 +- .../yellowrectangle/DrawYellowRectangle.java | 8 ------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 8088adc..146f407 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,32 @@ Drawing a Yellow Rectangle on Android ------------------------------------- -This is a gradle-based project for Android Studio, tested in Version 3.0.1. It builds an App "YellowRectangle" providing an activity "DrawYellowRectangle". +This is a gradle-based project for Android Studio, tested in Version 3.0.1. +It builds an App "YellowRectangle" providing an activity "DrawYellowRectangle". -The app, when launched, clears the display and draws a yellow rectangle on a black backdrop. +When launched, the app clears draws a yellow rectangle on a black backdrop. The app will exit on the first touch event. Dependencies ------------ -This project depends on the Allegro game development library (http://liballeg.org); the dependency is automatically resolved by Android Studio using the Maven AAR distribution at JFrog Bintray (https://bintray.com/liballeg/maven). +This project depends on the Allegro game development library (http://liballeg.org); +the dependency is automatically resolved by Android Studio using the Maven AAR +distribution of Allegro (https://bintray.com/liballeg/maven). Credits ------- -Elias Pschernig's step-by-step tutorial on using Allegro with Android Studio (https://github.com/liballeg/android). +Elias Pschernig's AAR distribution of Allegro and his step-by-step tutorial on using +it with Android Studio (https://github.com/liballeg/android). -Author, Questions and Contact ------------------------------ +See Also +-------- -Tilman Kranz \ No newline at end of file +Website of this project: http://tk-sls.de/wp/5082 + +Copying +------- + +Released into the Public Domain on Mar 23rd 2018 by Tilman Kranz . \ No newline at end of file diff --git a/app/src/main/cpp/native-lib.cpp b/app/src/main/cpp/native-lib.cpp index defe50f..5e4ff20 100644 --- a/app/src/main/cpp/native-lib.cpp +++ b/app/src/main/cpp/native-lib.cpp @@ -10,7 +10,7 @@ int main(int argc, char **argv) { al_install_touch_input(); al_install_keyboard(); - auto display = al_create_display(640, 480); + auto display = al_create_display(0, 0); auto queue = al_create_event_queue(); auto redraw = true; auto done = false; diff --git a/app/src/main/java/com/tksls/yellowrectangle/DrawYellowRectangle.java b/app/src/main/java/com/tksls/yellowrectangle/DrawYellowRectangle.java index c24bcf0..4ae231a 100644 --- a/app/src/main/java/com/tksls/yellowrectangle/DrawYellowRectangle.java +++ b/app/src/main/java/com/tksls/yellowrectangle/DrawYellowRectangle.java @@ -3,17 +3,9 @@ package com.tksls.yellowrectangle; -import android.util.Log; - import org.liballeg.android.AllegroActivity; public class DrawYellowRectangle extends AllegroActivity { - @Override - public void onStart() { - super.onStart(); - Log.i("DrawYellowRectangle", "On Start ....."); - } - static { System.loadLibrary("allegro"); System.loadLibrary("allegro_primitives");