mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-13 14:51:51 -04:00
Launcher design changes; AIDE java code build compatibility
This commit is contained in:
parent
45cdfa715b
commit
db3110282d
@ -35,35 +35,38 @@ public class JREUtils
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void redirectAndPrintJRELog(LoggableActivity act) {
|
public static void redirectAndPrintJRELog(final LoggableActivity act) {
|
||||||
JREUtils.redirectLogcat();
|
JREUtils.redirectLogcat();
|
||||||
Log.v("jrelog","Log starts here");
|
Log.v("jrelog","Log starts here");
|
||||||
Thread t = new Thread(() -> {
|
Thread t = new Thread(new Runnable(){
|
||||||
try {
|
@Override
|
||||||
Log.i("jrelog-logcat","Clearing logcat");
|
public void run() {
|
||||||
new ProcessBuilder().command("logcat", "-c").redirectErrorStream(true).start();
|
try {
|
||||||
Log.i("jrelog-logcat","Starting logcat");
|
Log.i("jrelog-logcat","Clearing logcat");
|
||||||
java.lang.Process p = new ProcessBuilder().command("logcat", /* "-G", "1mb", */ "-v", "brief", "*:S").redirectErrorStream(true).start();
|
new ProcessBuilder().command("logcat", "-c").redirectErrorStream(true).start();
|
||||||
|
Log.i("jrelog-logcat","Starting logcat");
|
||||||
|
java.lang.Process p = new ProcessBuilder().command("logcat", /* "-G", "1mb", */ "-v", "brief", "*:S").redirectErrorStream(true).start();
|
||||||
|
|
||||||
// idk which better, both have a bug that printf(\n) in a single line
|
// idk which better, both have a bug that printf(\n) in a single line
|
||||||
/*
|
/*
|
||||||
BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
|
BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
|
||||||
String line;
|
String line;
|
||||||
while ((line = reader.readLine()) != null) {
|
while ((line = reader.readLine()) != null) {
|
||||||
act.appendlnToLog(line);
|
act.appendlnToLog(line);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
byte[] buf = new byte[512];
|
|
||||||
int len;
|
|
||||||
while ((len = p.getInputStream().read(buf)) != -1) {
|
|
||||||
act.appendToLog(new String(buf, 0, len));
|
|
||||||
}
|
|
||||||
} catch (IOException e) {
|
|
||||||
Log.e("jrelog-logcat", "IOException on logging thread");
|
|
||||||
e.printStackTrace();
|
|
||||||
|
|
||||||
act.appendlnToLog("IOException on logging thread:\n" + Log.getStackTraceString(e));
|
byte[] buf = new byte[512];
|
||||||
|
int len;
|
||||||
|
while ((len = p.getInputStream().read(buf)) != -1) {
|
||||||
|
act.appendToLog(new String(buf, 0, len));
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
Log.e("jrelog-logcat", "IOException on logging thread");
|
||||||
|
e.printStackTrace();
|
||||||
|
|
||||||
|
act.appendlnToLog("IOException on logging thread:\n" + Log.getStackTraceString(e));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
t.start();
|
t.start();
|
||||||
|
@ -1,38 +1,65 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:orientation="horizontal"
|
||||||
android:layout_height="fill_parent"
|
android:layout_width="match_parent"
|
||||||
android:orientation="vertical">
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center_horizontal">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="vertical"
|
android:id="@+id/launchermainFragmentTabView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center_horizontal">
|
android:layout_weight="1.0"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="#1D1D1D">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/launchermainFragmentTabView"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1.0"
|
android:orientation="vertical">
|
||||||
android:orientation="horizontal">
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:id="@+id/launchermain_spinner_account"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:text="Connected"
|
||||||
|
android:id="@+id/launchermain_text_accountstatus"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<android.support.design.widget.VerticalTabLayout
|
<android.support.design.widget.VerticalTabLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/launchermainTabLayout"/>
|
android:id="@+id/launchermainTabLayout"/>
|
||||||
|
|
||||||
<android.support.v4.view.ViewPager
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:id="@+id/launchermainTabPager"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_weight="1.0">
|
||||||
|
|
||||||
|
<android.support.v4.view.ViewPager
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:id="@+id/launchermainTabPager"
|
||||||
|
android:background="#272727"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user