diff --git a/.gitignore b/.gitignore index 378eac2..d76b74e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ build +.DS_Store diff --git a/build.gradle b/build.gradle index 3c0f545..497a3a2 100644 --- a/build.gradle +++ b/build.gradle @@ -1,20 +1,12 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 25 - buildToolsVersion '25.0.0' + compileSdkVersion rootProject.ext.compileSdkVersion defaultConfig { - minSdkVersion 9 - targetSdkVersion 9 + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion - -// ndk { -// moduleName "sdlsufaceview" -// ldLibs "log" -// abiFilter "armeabi" -// -// } buildTypes { release { minifyEnabled false @@ -31,27 +23,23 @@ android { } - - buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } - useLibrary 'org.apache.http.legacy' + namespace 'com.quseit.android' } dependencies { - compile project(':qgdlib') - compile project(':qpagerlib') - compile project(':qftplib') - compile files('libs/jsr305-2.0.1.jar') - compile files('libs/libGoogleAnalytics.jar') - //compile files('libs/mint-5.0.0.jar') - compile 'org.apache.httpcomponents:httpcore:4.4.2' - compile files('libs/qaysnchttplib.jar') - compile files('libs/SOMAAndroidSDK4.5.0.jar') -} + api project(':qgdlib') + api project(':qpagerlib') + api project(':qftplib') + api 'org.apache.httpcomponents:httpcore:4.4.2' + api files('libs/qaysnchttplib.jar') + api files('libs/jsr305-2.0.1.jar') + api rootProject.ext.libSupportV4 +} \ No newline at end of file diff --git a/qbaselib.iml b/qbaselib.iml deleted file mode 100644 index 91f74b9..0000000 --- a/qbaselib.iml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index b683766..f34a9c2 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -1,10 +1,7 @@ diff --git a/src/main/java/com/quseit/base/MyApp.java b/src/main/java/com/quseit/base/MyApp.java index 7546d93..efee0f7 100644 --- a/src/main/java/com/quseit/base/MyApp.java +++ b/src/main/java/com/quseit/base/MyApp.java @@ -18,201 +18,33 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.Map; - -public class MyApp extends Application { + +import greendroid.app.GDApplication; + +public class MyApp extends GDApplication { private static final String TAG = "MyApp"; @SuppressWarnings({ "unchecked", "rawtypes" }) public ArrayList taskQueue = new ArrayList(); - @SuppressWarnings("rawtypes") - //public List activityList = new LinkedList(); - - private static MyApp instance; - - public String root; - public String subDir = ""; - public boolean isMvMode; - public boolean flag1 = false; - - public ArrayList getTaskQueue() { + + private static MyApp instance; + + + public ArrayList getTaskQueue() { return taskQueue; } - private MyApp() { + protected MyApp() { } - //单例模式中获取唯一的ExitApplication实例 -// public int size() { -// //Log.d(TAG, "size:"+activityList.size()); -// return activityList.size(); -// } - public static MyApp getInstance() { + public static MyApp getInstance() { if(null == instance) { instance = new MyApp(); } return instance; - } -// public Context getContext() { -// if (activityList.size()>0) { -// if (CONF.DEBUG) Log.d(TAG, "get Context ok"); -// Activity act = (Activity) activityList.get(0); -// return act.getApplicationContext(); -// } else { -// if (CONF.DEBUG) Log.d(TAG, "get Context null"); -// -// return null; -// } -// } - //添加Activity到容器中 - public void addActivity(Activity activity, String rootDir, String subDirectory) { - //this.activityList.add(activity); - root = rootDir; - subDir = subDirectory; - //NStorage.setSP(this.getContext(), "global.root", rootDir); - } - - public void addActivity(Activity activity) { - //this.activityList.add(activity); - } - public void exit() { -// for (int i=0;i movieDirs = new HashMap(); - public Map getAvaiDirs(String dirname, boolean force, boolean isMvMode) { - this.isMvMode = isMvMode; - if (!cacheSet || force) { - setDirCache(); - cacheSet = true; - } - return movieDirs; - } - - public void setDirCache() { - // 遍例整个files目录下的所有文件及文件夹 - //String filename=""; - String fullfn; - int filesCount; - - if (NUtil.isExternalStorageExists()) { - - try { - File[] files = FileHelper.getABSPath(Environment.getExternalStorageDirectory().getAbsolutePath()).listFiles(); - if (files!=null) { - //Arrays.sort(files, sortType); - for (File file : files) { - fullfn = file.getPath().toString(); - - //filename = file.getName(); - if (file.isDirectory()) { - filesCount = checkMvNums(fullfn); - if (CONF.DEBUG) Log.d(TAG, "cache: fullfn:"+fullfn+"-count:"+filesCount); - movieDirs.put(fullfn, filesCount); - } - } - } - } catch (IOException e) { - Log.d(TAG, "IOException:"+e.getMessage()); - e.printStackTrace(); - } - } - } - - public int checkMvNums(String curDir) { - int total = 0; - String filename,fullfn; - int filesCount; - - try { - File[] files = FileHelper.getABSPath(curDir).listFiles(); - if (files!=null) { - //Arrays.sort(files, sortType); - for (File file : files) { - fullfn = file.getPath().toString(); - - filename = file.getName(); - if (file.isDirectory()) { - int depth = fullfn.split("/").length; - if (depth>5) { // 忽略5层后 - return 0; - } - filesCount = checkMvNums(fullfn+"/"); - if (filesCount>0) { - return 1; - } - /* - total = total+checkMvNums(fullfn+"/");*/ - - } else { - String ext = FileHelper.getExt(filename.toLowerCase(),"").toLowerCase(); - if (this.isMvMode) { - if (!ext.equals("") && CONF.MVEXT.contains("#"+ext+"#")) { - return 1; - } - } else { - if (!ext.equals("") && CONF.MUEXT.contains("#"+ext+"#")) { - return 1; - } - } - - } - } - } - } catch (IOException e) { - e.printStackTrace(); - } - return total; - } - - public String getRoot() { - //String root = NStorage.getSP(this.getContext(), "global.root"); - //Log.d(TAG, "getRoot:"+root); - if (root == null) { - return CONF.DEFAULT_ROOT; - } else { - return root; - } - } - - public String getSaveRoot(Context context, int Q) { - try { - String root = NAction.getDefaultRoot(context); - String rootDir; - if (root.equals("")) { - rootDir = new File(FileHelper.getBasePath(CONF.DEFAULT_ROOT, "Quseit"),"").getAbsolutePath(); - - } else { - rootDir = root; - } - return rootDir; - } catch (IOException e) { - return ""; - } - } - public String getFullRoot() { - //String root = NStorage.getSP(this.getContext(), "global.root"); - //Log.d(TAG, "getRoot:"+root); - if (subDir.equals("")) { - return root; - } else { - return root+"/"+subDir; - } - } - - public void gc() { - System.gc(); - Runtime.getRuntime().gc(); - } - - public void onEditTextFocus(View view){ - EditText v = (EditText)view; - v.setSelection(v.length()); } + /*public String getRoot() { + return Environment.getExternalStorageDirectory()+"/qpython"; + }*/ } diff --git a/src/main/java/com/quseit/common/QBaseActivity.java b/src/main/java/com/quseit/common/QBaseActivity.java index c4f03de..501e024 100644 --- a/src/main/java/com/quseit/common/QBaseActivity.java +++ b/src/main/java/com/quseit/common/QBaseActivity.java @@ -10,6 +10,7 @@ import android.content.Intent; import android.graphics.Bitmap; import android.net.Uri; +import android.net.http.SslError; import android.os.Build; import android.os.Bundle; import android.os.Environment; @@ -20,7 +21,9 @@ import android.view.View; import android.view.ViewGroup; import android.view.WindowManager.BadTokenException; +import android.webkit.CookieManager; import android.webkit.JavascriptInterface; +import android.webkit.SslErrorHandler; import android.webkit.ValueCallback; import android.webkit.WebChromeClient; import android.webkit.WebSettings; @@ -52,12 +55,6 @@ import com.quseit.util.VeDate; import com.quseit.view.AdSlidShowView; import com.quseit.view.AdSlidShowView.urlBackcall; -import com.smaato.soma.AdDownloaderInterface; -import com.smaato.soma.AdListenerInterface; -import com.smaato.soma.BannerView; -import com.smaato.soma.ReceivedBannerInterface; -import com.smaato.soma.bannerutilities.constant.BannerStatus; - import org.apache.http.HttpHost; import org.json.JSONArray; import org.json.JSONException; @@ -66,6 +63,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; +import java.io.IOException; import java.io.InputStream; import java.lang.reflect.Field; import java.text.MessageFormat; @@ -78,7 +76,6 @@ import greendroid.widget.AsyncImageView; import greendroid.widget.item.TextItem; -import static com.quseit.config.CONF.UPDATER_URL; //import greendroid.widget.QuickActionWidget; @@ -87,18 +84,14 @@ public abstract class QBaseActivity extends GDActivity { protected static final String TAG = "QBaseActivity"; - private static int NOTIFICATION_ID = 0x20001;// 通知栏消息id - // private AdLayout amazonAdView; // The ad view used to load and display // the ad. - protected int limit = CONF.PAGE_NUM; protected int start = 0; protected int total = 0; - protected boolean myload = true; protected ProgressDialog waitingWindow; @@ -106,24 +99,12 @@ public abstract class QBaseActivity extends GDActivity { protected int dialogIndex; - // private AdView adMob = null; - - // private QuickActionWidget mBar; public WebView wv; public ProgressBar wvProgressBar; private ProgressDialog pDialog; - // Banner Ads. -// boolean update_display_ad = false; -// protected String tapjoyErr = ""; -// -// protected View adView; - - // MobclixMMABannerXLAdView mobClix = null; - // MobFoxView mobFox = null; - public void progress(String title, String msg, int x) { pDialog = ProgressDialog.show(this, title, msg, true, false); // progressHandler.sendEmptyMessage(0); @@ -271,40 +252,6 @@ public void showRecommandAd(String pageId) { String adf = NAction.getExtP(getApplicationContext(), "adx_" + pageId); if (!adf.equals("")) { String[] xx = adf.split(Pattern.quote("|")); - if("smaato_banner".equals(xx[1])){ - Log.e("tag----admine","tag"); - try { - BannerView mBanner = new BannerView(this); - final LinearLayout modbanner = (LinearLayout) findViewById(R.id.modbanner_wrap); - modbanner.removeAllViews(); - - modbanner.addView(mBanner, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, getPx(50))); - String ADKEY = CONF.SMAATOBKEY; - String adspaceId = NAction.getExtP(getApplicationContext(), "smaato.adspaceid"); - if (adspaceId.equals("")) { - adspaceId = "130039156"; - } - mBanner.getAdSettings().setPublisherId(Long.parseLong(ADKEY)); - mBanner.getAdSettings().setAdspaceId(Long.parseLong(adspaceId)); - mBanner.asyncLoadNewBanner(); - mBanner.addAdListener(new AdListenerInterface() { - @Override - public void onReceiveAd(AdDownloaderInterface arg0, ReceivedBannerInterface banner) { - if (banner.getStatus() == BannerStatus.ERROR) { - Log.w(TAG, "" + banner.getErrorCode() + "-" + banner.getErrorMessage()); - } else { - modbanner.setVisibility(View.VISIBLE); - - } - } - }); - } catch (Exception e) { - - } catch (NoSuchMethodError e) { - } - return; - } - String ad = NAction.getExtAdConf(getApplicationContext()); final List ltImgLink = new ArrayList(); List ltResImg = new ArrayList(); @@ -681,8 +628,12 @@ public void checkConfUpdate(String root) { checkConfUpdate(getApplicationContext()); // 清空图片目录的缓存 - String cacheDir = Environment.getExternalStorageDirectory() + "/" + root + "/" + CONF.DCACHE + "/"; - FileHelper.clearDir(cacheDir, 0, false); +// try { +// String cacheDir = Environment.getExternalStorageDirectory() + "/" + root + "/" + CONF.DCACHE + "/"; +// FileHelper.clearDir(cacheDir, 0, false); +// } catch (Exception e) { +// +// } } } @@ -936,19 +887,19 @@ public String getwvDocument() { } - class QPyLib { - public QPyLib(Context context) { - } - - @JavascriptInterface - public void processHTML(String cookie, String data) { - // Log.d(TAG, "processHTML called(cookie):"+cookie); - // Log.d(TAG, "processHTML called(data):"+data); - wvCookie = cookie; - wvDocument = data; - - } - } +// class QPyLib { +// public QPyLib(Context context) { +// } +// +// @JavascriptInterface +// public void processHTML(String cookie, String data) { +// // Log.d(TAG, "processHTML called(cookie):"+cookie); +// // Log.d(TAG, "processHTML called(data):"+data); +// wvCookie = cookie; +// wvDocument = data; +// +// } +// } protected ValueCallback mUploadMessage; @@ -957,6 +908,13 @@ public void processHTML(String cookie, String data) { // webview @TargetApi(7) public void initWebView() {// 初始化 + Log.d(TAG, "initWebView"); + CookieManager.getInstance().setAcceptCookie(true); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1) { + CookieManager.getInstance().setAcceptFileSchemeCookies(true); + } + CookieManager.getInstance().acceptCookie(); + useProxyInWebView(); if (wvProgressBar == null) { wvProgressBar = (ProgressBar) findViewById(R.id.WebViewProgress); @@ -967,96 +925,35 @@ public void initWebView() {// 初始化 if (wv == null) { wv = (WebView) findViewById(R.id.wv); } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + CookieManager.getInstance().setAcceptThirdPartyCookies(wv, true); + } + // wv = new WebView(this); - wv.getSettings().setJavaScriptEnabled(true);// 可用JS - wv.addJavascriptInterface(new QPyLib(this), "qpylib"); + wv.setInitialScale(1); + wv.getSettings().setAllowFileAccess(true); + wv.getSettings().setPluginState(WebSettings.PluginState.ON_DEMAND); + wv.getSettings().setLoadWithOverviewMode(true); + wv.getSettings().setUseWideViewPort(true); wv.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);// 滚动条风格,为0就是不给滚动条留空间,滚动条覆盖在网页上 - wv.getSettings().setRenderPriority(RenderPriority.HIGH); + wv.getSettings().setRenderPriority(WebSettings.RenderPriority.HIGH); wv.getSettings().setBlockNetworkImage(false); wv.getSettings().setAllowFileAccess(true); - /* - * try { wv.getSettings().setPluginsEnabled(true); } catch (Exception e) { } - */ - wv.setWebViewClient(new WebViewClient() { - public boolean shouldOverrideUrlLoading(final WebView view, final String url) { - Log.d(TAG, "setWebViewClient URL:" + url); - loadurl(view, url);// 载入网页 - return true; - } - - @Override - public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { - Log.d(TAG, "errcode:" + errorCode + "-desc:" + description + "-url:" + failingUrl); - // loadurl(wv, - // "file:///android_asset/mbox/md3.html?act=err&info="+description+"&"+NAction.getUserUrl(getApplicationContext())); - } + wv.getSettings().setDomStorageEnabled(true); - @Override - public void onPageFinished(WebView view, String url) { - super.onPageFinished(view, url); - //view.loadUrl("javascript:window.qpylib.processHTML(document.cookie, document.getElementsByTagName('html')[0].innerHTML);"); - // view.loadUrl("javascript:(function(){document.getElementById('snapNSendBtn').onclick=function(){var bean=window.bean;var title=bean.getTitle();alert(title);}})()"); - } - - @Override - public void onPageStarted(WebView view, String url, Bitmap favicon) { - wv.requestFocus(); - EditText et = (EditText) findViewById(R.id.url_input); - if (et != null) { - et.setText(url); - } - } - - }); - - wv.setWebChromeClient(new WebChromeClient() { - public void onProgressChanged(WebView view, int progress) {// 载入进度改变而触发 - if (progress == 100) { - // handler.sendEmptyMessage(1);//如果全部载入,隐藏进度对话框 - // wvProgressBar.setVisibility(View.GONE); - } - if (wvProgressBar != null) - wvProgressBar.setProgress(wv.getProgress()); - super.onProgressChanged(view, progress); - } - - }); - -// wv.setOnLongClickListener(new OnLongClickListener() { -// @Override -// public boolean onLongClick(View v) { -// // Log.d(TAG, "click detected"); -// return true; -// } -// }); - // wv.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY); - // wv.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY); - wv.getSettings().setLoadWithOverviewMode(true); - // wv.getSettings().setJavaScriptEnabled(true); + wv.getSettings().setJavaScriptEnabled(true);// 可用JS + //wv.addJavascriptInterface(new QPyLib(this), "qpylib"); - // wv.addJavascriptInterface(new JavascriptInterface(MSearchAct.this), - // "bean"); - // registerForContextMenu(wv); - // openWaitWindow(); - wv.getSettings().setJavaScriptEnabled(true);// 可用JS - wv.addJavascriptInterface(new QPyLib(this), "qpylib"); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { + wv.getSettings().setAllowFileAccessFromFileURLs(true); + } - wv.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);// 滚动条风格,为0就是不给滚动条留空间,滚动条覆盖在网页上 - wv.getSettings().setRenderPriority(RenderPriority.HIGH); - wv.getSettings().setBlockNetworkImage(false); - wv.getSettings().setAllowFileAccess(true); - // wv.getSettings().setBuiltInZoomControls(true);// 设置支持缩放 - String ua = wv.getSettings().getUserAgentString(); - wv.getSettings().setUserAgentString(ua + " :QUSEIT"); - /* - * try { wv.getSettings().setPluginsEnabled(true); } catch (Exception e) { } - */ wv.setWebViewClient(new WebViewClient() { public boolean shouldOverrideUrlLoading(final WebView view, final String url) { Log.d(TAG, "setWebViewClient URL:" + url); - loadurl(view, url);// 载入网页 + wv.loadUrl(url);// 载入网页 return true; } @@ -1069,19 +966,23 @@ public void onReceivedError(WebView view, int errorCode, String description, Str @Override public void onPageFinished(WebView view, String url) { + Log.d(TAG, "onPageFinished:"+url); super.onPageFinished(view, url); - view.loadUrl("javascript:window.qpylib.processHTML(document.cookie, document.getElementsByTagName('html')[0].innerHTML);"); + //view.loadUrl("javascript:window.alert('ok')"); // view.loadUrl("javascript:(function(){document.getElementById('snapNSendBtn').onclick=function(){var bean=window.bean;var title=bean.getTitle();alert(title);}})()"); } @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { + Log.d(TAG, "onPageStarted"); + wv.requestFocus(); EditText et = (EditText) findViewById(R.id.url_input); if (et != null) { et.setText(url); } } + }); wv.setWebChromeClient(new WebChromeClient() { @@ -1127,17 +1028,7 @@ public void openFileChooser(ValueCallback uploadMsg, String acceptType, Str startActivityForResult(Intent.createChooser(i, "File Chooser"), FILECHOOSER_RESULTCODE); } - }); - - // wv.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY); - // wv.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY); - wv.getSettings().setLoadWithOverviewMode(true); - // wv.getSettings().setJavaScriptEnabled(true); - - // wv.addJavascriptInterface(new JavascriptInterface(MSearchAct.this), "bean"); - // registerForContextMenu(wv); - // openWaitWindow(); } Handler wvHandler = new Handler() { @@ -1156,13 +1047,7 @@ public void handleMessage(Message msg) {// 定义一个Handler,用于处理下 } }; - public void loadurl(final WebView view, final String url) { - view.loadUrl(url);// 载入网页 - /* - * new Thread(){ public void run(){ //handler.sendEmptyMessage(0); try{ view.loadUrl(url);//载入网页 if (CONF.DEBUG) - * Log.d(TAG, "load url:"+url); } catch (Exception e) { } } }.start(); - */ - } + public void loadContent(final WebView view, final String content, final String historyUrl) { new Thread() { @@ -1293,6 +1178,7 @@ public void onFeedback(View v) { // public void unpackData(final String resource, File target) { + Log.d(TAG, "unpackData:"+resource); ResourceManager resourceManager = new ResourceManager(this); // The version of data in memory and on disk. @@ -1342,7 +1228,7 @@ public void unpackData(final String resource, File target) { AssetExtract ae = new AssetExtract(this); if (!ae.extractTar(resource + ".mp3", target.getAbsolutePath())) { - Toast.makeText(this, "Could not extract " + resource + " data.", Toast.LENGTH_SHORT).show(); + //Toast.makeText(this, "Could not extract " + resource + " data.", Toast.LENGTH_SHORT).show(); } try { @@ -1358,7 +1244,7 @@ public void unpackData(final String resource, File target) { os.close(); } catch (Exception e) { Log.w("python", e); - Toast.makeText(this, "Could not extract " + resource + " data, make sure your device have enough space.", Toast.LENGTH_LONG).show(); + //Toast.makeText(this, "Could not extract " + resource + " data, make sure your device have enough space.", Toast.LENGTH_LONG).show(); } } else { Log.d(TAG, "No extract:" + resource); diff --git a/src/main/java/com/quseit/config/CONF.java b/src/main/java/com/quseit/config/CONF.java index 6c10568..a89c692 100644 --- a/src/main/java/com/quseit/config/CONF.java +++ b/src/main/java/com/quseit/config/CONF.java @@ -7,15 +7,10 @@ public class CONF { public static boolean open=false; - public static final String UPDATER_URL="http://www.tubebook.net/250/update.json"; - public static final String BA_SITE2 = "conf.quseit.com"; - public static final String FR_SITE = "play.quseit.com"; + public static final String BA_SITE2 = "apu2.quseit.com"; public static final int TRY_COUNT = 3; public static final long TRY_DELAY = 1000; - public final static String SMAATOBKEY = "1100010539"; - - public final static int ROUND_PIX = 0; // IMAGE ROUND PIX public final static int DOWNLOAD_NOTIFY_INDEX = 10001; @@ -25,11 +20,9 @@ public class CONF { public final static String COLLECT_INFO = "#fingerprint#model#brand#"; public final static int UPDATEQ = 6; - public final static int UPDATE_VER = 2; // update backend public final static int CACHE_TYPE_COVER = 20; - public final static long EXPIRED_GET2 = 3600000; //get2 更新时间 public final static String DCACHE = "cache"; public final static String LOG_LIMIT = "30"; @@ -49,19 +42,12 @@ public class CONF { public static final String USER_AGENT = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.36 Safari/525.19"; - public static final int PAGE_NUM = 10; - public static final boolean DEBUG = false; - - public static final String FEEDBACK_EMAIL = "quseitlab@gmail.com"; - public final static String DEFAULT_ROOT = "Tubebook"; - + public static final String FEEDBACK_EMAIL = "support@qpython.org"; + public static final String EXT_PLG = "org.qpython.qpy"; public static final String EXT_PLG3 = "org.qpython.qpy3"; - - public static final String EXT_PLG_URL = "http://"+FR_SITE+"/qpython.html"; - public static final String EXT_PLG_URL3 = "http://"+FR_SITE+"/qpython3.html"; public static int[] THREA_STAT = {0,0,0}; //FIXME DOWNLOAD STATUS @@ -76,12 +62,10 @@ public class CONF { public static final String PLUGIN_KEY="plugins"; //speed - public static double TIME_SPAN = 2000d; public static long CHANGE_DELAY = 300; public static int SMALL_WINDOW_TYPE = 0; public static int BIG_WINDOW_TYPE = 1; - public static int OVERLAY_PERMISSION_REQ_CODE = 11; public static String SP_BOOT = "SP_BOOT"; public static String SP_BG = "SP_BG"; public static String SP_LOC = "SP_LOC"; @@ -89,8 +73,10 @@ public class CONF { public static String SP_Y = "SP_Y"; public static String SP_STATUSBAR_HEIGHT = "SP_STATUSBAR_HEIGHT"; - public static int CODE_FOR_WRITE_PERMISSION=10000; - + public final static String BASE_PATH = "qpython"; // qpython / qlua + public final static String CACHE_DIR = "cache"; + public final static String TMP_DIR = "tmp"; + public final static String LIB_DIR = "lib"; } diff --git a/src/main/java/com/quseit/lib/DownloaderBase.java b/src/main/java/com/quseit/lib/DownloaderBase.java index ecf3be0..7021dc2 100644 --- a/src/main/java/com/quseit/lib/DownloaderBase.java +++ b/src/main/java/com/quseit/lib/DownloaderBase.java @@ -158,8 +158,7 @@ public void startDownloadTask(Intent intent) { // 创建文件 if (NUtil.isExternalStorageExists()) { try { - downloadFile = new File(FileHelper.getBasePath(MyApp - .getInstance().getRoot(), "tmp"), mArtist + "_" + downloadFile = new File(FileHelper.getBasePath(CONF.BASE_PATH, CONF.TMP_DIR), mArtist + "_" + mTitle + mExt); } catch (NotFoundException e) { e.printStackTrace(); @@ -434,8 +433,7 @@ public void handleMessage(Message msg) { dstFile = new File(FileHelper.getABSPath(root + "/" + mArtist + "/"), mTitle + ext); } else { - dstFile = new File(FileHelper.getBasePath(MyApp - .getInstance().getFullRoot() + "/", mArtist + dstFile = new File(FileHelper.getBasePath(CONF.BASE_PATH + "/", mArtist + "/"), mTitle + ext); } } @@ -664,8 +662,7 @@ private void reOpenDownLoad() { // 创建文件 if (NUtil.isExternalStorageExists()) { try { - downloadFile = new File(FileHelper.getBasePath(MyApp - .getInstance().getRoot(), "tmp"), info.getPath()); + downloadFile = new File(FileHelper.getBasePath(CONF.BASE_PATH, CONF.TMP_DIR), info.getPath()); } catch (NotFoundException e) { e.printStackTrace(); } catch (IOException e) { diff --git a/src/main/java/com/quseit/media/MVUtil.java b/src/main/java/com/quseit/media/MVUtil.java deleted file mode 100644 index 02b0815..0000000 --- a/src/main/java/com/quseit/media/MVUtil.java +++ /dev/null @@ -1,219 +0,0 @@ -package com.quseit.media; - -import java.io.File; -import java.io.IOException; - -import com.quseit.base.MyApp; -import com.quseit.config.CONF; -import com.quseit.util.Base64; -import com.quseit.util.DateTimeHelper; -import com.quseit.util.FileHelper; -import com.quseit.util.ImageUtil; -import com.quseit.util.MD5; - -import android.annotation.TargetApi; -import android.content.ContentResolver; -import android.content.Context; -import android.database.Cursor; -import android.graphics.Bitmap; -import android.graphics.BitmapFactory; -import android.media.ThumbnailUtils; -import android.net.Uri; -import android.os.Environment; -import android.os.Handler; -import android.provider.MediaStore; -import android.provider.MediaStore.Images; -import android.provider.MediaStore.Video.Thumbnails; - -public class MVUtil { - @SuppressWarnings("unused") - private static final String TAG = "MVUtil"; - - /*static Bitmap createVideoThumbnail(String filePath, int kind) { - - }*/ - - @SuppressWarnings("finally") - @TargetApi(8) - public static Bitmap createVideoThumbnail(String filePath, final int width, final int height) { - //return null; - try { - Bitmap bitmap=ThumbnailUtils.createVideoThumbnail(filePath,Thumbnails.MINI_KIND); - if (bitmap == null) return null; - return android.media.ThumbnailUtils.extractThumbnail(bitmap, width, height); - } catch (NoSuchMethodError e) { - return null; - } catch (NoClassDefFoundError e) { - return null; - } catch (Exception e) { - return null; - - } finally { - return null; - } - /* - Bitmap bitmap = null; - MediaMetadataRetriever retriever = new MediaMetadataRetriever(); - try { - //retriever.setMode(MediaMetadataRetriever.METADATA_KEY_ALBUM); - retriever.setDataSource(filePath); - - bitmap = retriever.getFrameAtTime(0); - } catch(IllegalArgumentException ex) { - // Assume this is a corrupt video file - } catch (RuntimeException ex) { - } catch (NoSuchMethodError e) { - // Assume this is a corrupt video file. - } finally { - try { - retriever.release(); - } catch (RuntimeException ex) { - // Ignore failures while cleaning up. - } - } - return bitmap;*/ - } - @SuppressWarnings("unused") - public static Bitmap getThumbnailWithCreator(final Uri uri, final int width, final int height) { - final String cacheDir = Environment.getExternalStorageDirectory()+"/"+MyApp.getInstance().getRoot()+"/"+CONF.DCACHE+"/"; - final String imgHash = MD5.encrypByMd5(Base64.encode(uri.getPath())); - String imgHashPath; - try { - imgHashPath = FileHelper.getBasePath(MyApp.getInstance().getRoot(),CONF.DCACHE)+"/"+imgHash; - File imgCache = new File(imgHashPath); - - Bitmap img = MVUtil.createVideoThumbnail(uri.getPath(), width, height); - - if (img!=null) { - String thumb = ImageUtil.saveBitmap(cacheDir+imgHash, img); - } else { - if (!imgCache.exists()) { - try { - imgCache.createNewFile(); - } catch (IOException e) { - // TODO Auto-generated catch block - //e.printStackTrace(); - } - } - } - return img; - } catch (IOException e) { - //e.printStackTrace(); - } - - - return null; - } - - public static Bitmap getThumbnailCache(Context context, ContentResolver cr, final Uri uri, final int width, final int height, String root) { - Bitmap img = MVUtil.getVideoThumbnail(cr, uri); - if (img != null) { - return img; - } else { - final String imgHash = MD5.encrypByMd5(Base64.encode(uri.getPath())); - String imgHashPath; - try { - imgHashPath = FileHelper.getBasePath(root, CONF.DCACHE)+"/"+imgHash; - File imgCache = new File(imgHashPath); - - if (imgCache.canRead()) { - imgCache.setLastModified(DateTimeHelper.getNowTime()); - return ImageUtil.getBitFromImg(imgHashPath); - } - } catch (Exception e) { - } - } - return null; - - } - public static Bitmap getThumbnail(Context context, ContentResolver cr, final Uri uri, boolean createFlag, final int width, final int height, final int after) { - Bitmap img = MVUtil.getVideoThumbnail(cr, uri); - - if (img != null) { - return img; - } else { - final String cacheDir = Environment.getExternalStorageDirectory()+"/"+MyApp.getInstance().getRoot()+"/"+CONF.DCACHE+"/"; - final String imgHash = MD5.encrypByMd5(Base64.encode(uri.getPath())); - String imgHashPath; - try { - imgHashPath = FileHelper.getBasePath(MyApp.getInstance().getRoot(), CONF.DCACHE)+"/"+imgHash; - File imgCache = new File(imgHashPath); - - if (imgCache.canRead()) { - imgCache.setLastModified(DateTimeHelper.getNowTime()); - return ImageUtil.getBitFromImg(imgHashPath); - } else { - if (createFlag && after<4) { - Handler mHandler = new Handler(); - mHandler.postDelayed(new Runnable() { - @SuppressWarnings("unused") - @Override - public void run() { - Bitmap img = MVUtil.createVideoThumbnail(uri.getPath(), width, height); - if (img!=null) { - String thumb = ImageUtil.saveBitmap(cacheDir+imgHash, img); - } else { - File imgCache = new File(cacheDir+imgHash); - if (!imgCache.exists()) { - try { - imgCache.createNewFile(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } - } - - },200+after*100); - } - } - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - - return null; - } - } - @TargetApi(5) - public static Bitmap getVideoThumbnail(ContentResolver cr, Uri uri) { - /*try { - long id = ContentUris.parseId(uri); - Bitmap miniThumb = Video.Thumbnails.getThumbnail(cr, id, - Video.Thumbnails.MINI_KIND, null); - return miniThumb; - } catch (NumberFormatException e) { - Log.d(TAG, "error:"+e.getMessage()); - return null; - }*/ - - try { - Bitmap bitmap = null; - BitmapFactory.Options options = new BitmapFactory.Options(); - - //options.inDither = false; - //options.inPreferredConfig = Bitmap.Config.ARGB_8888; - Cursor cursor = cr.query(uri,new String[] { MediaStore.Video.Media._ID }, null, null, null); - - if (cursor == null || cursor.getCount() == 0) { - //Log.d(TAG, "null"); - return null; - } - cursor.moveToFirst(); - String videoId = cursor.getString(cursor.getColumnIndex(MediaStore.Video.Media._ID)); //image id in image table.s - - if (videoId == null) { - return null; - } - cursor.close(); - long videoIdLong = Long.parseLong(videoId); - bitmap = MediaStore.Video.Thumbnails.getThumbnail(cr, videoIdLong,Images.Thumbnails.MINI_KIND, options); - return bitmap; - } catch (Exception e) { - return null; - } - - } -} diff --git a/src/main/java/com/quseit/util/NAction.java b/src/main/java/com/quseit/util/NAction.java index 4182fdc..ab0f360 100644 --- a/src/main/java/com/quseit/util/NAction.java +++ b/src/main/java/com/quseit/util/NAction.java @@ -4,11 +4,14 @@ import android.annotation.TargetApi; import android.app.ActivityManager; import android.app.Notification; +import android.app.NotificationChannel; +import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.content.pm.ConfigurationInfo; import android.graphics.Bitmap; +import android.graphics.Color; import android.net.Uri; import android.os.Build; import android.util.Log; @@ -36,7 +39,27 @@ public class NAction { public static Notification getNotification(Context context, String contentTitle, String contentText, PendingIntent intent, int smallIconId, Bitmap largeIconId, int flags) { - if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN) { + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { + NotificationChannel chan = new NotificationChannel(context.getPackageName(), contentTitle, NotificationManager.IMPORTANCE_NONE); + + chan.setLightColor(Color.BLUE); + chan.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE); + NotificationManager manager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); + assert manager != null; + manager.createNotificationChannel(chan); + + Notification notification = new Notification.Builder(context, context.getPackageName()) //new Notification(icon, tickerText, when); + .setTicker(contentTitle) + .setContentTitle(contentTitle) + .setContentText(contentText) + .setSmallIcon(smallIconId) + .setLargeIcon(largeIconId) + .setAutoCancel(true) + .setContentIntent(intent) + .build(); + + return notification; + } else if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN) { Notification notification = new Notification.Builder(context) //new Notification(icon, tickerText, when); .setTicker(contentTitle) .setContentTitle(contentTitle) @@ -886,10 +909,11 @@ public static boolean isQPy3(Context context) { return false; } } + public static String getQPyInterpreter(Context context) { String qpyInterVal = NStorage.getSP(context, "conf.default_qpy_interpreter"); - if (!qpyInterVal.equals("3.x")) { - qpyInterVal = "2.x"; + if (qpyInterVal.equals("")) { + qpyInterVal = "python3.6"; } return qpyInterVal; diff --git a/src/main/java/com/quseit/util/NRequest.java b/src/main/java/com/quseit/util/NRequest.java index c56bc1f..061d630 100644 --- a/src/main/java/com/quseit/util/NRequest.java +++ b/src/main/java/com/quseit/util/NRequest.java @@ -18,7 +18,6 @@ public class NRequest { private static final String TAG = "NRequest"; - public static void get2(Context context, String url, RequestParams params, AsyncHttpResponseHandler responseHandler) { if (!CONF.DEBUG) Log.d(TAG, "get2:"+url+":p:"+params); HttpHost hcProxyHost = null; @@ -75,41 +74,5 @@ public static void post2(Context context, String url, RequestParams params, Asyn client.post(url, params, responseHandler); } - - public static Boolean isLinkable(String link){ - HttpURLConnection urlConnection = null; - try { - URL url = new URL(link); - urlConnection = (HttpURLConnection) url.openConnection(); - urlConnection.setRequestMethod("HEAD"); - urlConnection.setConnectTimeout(10000); /* timeout after 5s if can't connect */ - urlConnection.setReadTimeout(10000); /* timeout after 5s if the page is too slow */ - urlConnection.connect(); - String redirectLink = urlConnection.getHeaderField("Location"); - if (redirectLink != null && !link.equals(redirectLink)) { - return isLinkable(redirectLink); - } else { - return urlConnection.getResponseCode() == HttpURLConnection.HTTP_OK; - } - } catch (Exception e) { - return false; - } finally { - if (urlConnection != null) { - urlConnection.disconnect(); - } - } - } - - public static String filterUrl(ArrayList links){ - Log.d(TAG, "here!"+links.size()); - for (int i=0;i= Build.VERSION_CODES.LOLLIPOP && Build.SUPPORTED_64_BIT_ABIS.length > 0); + } + // 返回a到b之間(包括a,b)的任意一個自然数,如果a > b || a < 0,返回-1 public static int getRandomInt(int min, int max) { if (min > max || min < 0) diff --git a/src/main/java/com/quseit/view/AdSlidShowView.java b/src/main/java/com/quseit/view/AdSlidShowView.java index e107f87..2a68749 100644 --- a/src/main/java/com/quseit/view/AdSlidShowView.java +++ b/src/main/java/com/quseit/view/AdSlidShowView.java @@ -84,11 +84,13 @@ private void initView(Context context, AttributeSet attrs) { LayoutInflater.from(context).inflate(R.layout.ad_viewpage_view, this); int[] resimg = new int[] { }; adlistImage = new ArrayList(); + if (resimg.length>0) { - for (int i = 0; i < resimg.length; i++) { - ImageView imgView = new ImageView(context); - imgView.setBackgroundResource(resimg[i]); - adlistImage.add(imgView); + for (int i = 0; i < resimg.length; i++) { + ImageView imgView = new ImageView(context); + imgView.setBackgroundResource(resimg[i]); + adlistImage.add(imgView); + } } } diff --git a/src/main/java/com/quseit/widget/AsyncImageView.java b/src/main/java/com/quseit/widget/AsyncImageView.java index 65b6815..b157f01 100644 --- a/src/main/java/com/quseit/widget/AsyncImageView.java +++ b/src/main/java/com/quseit/widget/AsyncImageView.java @@ -304,7 +304,7 @@ public void setOnImageViewLoadListener(OnImageViewLoadListener listener) { public void setUrl(String url) { // cache if (url!=null) { - String cacheDir = Environment.getExternalStorageDirectory()+"/"+MyApp.getInstance().getRoot()+"/"+CONF.DCACHE+"/"; + String cacheDir = Environment.getExternalStorageDirectory()+"/"+CONF.DCACHE+"/"; String imgHash = MD5.encrypByMd5(Base64.encode(url)); File imgCache = new File(cacheDir+imgHash); @@ -612,12 +612,11 @@ public void onImageRequestEnded(ImageRequest request, Bitmap image) { * CACHE TODO */ if (mUrl!=null) { - //String cacheDir = Environment.getExternalStorageDirectory()+"/"+MyApp.getInstance().getRoot()+"/"+CONF.DCACHE+"/"; String imgHash = MD5.encrypByMd5(Base64.encode(mUrl)); byte[] bmpb = ImageUtil.Bitmap2Bytes(image); String imgHashPath; try { - imgHashPath = FileHelper.getBasePath(MyApp.getInstance().getRoot(), CONF.DCACHE)+"/"+imgHash; + imgHashPath = FileHelper.getBasePath(Environment.getExternalStorageDirectory().toString(), CONF.DCACHE)+"/"+imgHash; try { File imgCache = new File(imgHashPath); diff --git a/src/main/res/drawable-xhdpi/float_bg.xml b/src/main/res/drawable-hdpi/float_bg.xml similarity index 100% rename from src/main/res/drawable-xhdpi/float_bg.xml rename to src/main/res/drawable-hdpi/float_bg.xml diff --git a/src/main/res/drawable-xhdpi/trans_bg.xml b/src/main/res/drawable-hdpi/trans_bg.xml similarity index 100% rename from src/main/res/drawable-xhdpi/trans_bg.xml rename to src/main/res/drawable-hdpi/trans_bg.xml diff --git a/src/main/res/drawable-mdpi/ic_downloaded_plugin.png b/src/main/res/drawable-mdpi/ic_downloaded_plugin.png deleted file mode 100644 index c7e6ba5..0000000 Binary files a/src/main/res/drawable-mdpi/ic_downloaded_plugin.png and /dev/null differ diff --git a/src/main/res/drawable-mdpi/ic_local.png b/src/main/res/drawable-mdpi/ic_local.png deleted file mode 100644 index f5b2461..0000000 Binary files a/src/main/res/drawable-mdpi/ic_local.png and /dev/null differ diff --git a/src/main/res/drawable-mdpi/ic_plugins.png b/src/main/res/drawable-mdpi/ic_plugins.png deleted file mode 100644 index 86aadbc..0000000 Binary files a/src/main/res/drawable-mdpi/ic_plugins.png and /dev/null differ diff --git a/src/main/res/drawable-mdpi/ic_settings.png b/src/main/res/drawable-mdpi/ic_settings.png deleted file mode 100644 index fb4743a..0000000 Binary files a/src/main/res/drawable-mdpi/ic_settings.png and /dev/null differ diff --git a/src/main/res/drawable-mdpi/img_logo.png b/src/main/res/drawable-mdpi/img_logo.png deleted file mode 100644 index 82da96f..0000000 Binary files a/src/main/res/drawable-mdpi/img_logo.png and /dev/null differ diff --git a/src/main/res/drawable-xhdpi/ic_downloaded_plugin.png b/src/main/res/drawable-xhdpi/ic_downloaded_plugin.png deleted file mode 100644 index d890102..0000000 Binary files a/src/main/res/drawable-xhdpi/ic_downloaded_plugin.png and /dev/null differ diff --git a/src/main/res/drawable-xhdpi/ic_local.png b/src/main/res/drawable-xhdpi/ic_local.png deleted file mode 100644 index 888289f..0000000 Binary files a/src/main/res/drawable-xhdpi/ic_local.png and /dev/null differ diff --git a/src/main/res/drawable-xhdpi/ic_plugins.png b/src/main/res/drawable-xhdpi/ic_plugins.png deleted file mode 100644 index 01e577e..0000000 Binary files a/src/main/res/drawable-xhdpi/ic_plugins.png and /dev/null differ diff --git a/src/main/res/drawable-xhdpi/ic_settings.png b/src/main/res/drawable-xhdpi/ic_settings.png deleted file mode 100644 index e7a7e40..0000000 Binary files a/src/main/res/drawable-xhdpi/ic_settings.png and /dev/null differ diff --git a/src/main/res/drawable-xhdpi/img_logo.png b/src/main/res/drawable-xhdpi/img_logo.png deleted file mode 100644 index 40b6a9f..0000000 Binary files a/src/main/res/drawable-xhdpi/img_logo.png and /dev/null differ diff --git a/src/main/res/drawable-xxhdpi/ic_downloaded_plugin.png b/src/main/res/drawable-xxhdpi/ic_downloaded_plugin.png deleted file mode 100644 index 70821b8..0000000 Binary files a/src/main/res/drawable-xxhdpi/ic_downloaded_plugin.png and /dev/null differ diff --git a/src/main/res/drawable-xxhdpi/ic_local.png b/src/main/res/drawable-xxhdpi/ic_local.png deleted file mode 100644 index ea6792b..0000000 Binary files a/src/main/res/drawable-xxhdpi/ic_local.png and /dev/null differ diff --git a/src/main/res/drawable-xxhdpi/ic_plugins.png b/src/main/res/drawable-xxhdpi/ic_plugins.png deleted file mode 100644 index 7ed67ae..0000000 Binary files a/src/main/res/drawable-xxhdpi/ic_plugins.png and /dev/null differ diff --git a/src/main/res/drawable-xxhdpi/ic_settings.png b/src/main/res/drawable-xxhdpi/ic_settings.png deleted file mode 100644 index b7b5daa..0000000 Binary files a/src/main/res/drawable-xxhdpi/ic_settings.png and /dev/null differ diff --git a/src/main/res/drawable-xxhdpi/img_logo.png b/src/main/res/drawable-xxhdpi/img_logo.png deleted file mode 100644 index 033a692..0000000 Binary files a/src/main/res/drawable-xxhdpi/img_logo.png and /dev/null differ diff --git a/src/main/res/drawable-xxxhdpi/ic_downloaded_plugin.png b/src/main/res/drawable-xxxhdpi/ic_downloaded_plugin.png deleted file mode 100644 index ec5736a..0000000 Binary files a/src/main/res/drawable-xxxhdpi/ic_downloaded_plugin.png and /dev/null differ diff --git a/src/main/res/drawable-xxxhdpi/ic_local.png b/src/main/res/drawable-xxxhdpi/ic_local.png deleted file mode 100644 index a9c9c92..0000000 Binary files a/src/main/res/drawable-xxxhdpi/ic_local.png and /dev/null differ diff --git a/src/main/res/drawable-xxxhdpi/ic_plugins.png b/src/main/res/drawable-xxxhdpi/ic_plugins.png deleted file mode 100644 index 276959f..0000000 Binary files a/src/main/res/drawable-xxxhdpi/ic_plugins.png and /dev/null differ diff --git a/src/main/res/drawable-xxxhdpi/ic_settings.png b/src/main/res/drawable-xxxhdpi/ic_settings.png deleted file mode 100644 index 63c274f..0000000 Binary files a/src/main/res/drawable-xxxhdpi/ic_settings.png and /dev/null differ diff --git a/src/main/res/drawable-xxxhdpi/img_logo.png b/src/main/res/drawable-xxxhdpi/img_logo.png deleted file mode 100644 index 9c4243d..0000000 Binary files a/src/main/res/drawable-xxxhdpi/img_logo.png and /dev/null differ diff --git a/src/main/res/drawable/action_bar_background.xml b/src/main/res/drawable/action_bar_background.xml index d2f22e0..16e6883 100644 --- a/src/main/res/drawable/action_bar_background.xml +++ b/src/main/res/drawable/action_bar_background.xml @@ -22,8 +22,8 @@ android:shape="rectangle"> diff --git a/src/main/res/layout/ad_viewpage_view.xml b/src/main/res/layout/ad_viewpage_view.xml index d49f383..e8ab66c 100644 --- a/src/main/res/layout/ad_viewpage_view.xml +++ b/src/main/res/layout/ad_viewpage_view.xml @@ -15,10 +15,9 @@ android:layout_height="wrap_content" android:gravity="center_horizontal" android:orientation="horizontal" - android:layout_alignParentBottom="true" - android:layout_marginBottom="5dp" + android:layout_alignParentBottom="true" + android:layout_marginBottom="5dp" > - diff --git a/src/main/res/layout/md_paged_webview.xml b/src/main/res/layout/md_paged_webview.xml index 6afe768..b69c6c6 100644 --- a/src/main/res/layout/md_paged_webview.xml +++ b/src/main/res/layout/md_paged_webview.xml @@ -4,6 +4,4 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:layout_x="0.0dip" - android:layout_y="0.0dip" android:layout_weight="1.0" /> \ No newline at end of file diff --git a/src/main/res/layout/o_about.xml b/src/main/res/layout/o_about.xml index 5fb9ee7..3d392d3 100644 --- a/src/main/res/layout/o_about.xml +++ b/src/main/res/layout/o_about.xml @@ -88,11 +88,10 @@ android:paddingLeft="20dp" android:text="@string/privacy_url" android:textColor="@color/link" - android:maxLines="1" - android:ellipsize="middle" + android:ellipsize="middle" android:autoLink="web" android:textStyle="bold" - /> + android:singleLine="true" /> + android:orientation="vertical" + > + android:maxHeight="5px" + android:minHeight="5px"> + android:padding="5.0dip" + android:visibility="gone"> diff --git a/src/main/res/layout/v_webview.xml b/src/main/res/layout/v_webview.xml index 8f08f06..2f5eb73 100644 --- a/src/main/res/layout/v_webview.xml +++ b/src/main/res/layout/v_webview.xml @@ -1,15 +1,13 @@ - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:orientation="vertical" + xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_width="fill_parent" android:orientation="vertical"> + - \ No newline at end of file + \ No newline at end of file diff --git a/src/main/res/values-zh-rCN/strings.xml b/src/main/res/values-zh-rCN/strings.xml index 3b510bd..d4fdb36 100644 --- a/src/main/res/values-zh-rCN/strings.xml +++ b/src/main/res/values-zh-rCN/strings.xml @@ -65,9 +65,8 @@ 摇滚音乐 播放器 OK - 土拨鼠视频下载器 可以帮助您在 YouTube中找到并下载有趣的视频,这将是您在移动设备上观看 YouTube 上的视频的最好方法。 + 隐私政策 - http://tubebook.net/privacy.html http://quseit.com/ 将{0}从播放列表中删除 OK @@ -117,7 +116,7 @@ 在移动设备中观看 设置 FTP 服务 - 升级为专业版 + 升级为Python3.6版 脚本插件 代理设置 代理主机 diff --git a/src/main/res/values-zh-rTW/strings.xml b/src/main/res/values-zh-rTW/strings.xml index 59450d8..a684938 100644 --- a/src/main/res/values-zh-rTW/strings.xml +++ b/src/main/res/values-zh-rTW/strings.xml @@ -64,9 +64,8 @@ 搖滾音樂 播放器 OK -土撥鼠視頻下載器可以幫助您在YouTube中找到並下載有趣的視頻,這將是您在移動設備上觀看YouTube 上的視頻的最好方法。 + 隱私政策 -http://tubebook.net/privacy.html http://quseit.com/ 將{0}從播放列表中刪除 OK @@ -113,7 +112,7 @@ 在移動設備中觀看 設置 FTP 服務 -升級為專業版 +升級為Python3.6版 腳本插件 代理設置 代理主機 diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index f26de0b..19341d5 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -1,7 +1,7 @@ - QApplication - QApplication + QPython + QPython http://quseit.com/ http://quseit.com/ Check for new version @@ -64,11 +64,11 @@ Hot Music Player OK - Tube Downloader can help you find and download interesting videos from YouTube, It\'s the best way you enjoy the videos of YouTube on mobile + Privacy Policy TB Service - http://quseit.com/privacy.html - http://quseit.com/ + https://www.qpython.org/privacy.html + https://quseit.com/ Delete {0} from playlist OK Voice search @@ -117,7 +117,9 @@ Watch on mobile Setting FTP Service - Upgrade to Pro version + Upgrade to Python3.6 version + PIP Console + Script Plugin Proxy Setting Proxy host @@ -249,7 +251,7 @@ Default Program Upgrade to Pro edition Resource are not available - Reset private space + Reset private storage Confirm reset This action will empty the private space, you need to reinstall some plugins, continue? port @@ -269,11 +271,15 @@ Please allow the permission Please enable the float window - 1347438560.05 - 1347438560.05 - 1347438550.05 - 1347438520.05 - 1347438500.05 - 1347438550.05 + 1347438720.05 + 1347438720.05 + 1347438720.05 + 1347438540.05 + 1347438540.05 + 1347438640.05 + + 1347438563.05 + 1347438563.05 + 1347438560.05