Skip to content

Commit ca80a7e

Browse files
committed
Update stub app:init struct
1 parent 6060e44 commit ca80a7e

File tree

12 files changed

+61
-2
lines changed

12 files changed

+61
-2
lines changed

app/src/main/assets/LICENSE

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Copyright (C) 2017 duangsuse
2+
3+
This program is free software: you can redistribute it and/or modify
4+
it under the terms of the GNU General Public License as published by
5+
the Free Software Foundation, either version 3 of the License, or
6+
(at your option) any later version.
7+
8+
This program is distributed in the hope that it will be useful,
9+
but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
GNU General Public License for more details.
12+
13+
You should have received a copy of the GNU General Public License
14+
along with this program. If not, see <http://www.gnu.org/licenses/>.

app/src/main/assets/app.bshA

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//Module selector

app/src/main/assets/libs/Codec.bshL

Whitespace-only changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//bsh Android Java lib loader
2+
3+
import android.os.Environment;
4+
import dalvik.system.DexClassLoader;
5+
6+
String fixPath(String path) {
7+
return me.getExternalFilesDir(Environment.MEDIA_MOUNTED).getPath() + "/" + path;
8+
}
9+
10+
DexClassLoader loadDex(String name) {
11+
File dexout = me.getCacheDir();
12+
return new DexClassLoader(fixPath(name + ".dex"), dexout.getPath(), null, me.getClass().getClassLoader());
13+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import android.os.*;
2+
import android.widget.*;
3+
import android.view.*;
4+
import android.content.*;
5+
import android.net.*;

app/src/main/assets/libs/getAssets.bshL

Whitespace-only changes.

app/src/main/assets/libs/loadMod.bshL

Whitespace-only changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import android.os.*;
2+
import android.widget.*;
3+
import android.view.*;
4+
import android.graphics.*;
5+
6+
Rect rectangle = new Rect();
7+
Window window = me.getWindow();
8+
window.getDecorView().getWindowVisibleDisplayFrame(rectangle);
9+
int statusBarHeight = rectangle.top;
10+
int contentViewTop = window.findViewById(Window.ID_ANDROID_CONTENT).getTop();
11+
int titleBarHeight= contentViewTop - statusBarHeight;

app/src/main/assets/libs/tintBar.bshL

Whitespace-only changes.

app/src/main/assets/main.bsh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
me.toast("hello")
1+
import android.os.*;
2+
import android.widget.*;
3+
import android.view.*;
4+
import android.content.Intent;
5+
import android.net.Uri;
6+
7+
//check Update
8+
9+
//splash
10+
11+
//beginActivity

0 commit comments

Comments
 (0)