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
b6eabcb9
Commit
b6eabcb9
authored
Dec 28, 2019
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix重复生命周期
parent
ff1461de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
12 deletions
+2
-12
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
...c/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
+2
-12
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
View file @
b6eabcb9
...
@@ -667,6 +667,7 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
...
@@ -667,6 +667,7 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
dialog
.
dismiss
();
dialog
.
dismiss
();
});
});
dialog
.
setRightButtonListener
((
dlg
,
s
)
->
{
dialog
.
setRightButtonListener
((
dlg
,
s
)
->
{
dialog
.
dismiss
();
ServerListAdapter
mServerListAdapter
=
new
ServerListAdapter
(
this
);
ServerListAdapter
mServerListAdapter
=
new
ServerListAdapter
(
this
);
ServerListManager
mServerListManager
=
new
ServerListManager
(
this
,
mServerListAdapter
);
ServerListManager
mServerListManager
=
new
ServerListManager
(
this
,
mServerListAdapter
);
mServerListManager
.
syncLoadData
();
mServerListManager
.
syncLoadData
();
...
@@ -685,21 +686,10 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
...
@@ -685,21 +686,10 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
}).
done
((
list
)
->
{
}).
done
((
list
)
->
{
if
(
list
!=
null
)
{
if
(
list
!=
null
)
{
ServerInfo
serverInfo
=
list
.
getServerInfoList
().
get
(
0
);
ServerInfo
serverInfo
=
list
.
getServerInfoList
().
get
(
0
);
duelIntent
(
this
,
serverInfo
.
getServerAddr
(),
serverInfo
.
getPort
(),
serverInfo
.
getPlayerName
()
,
password
);
joinGame
(
serverInfo
,
password
);
}
}
});
});
});
});
}
}
//决斗跳转
public
static
void
duelIntent
(
Context
context
,
String
ip
,
int
dk
,
String
name
,
String
password
)
{
Intent
intent1
=
new
Intent
(
"ygomobile.intent.action.GAME"
);
intent1
.
putExtra
(
"host"
,
ip
);
intent1
.
putExtra
(
"port"
,
dk
);
intent1
.
putExtra
(
"user"
,
name
);
intent1
.
putExtra
(
"room"
,
password
);
intent1
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
context
.
startActivity
(
intent1
);
}
}
}
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