Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fallenstardust
YGOMobile-Cn-Ko-En
Commits
f6ae818f
Commit
f6ae818f
authored
Jan 11, 2025
by
feihuaduo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WebView支持YGO-DA协议中的卡组协议
parent
a6cfb339
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
mobile/build.gradle
mobile/build.gradle
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/bean/Deck.java
mobile/src/main/java/cn/garymb/ygomobile/bean/Deck.java
+6
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/plus/DefWebViewClient.java
...in/java/cn/garymb/ygomobile/ui/plus/DefWebViewClient.java
+7
-0
No files found.
mobile/build.gradle
View file @
f6ae818f
...
@@ -105,7 +105,7 @@ dependencies {
...
@@ -105,7 +105,7 @@ dependencies {
implementation
'com.nightonke:boommenu:2.1.0'
implementation
'com.nightonke:boommenu:2.1.0'
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
//dialog库
//dialog库
implementation
'com.github.feihuaduo:DialogUtils:1.8.9.
23
'
implementation
'com.github.feihuaduo:DialogUtils:1.8.9.
31
'
//recyclerview的adapter库
//recyclerview的adapter库
implementation
'io.github.cymchad:BaseRecyclerViewAdapterHelper:3.0.14'
implementation
'io.github.cymchad:BaseRecyclerViewAdapterHelper:3.0.14'
implementation
'androidx.appcompat:appcompat:1.7.0'
implementation
'androidx.appcompat:appcompat:1.7.0'
...
...
mobile/src/main/java/cn/garymb/ygomobile/bean/Deck.java
View file @
f6ae818f
...
@@ -79,7 +79,12 @@ public class Deck implements Parcelable {
...
@@ -79,7 +79,12 @@ public class Deck implements Parcelable {
public
Uri
toUri
()
{
public
Uri
toUri
()
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
Constants
.
QUERY_NAME
,
name
);
String
deckName
=
name
;
int
ydkIndex
=
deckName
.
indexOf
(
YDK_FILE_EX
);
if
(
ydkIndex
!=
-
1
)
{
deckName
=
deckName
.
substring
(
0
,
ydkIndex
);
}
map
.
put
(
Constants
.
QUERY_NAME
,
deckName
);
return
YGODAUtil
.
toUri
(
mainlist
,
extraList
,
sideList
,
map
);
return
YGODAUtil
.
toUri
(
mainlist
,
extraList
,
sideList
,
map
);
}
}
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/plus/DefWebViewClient.java
View file @
f6ae818f
package
cn.garymb.ygomobile.ui.plus
;
package
cn.garymb.ygomobile.ui.plus
;
import
com.ourygo.lib.duelassistant.util.DARecord
;
import
com.ourygo.lib.duelassistant.util.DuelAssistantManagement
;
import
com.tencent.smtt.sdk.WebView
;
import
com.tencent.smtt.sdk.WebView
;
import
com.tencent.smtt.sdk.WebViewClient
;
import
com.tencent.smtt.sdk.WebViewClient
;
public
class
DefWebViewClient
extends
WebViewClient
{
public
class
DefWebViewClient
extends
WebViewClient
{
private
static
final
int
CHECK_ID_WEB_VIEW
=
100
;
@Override
@Override
public
boolean
shouldOverrideUrlLoading
(
WebView
view
,
String
url
)
{
public
boolean
shouldOverrideUrlLoading
(
WebView
view
,
String
url
)
{
if
(
url
.
startsWith
(
DARecord
.
DECK_URL_PREFIX
))
{
DuelAssistantManagement
.
getInstance
().
deckCheck
(
url
,
CHECK_ID_WEB_VIEW
);
return
true
;
}
return
false
;
return
false
;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment