4.1.0 Alpha3
This commit is contained in:
@@ -5,10 +5,13 @@ import android.app.Activity;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import android.util.AttributeSet;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebChromeClient;
|
||||
@@ -19,6 +22,7 @@ import android.webkit.WebViewClient;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ProgressBar;
|
||||
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
import com.stardust.app.OnActivityResultDelegate;
|
||||
|
||||
import org.autojs.autojs.R;
|
||||
@@ -205,8 +209,13 @@ public class EWebView extends FrameLayout implements SwipeRefreshLayout.OnRefres
|
||||
if (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("file://")) {
|
||||
view.loadUrl(url);
|
||||
} else {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
List<ResolveInfo> intentActivities = getContext().getPackageManager().queryIntentActivities(intent, 0);
|
||||
if (intentActivities.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
getContext().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
|
||||
getContext().startActivity(Intent.createChooser(intent, getResources().getString(R.string.text_open_with)));
|
||||
} catch (ActivityNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
|
||||
BIN
app/src/main/res/drawable-xhdpi/ic_build_apk.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_build_apk.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
@@ -43,7 +43,7 @@
|
||||
android:layout_marginRight="2dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="6dp"
|
||||
android:src="@drawable/ic_build_black_48dp"
|
||||
android:src="@drawable/ic_build_apk"
|
||||
android:tint="#606366"/>
|
||||
|
||||
<ImageView
|
||||
|
||||
@@ -433,6 +433,7 @@
|
||||
<string name="description_usage_stats_permission">通过\"查看使用统计\"权限可以获取本设备过去使用应用的情况,从而使获取当前应用(currentPackage)时更准确。</string>
|
||||
<string name="text_gesture_observing">手势监听</string>
|
||||
<string name="summary_gesture_observing">开启后将支持events手势事件,但Auto.js崩溃时可能会导致屏幕失灵</string>
|
||||
<string name="text_open_with">打开方式</string>
|
||||
<plurals name="air_error_short_description" key="air_error_short_description">
|
||||
<item quantity="one">描述至少要 %d 个字.</item>
|
||||
<item quantity="other">描述至少要 %d 个字.</item>
|
||||
|
||||
Reference in New Issue
Block a user