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
81cfacc8
Commit
81cfacc8
authored
May 17, 2018
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整理
parent
10b07aa3
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21 additions
and
38 deletions
+21
-38
mobile/src/main/res/values-ko/strings.xml
mobile/src/main/res/values-ko/strings.xml
+2
-0
mobile/src/main/res/values-zh/strings.xml
mobile/src/main/res/values-zh/strings.xml
+3
-0
mobile/src/main/res/values/strings.xml
mobile/src/main/res/values/strings.xml
+2
-0
mobile/src/mycard/java/cn/garymb/ygomobile/ui/online/mcchat/ChatApplication.java
...cn/garymb/ygomobile/ui/online/mcchat/ChatApplication.java
+0
-22
mobile/src/mycard/java/cn/garymb/ygomobile/ui/online/mcchat/McchatActivity.java
.../cn/garymb/ygomobile/ui/online/mcchat/McchatActivity.java
+3
-2
mobile/src/mycard/java/cn/garymb/ygomobile/ui/online/mcchat/SplashActivity.java
.../cn/garymb/ygomobile/ui/online/mcchat/SplashActivity.java
+5
-7
mobile/src/mycard/java/cn/garymb/ygomobile/ui/online/mcchat/adapter/ChatAdapter.java
...arymb/ygomobile/ui/online/mcchat/adapter/ChatAdapter.java
+2
-2
mobile/src/mycard/java/cn/garymb/ygomobile/ui/online/mcchat/util/Util.java
.../java/cn/garymb/ygomobile/ui/online/mcchat/util/Util.java
+4
-5
No files found.
mobile/src/main/res/values-ko/strings.xml
View file @
81cfacc8
...
...
@@ -183,6 +183,8 @@
<string
name=
"noting_to_send"
>
发送内容不能为空
</string>
<string
name=
"sending_failed"
>
发送失败
</string>
<string
name=
"logining_in"
>
로그인 중
</string>
<string
name=
"logining_failed"
>
Logining failed,please try again
</string>
<string
name=
"failed_reason"
>
Logining failed because of
</string>
<string
name=
"send"
>
보내기
</string>
<string
name=
"bbs"
>
커뮤니티
</string>
<string
name=
"settings_pref_settings_only_game"
>
앱 실행시 YGOCORE 바로 실행(설정하지마십시오)
</string>
...
...
mobile/src/main/res/values-zh/strings.xml
View file @
81cfacc8
...
...
@@ -180,6 +180,9 @@
<string
name=
"mc_chat"
>
聊天室
</string>
<string
name=
"noting_to_send"
>
发送内容不能为空
</string>
<string
name=
"sending_failed"
>
发送失败
</string>
<string
name=
"logining_in"
>
登录中,请稍候...
</string>
<string
name=
"logining_failed"
>
登陆失败,请点击重试
</string>
<string
name=
"failed_reason"
>
登录失败,原因是
</string>
<string
name=
"send"
>
发送
</string>
<string
name=
"mc_home"
>
大厅
</string>
<string
name=
"bbs"
>
社区
</string>
...
...
mobile/src/main/res/values/strings.xml
View file @
81cfacc8
...
...
@@ -184,6 +184,8 @@
<string
name=
"noting_to_send"
>
noting to send
</string>
<string
name=
"sending_failed"
>
sending failed
</string>
<string
name=
"logining_in"
>
Logining in
</string>
<string
name=
"logining_failed"
>
Logining failed,please try again
</string>
<string
name=
"failed_reason"
>
Logining failed because of
</string>
<string
name=
"send"
>
Send
</string>
<string
name=
"bbs"
>
Community
</string>
<string
name=
"settings_pref_settings_only_game"
>
Only start game
</string>
...
...
mobile/src/mycard/java/cn/garymb/ygomobile/ui/online/mcchat/ChatApplication.java
deleted
100644 → 0
View file @
10b07aa3
package
cn.garymb.ygomobile.ui.online.mcchat
;
import
android.app.*
;
import
android.content.*
;
public
class
ChatApplication
extends
Application
{
private
static
Context
context
;
@Override
public
void
onCreate
()
{
// TODO: Implement this method
super
.
onCreate
();
context
=
getApplicationContext
();
}
public
static
Context
getContext
(){
return
context
;
}
}
mobile/src/mycard/java/cn/garymb/ygomobile/ui/online/mcchat/McchatActivity.java
View file @
81cfacc8
package
cn.garymb.ygomobile.ui.online.mcchat
;
import
android.app.*
;
import
android.content.Context
;
import
android.os.*
;
import
org.jivesoftware.smack.packet.Message
;
...
...
@@ -108,14 +109,14 @@ public class McchatActivity extends Activity implements ChatListener
{
String
message
=
main_send_message
.
getText
().
toString
().
trim
();
if
(
message
.
equals
(
""
)){
Util
.
show
(
getString
(
R
.
string
.
noting_to_send
));
Util
.
show
(
McchatActivity
.
this
,
getString
(
R
.
string
.
noting_to_send
));
}
else
{
try
{
su
.
sendMessage
(
message
);
main_send_message
.
setText
(
""
);
}
catch
(
Exception
e
){
Util
.
show
(
getString
(
R
.
string
.
sending_failed
));
Util
.
show
(
McchatActivity
.
this
,
getString
(
R
.
string
.
sending_failed
));
}
}
// TODO: Implement this method
...
...
mobile/src/mycard/java/cn/garymb/ygomobile/ui/online/mcchat/SplashActivity.java
View file @
81cfacc8
...
...
@@ -2,7 +2,6 @@ package cn.garymb.ygomobile.ui.online.mcchat;
import
android.app.*
;
import
android.os.*
;
import
android.content.*
;
import
android.util.*
;
import
android.widget.*
;
import
android.view.*
;
import
android.view.View.*
;
...
...
@@ -108,7 +107,6 @@ public class SplashActivity extends Activity
{
su
.
login
(
name
,
password
);
}
catch
(
Exception
e
){
Log
.
e
(
"登录失败"
,
"登录失败"
+
e
);
Message
me
=
new
Message
();
me
.
obj
=
e
;
me
.
what
=
0
;
...
...
@@ -132,8 +130,8 @@ public class SplashActivity extends Activity
case
0
:
su
.
setIsConnected
(
false
);
sp_jz
.
setVisibility
(
View
.
GONE
);
sp_tv
.
setText
(
"登录失败,点击重新登录"
);
Util
.
show
(
"登录失败,原因为"
+
msg
.
obj
);
sp_tv
.
setText
(
getString
(
R
.
string
.
logining_failed
)
);
Util
.
show
(
SplashActivity
.
this
,
getString
(
R
.
string
.
failed_reason
)
+
msg
.
obj
);
break
;
case
1
:
startActivity
(
new
Intent
(
SplashActivity
.
this
,
McchatActivity
.
class
));
...
...
@@ -142,15 +140,15 @@ public class SplashActivity extends Activity
case
2
:
su
.
setIsListener
(
false
);
sp_jz
.
setVisibility
(
View
.
GONE
);
sp_tv
.
setText
(
"加入聊天室失败,点击重新加入"
);
sp_tv
.
setText
(
getString
(
R
.
string
.
logining_failed
)
);
break
;
case
3
:
sp_jz
.
setVisibility
(
View
.
VISIBLE
);
sp_tv
.
setText
(
"正在加入聊天室,请稍等"
);
sp_tv
.
setText
(
getString
(
R
.
string
.
logining_in
)
);
break
;
case
4
:
sp_jz
.
setVisibility
(
View
.
VISIBLE
);
sp_tv
.
setText
(
"登录中,请稍等"
);
sp_tv
.
setText
(
getString
(
R
.
string
.
logining_in
)
);
break
;
case
5
:
/*sp_jz.setVisibility(View.GONE);
...
...
mobile/src/mycard/java/cn/garymb/ygomobile/ui/online/mcchat/adapter/ChatAdapter.java
View file @
81cfacc8
...
...
@@ -74,8 +74,8 @@ public class ChatAdapter extends RecyclerView.Adapter<ChatAdapter.ViewHolder> {
@Override
public
boolean
onLongClick
(
View
p1
)
{
Util
.
fzMessage
(
cm
.
getMessage
());
Util
.
show
(
"已复制到剪贴板"
);
Util
.
fzMessage
(
c
ontext
,
c
m
.
getMessage
());
Util
.
show
(
context
,
"已复制到剪贴板"
);
// TODO: Implement this method
return
true
;
}
...
...
mobile/src/mycard/java/cn/garymb/ygomobile/ui/online/mcchat/util/Util.java
View file @
81cfacc8
...
...
@@ -3,13 +3,12 @@ import android.app.*;
import
android.content.*
;
import
android.view.inputmethod.*
;
import
android.widget.*
;
import
cn.garymb.ygomobile.ui.online.mcchat.*
;
public
class
Util
{
//提示
public
static
void
show
(
String
message
){
Toast
.
makeText
(
ChatApplication
.
getContext
()
,
message
,
Toast
.
LENGTH_SHORT
).
show
();
public
static
void
show
(
Context
context
,
String
message
){
Toast
.
makeText
(
context
,
message
,
Toast
.
LENGTH_SHORT
).
show
();
}
//关闭输入法
public
static
void
closeKeyboard
(
Activity
activity
){
...
...
@@ -21,8 +20,8 @@ public class Util
//复制字符串到剪贴板
public
static
void
fzMessage
(
String
message
){
ClipboardManager
cmb
=
(
ClipboardManager
)
ChatApplication
.
getContext
().
getSystemService
(
ChatApplication
.
getContext
()
.
CLIPBOARD_SERVICE
);
public
static
void
fzMessage
(
Context
context
,
String
message
){
ClipboardManager
cmb
=
(
ClipboardManager
)
context
.
getSystemService
(
context
.
CLIPBOARD_SERVICE
);
cmb
.
setText
(
message
);
//复制命令
}
...
...
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