Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
Commits
4f2ba092
Commit
4f2ba092
authored
Nov 23, 2021
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pre release下载页面
parent
cea6a555
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
4 deletions
+37
-4
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
+2
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/activities/WebActivity.java
...n/java/cn/garymb/ygomobile/ui/activities/WebActivity.java
+12
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
...c/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
+3
-3
mobile/src/main/res/layout/activity_webbrowser.xml
mobile/src/main/res/layout/activity_webbrowser.xml
+16
-0
mobile/src/main/res/menu/nav_main_menu.xml
mobile/src/main/res/menu/nav_main_menu.xml
+1
-1
mobile/src/main/res/values-ko/strings.xml
mobile/src/main/res/values-ko/strings.xml
+1
-0
mobile/src/main/res/values-zh/strings.xml
mobile/src/main/res/values-zh/strings.xml
+1
-0
mobile/src/main/res/values/strings.xml
mobile/src/main/res/values/strings.xml
+1
-0
No files found.
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
View file @
4f2ba092
...
...
@@ -148,6 +148,8 @@ public interface Constants {
String
URL_HELP
=
"http://note.youdao.com/noteshare?id=8ae2dc824b7dc04a95a4665a938e2251"
;
String
URL_MASTER_RULE_CN
=
"https://ocg-rule.readthedocs.io/"
;
String
WIKI_SEARCH_URL
=
"https://www.ourocg.cn/S.aspx?key="
;
String
URL_YGO233_ADVANCE
=
"https://ygo233.com/pre"
;
String
URL_YGO233_FILE
=
"https://cdn.233.momobako.com/ygosrv233/20211122084301/ygosrv233-pre-mobile.zip"
;
String
SERVER_FILE
=
"server_list.xml"
;
String
SHARE_FILE
=
".share_deck.png"
;
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/activities/WebActivity.java
View file @
4f2ba092
...
...
@@ -4,6 +4,8 @@ import android.content.Context;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.view.MenuItem
;
import
android.view.View
;
import
android.widget.Button
;
import
androidx.annotation.Nullable
;
import
androidx.appcompat.widget.Toolbar
;
...
...
@@ -17,6 +19,7 @@ public class WebActivity extends BaseActivity {
private
WebViewPlus
mWebViewPlus
;
private
String
mUrl
;
private
String
mTitle
;
private
static
Button
btn_download
;
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
...
...
@@ -26,6 +29,7 @@ public class WebActivity extends BaseActivity {
setSupportActionBar
(
toolbar
);
enableBackHome
();
mWebViewPlus
=
$
(
R
.
id
.
webbrowser
);
btn_download
=
$
(
R
.
id
.
web_btn_download_prerelease
);
/*mWebViewPlus.enableHtml5();
mWebViewPlus.setWebChromeClient(new DefWebChromeClient() {
@Override
...
...
@@ -120,6 +124,14 @@ public class WebActivity extends BaseActivity {
context
.
startActivity
(
intent
);
}
public
static
void
open
(
Context
context
,
String
title
,
String
url
,
boolean
showButton
)
{
open
(
context
,
title
,
url
);
if
(
showButton
){
btn_download
.
setVisibility
(
View
.
VISIBLE
);
}
}
public
static
void
openFAQ
(
Context
context
,
Card
cardInfo
){
String
uri
=
Constants
.
WIKI_SEARCH_URL
+
String
.
format
(
"%08d"
,
cardInfo
.
getCode
());
WebActivity
.
open
(
context
,
cardInfo
.
Name
,
uri
);
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
View file @
4f2ba092
...
...
@@ -336,8 +336,8 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
builder
.
show
();
}
break
;
case
R
.
id
.
action_
add_server
:
mServerListManager
.
addServer
(
);
case
R
.
id
.
action_
download_ex
:
WebActivity
.
open
(
this
,
getString
(
R
.
string
.
action_download_expansions
),
Constants
.
URL_YGO233_ADVANCE
,
true
);
break
;
case
R
.
id
.
action_card_search
:
startActivity
(
new
Intent
(
this
,
CardSearchActivity
.
class
));
...
...
@@ -497,7 +497,7 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_card_search
,
R
.
string
.
card_search
,
R
.
drawable
.
search
);
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_deck_manager
,
R
.
string
.
deck_manager
,
R
.
drawable
.
deck
);
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_
add_server
,
R
.
string
.
action_add_server
,
R
.
drawable
.
addsever
);
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_
download_ex
,
R
.
string
.
action_download_expansions
,
R
.
drawable
.
downloadimages
);
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_game
,
R
.
string
.
action_game
,
R
.
drawable
.
start
);
addMenuButton
(
mMenuIds
,
menu
,
R
.
id
.
action_help
,
R
.
string
.
help
,
R
.
drawable
.
help
);
...
...
mobile/src/main/res/layout/activity_webbrowser.xml
View file @
4f2ba092
...
...
@@ -15,5 +15,21 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/web_btn_bar"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:orientation=
"horizontal"
>
<Button
android:id=
"@+id/web_btn_download_prerelease"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/button_n"
android:text=
"@string/Download"
android:visibility=
"gone"
/>
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
mobile/src/main/res/menu/nav_main_menu.xml
View file @
4f2ba092
...
...
@@ -9,7 +9,7 @@
android:icon=
"@drawable/ic_edit"
android:title=
"@string/deck_manager"
/>
<item
android:id=
"@+id/action_
add_server
"
android:id=
"@+id/action_
download_ex
"
android:icon=
"@drawable/ic_add"
android:title=
"@string/action_add_server"
/>
<item
...
...
mobile/src/main/res/values-ko/strings.xml
View file @
4f2ba092
...
...
@@ -318,4 +318,5 @@
<string
name=
"label_ot_CUSTOM"
>
커스텀 카드
</string>
<string
name=
"settings_screen_padding"
>
화면 스타일
</string>
<string
name=
"tip_load_cdb_error"
>
데이터를 불러오는 중에 오류가 발생했습니다.
</string>
<string
name=
"action_download_expansions"
>
다운로드 삭제
</string>
</resources>
mobile/src/main/res/values-zh/strings.xml
View file @
4f2ba092
...
...
@@ -28,6 +28,7 @@
<string
name=
"bg_menu"
>
菜单背景
</string>
<string
name=
"bg_deck"
>
卡组背景
</string>
<string
name=
"action_add_server"
>
添加服务器
</string>
<string
name=
"action_download_expansions"
>
拓展卡下载
</string>
<string
name=
"no_find_file_selectotr"
>
没有找到文件选择器
</string>
<string
name=
"no_find_image_selector"
>
没有找到图片选择器
</string>
<string
name=
"no_find_image_cutor"
>
没有找到裁剪工具
</string>
...
...
mobile/src/main/res/values/strings.xml
View file @
4f2ba092
...
...
@@ -328,4 +328,5 @@
<string
name=
"label_ot_SC_OCG"
>
SChinese OCG
</string>
<string
name=
"settings_screen_padding"
>
Reserved height of curved screen
</string>
<string
name=
"tip_load_cdb_error"
>
Load database error
</string>
<string
name=
"action_download_expansions"
>
download\\nexpansions
</string>
</resources>
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