◐ Shell
reader mode source ↗
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ buildscript {
jcenter()
google()
mavenCentral()

maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://maven.google.com" }
}
Expand Down
Binary file removed qpysdk/src/main/libs/armeabi-v7a/libSDL2.so
Binary file not shown.
Binary file removed qpysdk/src/main/libs/armeabi-v7a/libSDL2_gfx.so
Binary file not shown.
Binary file removed qpysdk/src/main/libs/armeabi-v7a/libSDL2_image.so
Binary file not shown.
Binary file removed qpysdk/src/main/libs/armeabi-v7a/libSDL2_mixer.so
Binary file not shown.
Binary file removed qpysdk/src/main/libs/armeabi-v7a/libSDL2_ttf.so
Binary file not shown.
Binary file removed qpysdk/src/main/libs/armeabi-v7a/libmain.so
Binary file not shown.
Binary file removed qpysdk/src/main/libs/armeabi-v7a/libpng16.so
Binary file not shown.
Binary file removed qpysdk/src/main/libs/armeabi-v7a/libpython2.7.so
Binary file not shown.
Binary file removed qpysdk/src/main/libs/armeabi-v7a/libqpysdk.so
Binary file not shown.
22 changes: 18 additions & 4 deletions qpython/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ android {
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 304
versionName "3.0.0"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true

Expand Down Expand Up @@ -68,7 +68,12 @@ android {
}

debug {
signingConfig signingConfigs.release
}

}
Expand Down Expand Up @@ -162,6 +167,9 @@ dependencies {
api 'org.litepal.android:core:1.3.1'
api 'me.dm7.barcodescanner:zxing:1.9'
api 'com.android.support:multidex:1.0.1'

api rootProject.ext.libOkHttp3
api rootProject.ext.libOkHttp3Log
Expand All @@ -176,6 +184,12 @@ dependencies {
api rootProject.ext.libSupportCardView
api rootProject.ext.libSupportPreference

osApi rootProject.ext.firebaseCore
osApi rootProject.ext.firebaseMsg
osApi rootProject.ext.firebaseAuth
Expand All @@ -192,7 +206,7 @@ dependencies {
api rootProject.ext.retrofitCoverterGson
api rootProject.ext.retrofitAdapterRxjava

api 'com.android.support.constraint:constraint-layout:1.0.2'

// 微信
opApi('com.tencent.mm.opensdk:wechat-sdk-android-with-mta:1.4.0') {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
package org.qpython.qpy.main.activity;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.LoaderManager;
import android.content.Context;
import android.content.Intent;
import android.content.Loader;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.TextView;

import com.quseit.util.FileHelper;
import com.quseit.util.FolderUtils;
Expand All @@ -23,30 +36,38 @@
import org.greenrobot.eventbus.ThreadMode;
import org.qpython.qpy.R;
import org.qpython.qpy.console.ScriptExec;
import org.qpython.qpy.main.adapter.AppListAdapter;
import org.qpython.qpy.main.event.AppsLoader;
import org.qpython.qpy.main.model.AppModel;
import org.qpython.qpy.main.model.QPyScriptModel;
import org.qpython.qpysdk.QPyConstants;
import org.qpython.qpysdk.utils.Utils;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
* Local App list
* Created by Hmei on 2017-05-22.
*/

public class AppListActivity extends BaseActivity implements LoaderManager.LoaderCallbacks<ArrayList<AppModel>> {
public static final String TYPE_SCRIPT = "script";

private List<AppModel> dataList;
private AppListAdapter adapter;

public static void start(Context context, String type) {
Intent starter = new Intent(context, AppListActivity.class);
starter.putExtra("type", type);
Expand All @@ -56,12 +77,25 @@ public static void start(Context context, String type) {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
runShortcut();
setContentView(R.layout.activity_local_app);
initView();
EventBus.getDefault().register(this);
}

@Override
protected void onResume() {
super.onResume();
Expand All @@ -74,6 +108,9 @@ protected void onResume() {
@Override
protected void onDestroy() {
super.onDestroy();
EventBus.getDefault().unregister(this);
}

Expand All @@ -90,6 +127,7 @@ private void runShortcut() {
}
}

private void initView() {
dataList = new ArrayList<>();
adapter = new AppListAdapter(dataList, getIntent().getStringExtra("type"), this);
Expand All @@ -104,6 +142,16 @@ public void runProject(QPyScriptModel item) {
ScriptExec.getInstance().playProject(AppListActivity.this, item.getPath(), false);
}

@Override
public void exit() {
AppListActivity.this.finish();
Expand All @@ -116,9 +164,113 @@ public void exit() {
appsView.setAdapter(adapter);

((TextView) findViewById(R.id.tv_folder_name)).setText(R.string.qpy_app);
getScriptList();
}


private void getScriptList() {
try {
Expand Down
Loading
Toggle all file notes Toggle all file annotations