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
6acb5abe
Commit
6acb5abe
authored
May 24, 2018
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
识别剪贴板特定文字直接加房
parent
ea3a6777
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
21 deletions
+26
-21
mobile/build.gradle
mobile/build.gradle
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/home/ImageUpdater.java
...c/main/java/cn/garymb/ygomobile/ui/home/ImageUpdater.java
+1
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/plus/ServiceDuelAssistant.java
...ava/cn/garymb/ygomobile/ui/plus/ServiceDuelAssistant.java
+22
-7
mobile/src/main/res/layout/duel_assistant_service.xml
mobile/src/main/res/layout/duel_assistant_service.xml
+2
-13
No files found.
mobile/build.gradle
View file @
6acb5abe
...
@@ -8,7 +8,7 @@ android {
...
@@ -8,7 +8,7 @@ android {
applicationId
"cn.garymb.ygomobile"
applicationId
"cn.garymb.ygomobile"
minSdkVersion
16
minSdkVersion
16
targetSdkVersion
22
targetSdkVersion
22
versionCode
3201052
3
versionCode
3201052
4
versionName
"3.2.1"
versionName
"3.2.1"
flavorDimensions
"versionCode"
flavorDimensions
"versionCode"
vectorDrawables
.
useSupportLibrary
=
true
vectorDrawables
.
useSupportLibrary
=
true
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/home/ImageUpdater.java
View file @
6acb5abe
...
@@ -20,6 +20,7 @@ import java.util.zip.ZipFile;
...
@@ -20,6 +20,7 @@ import java.util.zip.ZipFile;
import
cn.garymb.ygomobile.AppsSettings
;
import
cn.garymb.ygomobile.AppsSettings
;
import
cn.garymb.ygomobile.Constants
;
import
cn.garymb.ygomobile.Constants
;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.loader.CardLoader
;
import
cn.garymb.ygomobile.loader.CardLoader
;
import
cn.garymb.ygomobile.ui.activities.BaseActivity
;
import
cn.garymb.ygomobile.ui.activities.BaseActivity
;
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/plus/ServiceDuelAssistant.java
View file @
6acb5abe
...
@@ -9,6 +9,13 @@ import android.widget.*;
...
@@ -9,6 +9,13 @@ import android.widget.*;
import
java.util.*
;
import
java.util.*
;
import
android.support.v7.widget.*
;
import
android.support.v7.widget.*
;
import
cn.garymb.ygodata.YGOGameOptions
;
import
cn.garymb.ygomobile.YGOStarter
;
import
cn.garymb.ygomobile.bean.ServerInfo
;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.ui.adapters.ServerListAdapter
;
public
class
ServiceDuelAssistant
extends
Service
public
class
ServiceDuelAssistant
extends
Service
{
{
private
LinearLayout
mFloatLayout
;
private
LinearLayout
mFloatLayout
;
...
@@ -87,20 +94,18 @@ public class ServiceDuelAssistant extends Service
...
@@ -87,20 +94,18 @@ public class ServiceDuelAssistant extends Service
@Override
@Override
public
void
run
()
{
public
void
run
()
{
// TODO Auto-generated method stub
if
(
isdis
)
{
if
(
isdis
)
{
isdis
=
false
;
isdis
=
false
;
mWindowManager
.
removeView
(
mFloatLayout
);
mWindowManager
.
removeView
(
mFloatLayout
);
}
}
}
}
},
2
000
);
},
3
000
);
ds_qx
.
setOnClickListener
(
new
OnClickListener
(){
ds_qx
.
setOnClickListener
(
new
OnClickListener
(){
@Override
@Override
public
void
onClick
(
View
p1
)
{
public
void
onClick
(
View
p1
)
{
disJoinDialog
();
disJoinDialog
();
// TODO: Implement this method
}
}
});
});
ds_join
.
setOnClickListener
(
new
OnClickListener
(){
ds_join
.
setOnClickListener
(
new
OnClickListener
(){
...
@@ -111,14 +116,24 @@ public class ServiceDuelAssistant extends Service
...
@@ -111,14 +116,24 @@ public class ServiceDuelAssistant extends Service
isdis
=
false
;
isdis
=
false
;
mWindowManager
.
removeView
(
mFloatLayout
);
mWindowManager
.
removeView
(
mFloatLayout
);
}
}
IntentUtil
.
duelIntent
(
ServiceDuelAssistant
.
this
,
SharedPreferenceUtil
.
getDuelIp
(),
SharedPreferenceUtil
.
getDuelPort
(),
SharedPreferenceUtil
.
getDuelName
(),
password
);
ServerInfo
serverInfo
=
new
ServerListAdapter
(
ServiceDuelAssistant
.
this
).
getItem
(
0
);
// TODO: Implement this method
duelIntent
(
ServiceDuelAssistant
.
this
,
serverInfo
.
getServerAddr
(),
serverInfo
.
getPort
(),
serverInfo
.
getPlayerName
(),
password
);
}
}
});
});
}
//决斗跳转
// TODO: Implement this method
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
.
setPackage
(
"cn.garymb.ygomobile"
);
intent1
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
context
.
startActivity
(
intent1
);
}
}
private
void
disJoinDialog
()
{
private
void
disJoinDialog
()
{
...
...
mobile/src/main/res/layout/duel_assistant_service.xml
View file @
6acb5abe
...
@@ -6,15 +6,6 @@
...
@@ -6,15 +6,6 @@
android:orientation=
"vertical"
android:orientation=
"vertical"
android:background=
"#00000000"
>
android:background=
"#00000000"
>
<android.support.v7.widget.CardView
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:cardCornerRadius=
"@dimen/dialog_corner_radius"
app:elevation=
"15dp"
app:cardBackgroundColor=
"@color/colorDialogBackground"
android:layout_margin=
"10dp"
>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -39,7 +30,7 @@
...
@@ -39,7 +30,7 @@
style=
"?android:attr/buttonBarButtonStyle"
style=
"?android:attr/buttonBarButtonStyle"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:text=
"
加入
"
android:text=
"
@string/join_game
"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:id=
"@+id/ds_join"
/>
android:id=
"@+id/ds_join"
/>
...
@@ -48,7 +39,7 @@
...
@@ -48,7 +39,7 @@
style=
"?android:attr/buttonBarButtonStyle"
style=
"?android:attr/buttonBarButtonStyle"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:text=
"
关闭
"
android:text=
"
@string/search_close
"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:id=
"@+id/ds_qx"
/>
android:id=
"@+id/ds_qx"
/>
...
@@ -56,7 +47,5 @@
...
@@ -56,7 +47,5 @@
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</LinearLayout>
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