summaryrefslogtreecommitdiffstats
path: root/Android
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-29 15:41:47 +0200
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-29 15:41:47 +0200
commitfe61687b97d55c92bb29bf6aae1288433229353d (patch)
tree3701e23efd1969ebc7a32b51bcabfc08fafa72a4 /Android
parentAnvilStats: Overall statistics and mobspawner statistics. (diff)
downloadcuberite-fe61687b97d55c92bb29bf6aae1288433229353d.tar
cuberite-fe61687b97d55c92bb29bf6aae1288433229353d.tar.gz
cuberite-fe61687b97d55c92bb29bf6aae1288433229353d.tar.bz2
cuberite-fe61687b97d55c92bb29bf6aae1288433229353d.tar.lz
cuberite-fe61687b97d55c92bb29bf6aae1288433229353d.tar.xz
cuberite-fe61687b97d55c92bb29bf6aae1288433229353d.tar.zst
cuberite-fe61687b97d55c92bb29bf6aae1288433229353d.zip
Diffstat (limited to '')
-rw-r--r--Android/gen/com/mcserver/R.java12
-rw-r--r--Android/jni/Android.mk1
-rw-r--r--Android/res/layout/main.xml37
-rw-r--r--Android/res/values/strings.xml1
-rw-r--r--Android/src/com/mcserver/MCServerActivity.java11
5 files changed, 45 insertions, 17 deletions
diff --git a/Android/gen/com/mcserver/R.java b/Android/gen/com/mcserver/R.java
index db35f6b33..dd996a43f 100644
--- a/Android/gen/com/mcserver/R.java
+++ b/Android/gen/com/mcserver/R.java
@@ -14,11 +14,12 @@ public final class R {
public static final int ic_launcher=0x7f020000;
}
public static final class id {
- public static final int ip_address=0x7f050004;
- public static final int listView1=0x7f050005;
- public static final int server_status_text=0x7f050003;
- public static final int start_server=0x7f050001;
- public static final int stop_server=0x7f050002;
+ public static final int configure_server=0x7f050003;
+ public static final int ip_address=0x7f050005;
+ public static final int listView1=0x7f050006;
+ public static final int server_status_text=0x7f050004;
+ public static final int start_server=0x7f050002;
+ public static final int stop_server=0x7f050001;
public static final int textView2=0x7f050000;
}
public static final class layout {
@@ -27,6 +28,7 @@ public final class R {
}
public static final class string {
public static final int app_name=0x7f040001;
+ public static final int configure=0x7f040007;
public static final int hello=0x7f040000;
public static final int mcserver_is_not_running=0x7f040005;
public static final int mcserver_is_running=0x7f040004;
diff --git a/Android/jni/Android.mk b/Android/jni/Android.mk
index ae0123ba2..a9cb819c3 100644
--- a/Android/jni/Android.mk
+++ b/Android/jni/Android.mk
@@ -17,7 +17,6 @@ LOCAL_CFLAGS := -DANDROID_NDK \
-funroll-loops \
-mfloat-abi=softfp -mfpu=neon \
-fexceptions \
- -D_DEBUG \
LOCAL_STATIC_LIBRARIES := cpufeatures
diff --git a/Android/res/layout/main.xml b/Android/res/layout/main.xml
index dd5ee0e8f..1895e2752 100644
--- a/Android/res/layout/main.xml
+++ b/Android/res/layout/main.xml
@@ -11,19 +11,34 @@
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textAppearance="?android:attr/textAppearanceLarge" />
-
- <Button
- android:id="@+id/start_server"
+
+ <LinearLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/start" />
+ android:layout_height="wrap_content" >
+
+ <Button
+ android:id="@+id/stop_server"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:enabled="true"
+ android:text="@string/stop" />
+
+ <Button
+ android:id="@+id/start_server"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/start" />
+
+ <Button
+ android:id="@+id/configure_server"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/configure" />
- <Button
- android:id="@+id/stop_server"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:enabled="true"
- android:text="@string/stop" />
+ </LinearLayout>
<TextView
android:id="@+id/server_status_text"
diff --git a/Android/res/values/strings.xml b/Android/res/values/strings.xml
index 9fce753a4..aa5978dc0 100644
--- a/Android/res/values/strings.xml
+++ b/Android/res/values/strings.xml
@@ -8,5 +8,6 @@
<string name="mcserver_is_running">MCServer is running</string>
<string name="mcserver_is_not_running">MCServer is not running</string>
<string name="your_ip">Your IP …</string>
+ <string name="configure">Configure</string>
</resources> \ No newline at end of file
diff --git a/Android/src/com/mcserver/MCServerActivity.java b/Android/src/com/mcserver/MCServerActivity.java
index 0a686c882..8d3507ca3 100644
--- a/Android/src/com/mcserver/MCServerActivity.java
+++ b/Android/src/com/mcserver/MCServerActivity.java
@@ -10,7 +10,9 @@ import java.util.ArrayList;
import java.util.Enumeration;
import android.app.Activity;
+import android.content.Intent;
import android.graphics.Color;
+import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
@@ -55,6 +57,13 @@ public class MCServerActivity extends Activity {
}
});
+ ((Button)findViewById(R.id.configure_server)).setOnClickListener( new View.OnClickListener() {
+ public void onClick(View v) {
+ Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://localhost:8081/webadmin/"));
+ startActivity( myIntent );
+ }
+ });
+
ListView lv = (ListView)this.findViewById(R.id.listView1);
@@ -162,11 +171,13 @@ public class MCServerActivity extends Activity {
((TextView)findViewById(R.id.server_status_text)).setTextColor(Color.GREEN);
((Button)findViewById(R.id.stop_server)).setEnabled(true);
((Button)findViewById(R.id.start_server)).setEnabled(false);
+ ((Button)findViewById(R.id.configure_server)).setEnabled(true);
} else {
((TextView)findViewById(R.id.server_status_text)).setText(R.string.mcserver_is_not_running);
((TextView)findViewById(R.id.server_status_text)).setTextColor(Color.RED);
((Button)findViewById(R.id.stop_server)).setEnabled(false);
((Button)findViewById(R.id.start_server)).setEnabled(true);
+ ((Button)findViewById(R.id.configure_server)).setEnabled(false);
}
}