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
b7547be8
Commit
b7547be8
authored
Jul 18, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
只在加入服务器时显示tips
parent
e581b132
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
mobile/src/main/java/cn/garymb/ygomobile/YGOStarter.java
mobile/src/main/java/cn/garymb/ygomobile/YGOStarter.java
+0
-6
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
...c/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
+10
-0
No files found.
mobile/src/main/java/cn/garymb/ygomobile/YGOStarter.java
View file @
b7547be8
...
...
@@ -158,12 +158,6 @@ public class YGOStarter {
//显示加载背景
showLoadingBg
(
activity
);
Log
.
e
(
"YGOStarter"
,
"设置背景后"
+
System
.
currentTimeMillis
());
/* if (!ComponentUtils.isActivityRunning(activity, new ComponentName(activity, YGOMobileActivity.class))) {
String[] tipsList = activity.getResources().getStringArray(R.array.tips);
int x = (int) (Math.random() * tipsList.length);
String tips = tipsList[x];
Toast.makeText(activity, tips, Toast.LENGTH_LONG).show();
}*/
}
Intent
intent
=
new
Intent
(
activity
,
YGOMobileActivity
.
class
);
if
(
options
!=
null
)
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
View file @
b7547be8
...
...
@@ -475,6 +475,7 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
}
void
joinGame
(
ServerInfo
serverInfo
,
String
name
)
{
showTipsToast
();
YGOGameOptions
options
=
new
YGOGameOptions
();
options
.
mServerAddr
=
serverInfo
.
getServerAddr
();
options
.
mUserName
=
serverInfo
.
getPlayerName
();
...
...
@@ -669,4 +670,13 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
return
;
CardDetailRandom
.
RandomCardDetail
(
this
,
cardInfo
);
}
public
void
showTipsToast
()
{
if
(!
ComponentUtils
.
isActivityRunning
(
this
,
new
ComponentName
(
this
,
YGOMobileActivity
.
class
)))
{
String
[]
tipsList
=
this
.
getResources
().
getStringArray
(
R
.
array
.
tips
);
int
x
=
(
int
)
(
Math
.
random
()
*
tipsList
.
length
);
String
tips
=
tipsList
[
x
];
Toast
.
makeText
(
this
,
tips
,
Toast
.
LENGTH_LONG
).
show
();
}
}
}
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