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
1e41fa51
Commit
1e41fa51
authored
Jan 03, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微调UI
parent
5b7949b2
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
97 additions
and
52 deletions
+97
-52
mobile/assets/changelog.html
mobile/assets/changelog.html
+2
-1
mobile/build.gradle
mobile/build.gradle
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/adapters/ServerListAdapter.java
...va/cn/garymb/ygomobile/ui/adapters/ServerListAdapter.java
+11
-6
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
...c/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
+5
-1
mobile/src/main/java/cn/garymb/ygomobile/utils/PayUtils.java
mobile/src/main/java/cn/garymb/ygomobile/utils/PayUtils.java
+24
-29
mobile/src/main/res/drawable-xhdpi/alipay.png
mobile/src/main/res/drawable-xhdpi/alipay.png
+0
-0
mobile/src/main/res/drawable-xhdpi/trpay.png
mobile/src/main/res/drawable-xhdpi/trpay.png
+0
-0
mobile/src/main/res/drawable-xhdpi/wechat.png
mobile/src/main/res/drawable-xhdpi/wechat.png
+0
-0
mobile/src/main/res/layout/dialog_alipay_or_wechat.xml
mobile/src/main/res/layout/dialog_alipay_or_wechat.xml
+27
-2
mobile/src/main/res/layout/dialog_server_edit.xml
mobile/src/main/res/layout/dialog_server_edit.xml
+8
-0
mobile/src/main/res/layout/item_server_info_swipe.xml
mobile/src/main/res/layout/item_server_info_swipe.xml
+9
-2
mobile/src/main/res/values-ko/strings.xml
mobile/src/main/res/values-ko/strings.xml
+3
-3
mobile/src/main/res/values-zh/strings.xml
mobile/src/main/res/values-zh/strings.xml
+3
-3
mobile/src/main/res/values/strings.xml
mobile/src/main/res/values/strings.xml
+3
-3
No files found.
mobile/assets/changelog.html
View file @
1e41fa51
...
...
@@ -15,7 +15,7 @@
特别感谢: 菜菜,尸体,废话多,大毛,龙道香姐,晓L,幻兽L 的支持与努力.
</pre>
<ul>
<li
style=
"color:#ffff00"
>
3.6.
0
</li>
<li
style=
"color:#ffff00"
>
3.6.
1
</li>
</ul>
<pre>
更新:
...
...
@@ -28,6 +28,7 @@
·不需要通知,悬浮窗权限;
·需复制后打开本app才能检测;
3.同一召唤曲结束前不会重复播放;
4.微调UI;
</pre>
<h3
style=
"color:#ff0000"
>
注意
</h3>
<pre>
...
...
mobile/build.gradle
View file @
1e41fa51
...
...
@@ -8,7 +8,7 @@ android {
applicationId
"cn.garymb.ygomobile"
minSdkVersion
21
targetSdkVersion
28
versionCode
36010010
1
versionCode
36010010
3
versionName
"3.6.1"
flavorDimensions
"versionCode"
vectorDrawables
.
useSupportLibrary
=
true
...
...
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
View file @
1e41fa51
...
...
@@ -142,7 +142,7 @@ public interface Constants {
int
DECK_SIDE_MAX
=
15
;
int
DECK_EXTRA_COUNT
=
(
DECK_SIDE_MAX
/
DECK_WIDTH_COUNT
*
DECK_WIDTH_COUNT
<
DECK_SIDE_MAX
)
?
DECK_WIDTH_COUNT
*
2
:
DECK_WIDTH_COUNT
;
int
DECK_SIDE_COUNT
=
DECK_EXTRA_COUNT
;
//
String ALIPAY_URL = "HTTPS://QR.ALIPAY.COM/FKX06491UAXJMGIDTYVC0C";
String
ALIPAY_URL
=
"HTTPS://QR.ALIPAY.COM/FKX06491UAXJMGIDTYVC0C"
;
String
PAYPAL_URL
=
"https://www.paypal.me/YGOmobile3"
;
String
URL_HELP
=
"http://note.youdao.com/noteshare?id=8ae2dc824b7dc04a95a4665a938e2251"
;
String
URL_MASTERRULE_CN
=
"https://ocg-rule.readthedocs.io/zh_CN/master/"
;
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/adapters/ServerListAdapter.java
View file @
1e41fa51
...
...
@@ -3,6 +3,7 @@ package cn.garymb.ygomobile.ui.adapters;
import
android.content.Context
;
import
android.content.Intent
;
import
android.net.Uri
;
import
android.os.Build
;
import
android.provider.Settings
;
import
android.view.ViewGroup
;
...
...
@@ -34,12 +35,16 @@ public class ServerListAdapter extends BaseRecyclerAdapterPlus<ServerInfo, Serve
holder
.
iv_fond
.
setOnClickListener
((
v
)
->
{
DialogPlus
builder
=
new
DialogPlus
(
getContext
());
builder
.
setTitle
(
R
.
string
.
OpenTIP
);
builder
.
setMessage
(
R
.
string
.
join_helper_tip
);
builder
.
setLeftButtonText
(
R
.
string
.
Open_Alert_Window
);
builder
.
setLeftButtonListener
((
dlg
,
s
)
->
{
getContext
().
startActivity
(
new
Intent
(
Settings
.
ACTION_MANAGE_OVERLAY_PERMISSION
,
Uri
.
parse
(
"package:"
+
context
.
getPackageName
())));
dlg
.
dismiss
();
});
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
Q
)
{
builder
.
setMessage
(
context
.
getString
(
R
.
string
.
join_helper_tip1
)
+
context
.
getString
(
R
.
string
.
join_helper_tip2
));
builder
.
setLeftButtonText
(
R
.
string
.
Open_Alert_Window
);
builder
.
setLeftButtonListener
((
dlg
,
s
)
->
{
getContext
().
startActivity
(
new
Intent
(
Settings
.
ACTION_MANAGE_OVERLAY_PERMISSION
,
Uri
.
parse
(
"package:"
+
context
.
getPackageName
())));
dlg
.
dismiss
();
});
}
else
{
builder
.
setMessage
(
R
.
string
.
join_helper_tip1
);
}
builder
.
show
();
});
if
(
position
==
0
)
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
View file @
1e41fa51
...
...
@@ -263,9 +263,13 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
dialog
.
setTitle
(
R
.
string
.
logo_text
);
dialog
.
show
();
View
viewDialog
=
dialog
.
getContentView
();
Button
btnAlipay
=
viewDialog
.
findViewById
(
R
.
id
.
button_alipay
);
Button
btnTrpay
=
viewDialog
.
findViewById
(
R
.
id
.
button_trpay
);
Button
btnpaypal
=
viewDialog
.
findViewById
(
R
.
id
.
button_paypal
);
btnAlipay
.
setOnClickListener
((
v
)
->
{
PayUtils
.
openAlipayPayPage
(
getContext
(),
Constants
.
ALIPAY_URL
);
dialog
.
dismiss
();
});
btnTrpay
.
setOnClickListener
((
v
)
->
{
PayUtils
.
inputMoney
(
HomeActivity
.
this
);
dialog
.
dismiss
();
...
...
mobile/src/main/java/cn/garymb/ygomobile/utils/PayUtils.java
View file @
1e41fa51
...
...
@@ -2,6 +2,8 @@ package cn.garymb.ygomobile.utils;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.net.Uri
;
import
android.telephony.TelephonyManager
;
import
android.text.InputType
;
import
android.view.Gravity
;
...
...
@@ -11,44 +13,37 @@ import com.base.bj.paysdk.domain.TrPayResult;
import
com.base.bj.paysdk.listener.PayResultListener
;
import
com.base.bj.paysdk.utils.TrPay
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.net.URLEncoder
;
import
java.util.UUID
;
import
cn.garymb.ygomobile.Constants
;
import
cn.garymb.ygomobile.bean.ServerInfo
;
import
cn.garymb.ygomobile.bean.ServerList
;
import
cn.garymb.ygomobile.ui.adapters.ServerListAdapter
;
import
cn.garymb.ygomobile.ui.home.ServerListManager
;
import
cn.garymb.ygomobile.ui.plus.DialogPlus
;
import
cn.garymb.ygomobile.ui.plus.VUiKit
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
A
SSET_SERVER_LIST
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
A
LIPAY_URL
;
public
class
PayUtils
{
/***
*支付宝(弃用
*/
public
static
boolean
openAlipayPayPage
(
Context
context
,
String
qrcode
)
{
try
{
qrcode
=
URLEncoder
.
encode
(
ALIPAY_URL
,
"utf-8"
);
}
catch
(
Exception
e
)
{
}
try
{
final
String
alipayqr
=
"alipayqr://platformapi/startapp?saId=10000007&clientVersion=3.7.0.0718&qrcode="
+
qrcode
;
openUri
(
context
,
alipayqr
+
"%3F_s%3Dweb-other&_t="
+
System
.
currentTimeMillis
());
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
public static boolean openAlipayPayPage(Context context, String qrcode) {
try {
qrcode = URLEncoder.encode(ALIPAY_URL, "utf-8");
} catch (Exception e) {
}
try {
final String alipayqr = "alipayqr://platformapi/startapp?saId=10000007&clientVersion=3.7.0.0718&qrcode=" + qrcode;
openUri(context, alipayqr + "%3F_s%3Dweb-other&_t=" + System.currentTimeMillis());
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
private static void openUri(Context context, String s) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(s));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}*/
private
static
void
openUri
(
Context
context
,
String
s
)
{
Intent
intent
=
new
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
s
));
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
context
.
startActivity
(
intent
);
}
/***
* 图灵trpay
...
...
mobile/src/main/res/drawable-xhdpi/alipay.png
0 → 100644
View file @
1e41fa51
3.77 KB
mobile/src/main/res/drawable-xhdpi/trpay.png
deleted
100644 → 0
View file @
5b7949b2
14.7 KB
mobile/src/main/res/drawable-xhdpi/wechat.png
0 → 100644
View file @
1e41fa51
6.34 KB
mobile/src/main/res/layout/dialog_alipay_or_wechat.xml
View file @
1e41fa51
...
...
@@ -43,13 +43,38 @@
android:id=
"@+id/button_trpay"
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:background=
"@drawable/
trpay
"
/>
android:background=
"@drawable/
wechat
"
/>
<TextView
android:layout_width=
"60dp"
android:layout_height=
"20dp"
android:gravity=
"bottom|center_horizontal"
android:text=
"支付宝/微信"
android:text=
"微信"
android:textSize=
"25px"
/>
</LinearLayout>
<TextView
android:layout_width=
"@dimen/label_width_middle"
android:layout_height=
"wrap_content"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/gold"
/>
<LinearLayout
android:layout_width=
"60dp"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<Button
android:id=
"@+id/button_alipay"
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:background=
"@drawable/alipay"
/>
<TextView
android:layout_width=
"60dp"
android:layout_height=
"20dp"
android:gravity=
"bottom|center_horizontal"
android:text=
"支付宝"
android:textSize=
"25px"
/>
</LinearLayout>
</LinearLayout>
...
...
mobile/src/main/res/layout/dialog_server_edit.xml
View file @
1e41fa51
...
...
@@ -13,6 +13,7 @@
android:layout_width=
"@dimen/label_width_middle"
android:layout_height=
"wrap_content"
android:text=
"@string/server_name"
android:textSize=
"38px"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/gold"
/>
...
...
@@ -25,6 +26,7 @@
android:inputType=
"textNoSuggestions"
android:maxLines=
"1"
android:singleLine=
"true"
android:textSize=
"38px"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/holo_blue_bright"
/>
</LinearLayout>
...
...
@@ -45,6 +47,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:text=
"@string/server_ip"
android:textSize=
"38px"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/gold"
/>
...
...
@@ -55,6 +58,7 @@
android:hint=
"@string/must_info"
android:inputType=
"textNoSuggestions"
android:maxLines=
"1"
android:textSize=
"38px"
android:singleLine=
"true"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/holo_blue_bright"
/>
...
...
@@ -68,6 +72,7 @@
android:layout_width=
"41dp"
android:layout_height=
"wrap_content"
android:text=
"@string/server_port"
android:textSize=
"38px"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/gold"
/>
...
...
@@ -77,6 +82,7 @@
android:layout_height=
"wrap_content"
android:digits=
"1234567890"
android:maxLines=
"1"
android:textSize=
"38px"
android:singleLine=
"true"
android:text=
"0"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
...
...
@@ -94,6 +100,7 @@
android:layout_width=
"@dimen/label_width_middle"
android:layout_height=
"wrap_content"
android:text=
"@string/server_user"
android:textSize=
"38px"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/gold"
/>
...
...
@@ -105,6 +112,7 @@
android:hint=
"@string/must_info"
android:inputType=
"textNoSuggestions"
android:maxLines=
"1"
android:textSize=
"38px"
android:singleLine=
"true"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@android:color/holo_green_light"
/>
...
...
mobile/src/main/res/layout/item_server_info_swipe.xml
View file @
1e41fa51
...
...
@@ -68,6 +68,7 @@
android:singleLine=
"true"
android:textAppearance=
"@style/TextAppearance.AppCompat.Title"
android:textColor=
"@color/brightgreen"
android:textSize=
"50px"
tools:text=
"233正式服务器"
/>
</LinearLayout>
...
...
@@ -91,7 +92,8 @@
android:gravity=
"center_vertical"
android:text=
"@string/server_ip"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/item_title"
/>
android:textColor=
"@color/item_title"
android:textSize=
"38px"
/>
<TextView
android:id=
"@+id/text_ip"
...
...
@@ -101,6 +103,7 @@
android:singleLine=
"true"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/holo_blue_bright"
android:textSize=
"38px"
tools:text=
"127.0.0.1"
/>
</LinearLayout>
...
...
@@ -114,7 +117,8 @@
android:gravity=
"center_vertical"
android:text=
"@string/server_port"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/item_title"
/>
android:textColor=
"@color/item_title"
android:textSize=
"38px"
/>
<TextView
android:id=
"@+id/text_port"
...
...
@@ -125,6 +129,7 @@
android:singleLine=
"true"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/holo_blue_bright"
android:textSize=
"38px"
tools:text=
"233"
/>
</LinearLayout>
</LinearLayout>
...
...
@@ -142,6 +147,7 @@
android:gravity=
"center_vertical"
android:text=
"@string/server_user"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textSize=
"38px"
android:textColor=
"@color/item_title"
/>
<TextView
...
...
@@ -153,6 +159,7 @@
android:singleLine=
"true"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/holo_blue_bright"
android:textSize=
"38px"
tools:text=
"player"
/>
<ImageView
...
...
mobile/src/main/res/values-ko/strings.xml
View file @
1e41fa51
...
...
@@ -212,9 +212,9 @@
<string
name=
"category_name"
>
덱 카테고리
</string>
<string
name=
"save_quit"
>
저장하고 종료하십시오.
</string>
<string
name=
"tip_reset_game_res"
>
게임 리소스대이터 리셋 완료.
</string>
<string
name=
"join_helper_tip"
>
서버의 우선 순위를 위로 드래그하여 수정할 수 있습니다.
\n사용자 지역에 적합한 ping이 낮은 서버를 추가합니다.
\n아래의 버튼을 사용하여 "애플리케이션 관리"를 엽니다
<string
name=
"join_helper_tip
1
"
>
서버의 우선 순위를 위로 드래그하여 수정할 수 있습니다.
\n사용자 지역에 적합한 ping이 낮은 서버를 추가합니다.
</string>
<string
name=
"join_helper_tip2"
>
\n아래의 버튼을 사용하여 "애플리케이션 관리"를 엽니다
\n그후 YGOMobile의 다른앱 표시 권한이 혀용되어 있는지 확인하십시오.
</string>
<string
name=
"EXPAND_STATUS_BAR"
>
알림을 켜려면 알림 권한이 필요합니다.
\n기능을 제대로 사용하려면 알림 권한이 필요합니다.
</string>
...
...
mobile/src/main/res/values-zh/strings.xml
View file @
1e41fa51
...
...
@@ -214,9 +214,9 @@
<string
name=
"category_name"
>
卡组分类
</string>
<string
name=
"save_quit"
>
保存并退出
</string>
<string
name=
"tip_reset_game_res"
>
游戏数据检查完成
</string>
<string
name=
"join_helper_tip"
>
你可以把常约战的服务器拖到第一位
\n之后快捷加房时就会加入置顶的服务器
\n使用此功能须开启本软件悬浮窗
<string
name=
"join_helper_tip
1
"
>
你可以把常约战的服务器拖到第一位
\n之后快捷加房时就会加入置顶的服务器
</string>
<string
name=
"join_helper_tip2"
>
\n使用此功能须开启本软件悬浮窗
\n并确保本软件后台运行中
</string>
<string
name=
"EXPAND_STATUS_BAR"
>
需要开启通知权限\n开启权限才能正常使用决斗助手功能
</string>
<string
name=
"SYSTEM_ALERT_WINDOW"
>
需要开启悬浮窗权限\n开启权限才能正常使用决斗助手功能
</string>
...
...
mobile/src/main/res/values/strings.xml
View file @
1e41fa51
...
...
@@ -215,9 +215,9 @@
<string
name=
"category_name"
>
Deck Category
</string>
<string
name=
"save_quit"
>
Save and quit
</string>
<string
name=
"tip_reset_game_res"
>
Reset game resources completed
</string>
<string
name=
"join_helper_tip"
>
you can move your favourite sever on top
\nthen join helper will acquiescently start in it
\npls click to APP permission to find me and open the "Pop-ups"
<string
name=
"join_helper_tip
1
"
>
you can move your favourite sever on top
\nthen join helper will acquiescently start in it
</string>
<string
name=
"join_helper_tip2"
>
\npls click to APP permission to find me and open the "Pop-ups"
\nand keep the soft run in the background
</string>
<string
name=
"EXPAND_STATUS_BAR"
>
Apply expand status bar\n then DuelAssiatant will work normally
</string>
<string
name=
"SYSTEM_ALERT_WINDOW"
>
Apply Display over other APPs\n then DuelAssiatant will work normally
</string>
...
...
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