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
94a8f8cc
Commit
94a8f8cc
authored
May 27, 2018
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化提醒动画UI&修复删除房间对话框无法取消
parent
7221007d
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
105 additions
and
45 deletions
+105
-45
mobile/assets/serverlist.xml
mobile/assets/serverlist.xml
+2
-2
mobile/build.gradle
mobile/build.gradle
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/adapters/ServerListAdapter.java
...va/cn/garymb/ygomobile/ui/adapters/ServerListAdapter.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/BaseCardsAcitivity.java
...java/cn/garymb/ygomobile/ui/cards/BaseCardsAcitivity.java
+8
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
...c/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
+30
-18
mobile/src/main/res/anim/cycle.xml
mobile/src/main/res/anim/cycle.xml
+3
-0
mobile/src/main/res/anim/shake.xml
mobile/src/main/res/anim/shake.xml
+6
-0
mobile/src/main/res/drawable-xhdpi/cube.png
mobile/src/main/res/drawable-xhdpi/cube.png
+0
-0
mobile/src/main/res/drawable-xhdpi/cube2.png
mobile/src/main/res/drawable-xhdpi/cube2.png
+0
-0
mobile/src/main/res/drawable-xhdpi/joinqqgroup.png
mobile/src/main/res/drawable-xhdpi/joinqqgroup.png
+0
-0
mobile/src/main/res/layout/activity_deck_cards.xml
mobile/src/main/res/layout/activity_deck_cards.xml
+13
-5
mobile/src/main/res/layout/activity_home.xml
mobile/src/main/res/layout/activity_home.xml
+41
-17
mobile/src/main/res/values/dimens.xml
mobile/src/main/res/values/dimens.xml
+0
-1
No files found.
mobile/assets/serverlist.xml
View file @
94a8f8cc
...
...
@@ -16,13 +16,13 @@
<port>
233
</port>
<keep>
true
</keep>
</server>
<server>
<
!--
server>
<player-name>fresh chicken</player-name>
<name>233在线人机练习</name>
<ip>s1.ygo233.com</ip>
<port>9999</port>
<keep>true</keep>
</server>
</server
--
>
<server>
<player-name>
Knight of Hanoi
</player-name>
<name>
阔以Shi正式卡服
</name>
...
...
mobile/build.gradle
View file @
94a8f8cc
...
...
@@ -8,7 +8,7 @@ android {
applicationId
"cn.garymb.ygomobile"
minSdkVersion
16
targetSdkVersion
22
versionCode
3201052
5
versionCode
3201052
7
versionName
"3.2.1"
flavorDimensions
"versionCode"
vectorDrawables
.
useSupportLibrary
=
true
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/adapters/ServerListAdapter.java
View file @
94a8f8cc
...
...
@@ -39,7 +39,7 @@ public class ServerListAdapter extends BaseRecyclerAdapterPlus<ServerInfo, Serve
builder
.
setLeftButtonListener
((
dlg
,
s
)
->
{
getContext
().
startActivity
(
new
Intent
(
Settings
.
ACTION_MANAGE_OVERLAY_PERMISSION
));
dlg
.
dismiss
();
});
});
builder
.
show
();
});
if
(
position
==
0
){
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/BaseCardsAcitivity.java
View file @
94a8f8cc
...
...
@@ -8,6 +8,8 @@ import android.support.v7.widget.RecyclerView;
import
android.support.v7.widget.RecyclerViewItemListener
;
import
android.view.Gravity
;
import
android.view.View
;
import
android.view.animation.Animation
;
import
android.view.animation.AnimationUtils
;
import
com.bumptech.glide.Glide
;
...
...
@@ -39,6 +41,7 @@ public abstract class BaseCardsAcitivity extends BaseActivity implements CardLoa
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_deck_cards
);
AnimationShake2
();
mImageLoader
=
ImageLoader
.
get
(
this
);
mDrawerlayout
=
$
(
R
.
id
.
drawer_layout
);
...
...
@@ -137,6 +140,11 @@ public abstract class BaseCardsAcitivity extends BaseActivity implements CardLoa
}
public
void
AnimationShake2
(){
Animation
shake
=
AnimationUtils
.
loadAnimation
(
this
,
R
.
anim
.
shake
);
//加载动画资源文件
findViewById
(
R
.
id
.
cube2
).
startAnimation
(
shake
);
//给组件播放动画效果
}
protected
void
hideDrawers
()
{
if
(
mDrawerlayout
.
isDrawerOpen
(
Gravity
.
RIGHT
))
{
mDrawerlayout
.
closeDrawer
(
Gravity
.
RIGHT
);
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
View file @
94a8f8cc
...
...
@@ -5,6 +5,7 @@ import android.animation.ObjectAnimator;
import
android.animation.PropertyValuesHolder
;
import
android.content.Intent
;
import
android.graphics.Color
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.Nullable
;
...
...
@@ -17,6 +18,8 @@ import android.view.Gravity;
import
android.view.Menu
;
import
android.view.MenuItem
;
import
android.view.View
;
import
android.view.animation.Animation
;
import
android.view.animation.AnimationUtils
;
import
android.view.inputmethod.EditorInfo
;
import
android.widget.Button
;
import
android.widget.EditText
;
...
...
@@ -61,6 +64,8 @@ abstract class HomeActivity extends BaseActivity implements NavigationView.OnNav
private
ServerListAdapter
mServerListAdapter
;
private
ServerListManager
mServerListManager
;
Button
JoinQQGroup
;
@Override
...
...
@@ -83,15 +88,14 @@ abstract class HomeActivity extends BaseActivity implements NavigationView.OnNav
//event
EventBus
.
getDefault
().
register
(
this
);
initBoomMenuButton
(
$
(
R
.
id
.
bmb
));
AnimationShake
();
//trpay
TrPay
.
getInstance
(
HomeActivity
.
this
).
initPaySdk
(
"e1014da420ea4405898c01273d6731b6"
,
"YGOMobile"
);
//autoupadte checking
checkForceUpdateSilent
();
//ServiceDuelAssistant
startService
(
new
Intent
(
this
,
ServiceDuelAssistant
.
class
));
//shake cube
ObjectAnimator
shake
=
shake
(
$
(
R
.
id
.
cube
));
shake
.
start
();
BtnJoinQQGroup
();
}
@Override
...
...
@@ -112,7 +116,7 @@ abstract class HomeActivity extends BaseActivity implements NavigationView.OnNav
mServerListAdapter
.
notifyDataSetChanged
();
dialog
.
dismiss
();
});
dialogPlus
.
setCancelable
(
fals
e
);
dialogPlus
.
setCancelable
(
tru
e
);
dialogPlus
.
setOnCloseLinster
(
null
);
dialogPlus
.
show
();
}
else
if
(
event
.
join
)
{
...
...
@@ -375,20 +379,28 @@ abstract class HomeActivity extends BaseActivity implements NavigationView.OnNav
UpdateHelper
.
getInstance
().
autoUpdate
(
getPackageName
(),
false
,
intervalMillis
);
}
private
static
ObjectAnimator
shake
(
View
view
)
{
// 8dp 左右抖动的幅度
int
delta
=
view
.
getResources
().
getDimensionPixelOffset
(
R
.
dimen
.
spacing_medium
);
PropertyValuesHolder
pvhTranslateY
=
PropertyValuesHolder
.
ofKeyframe
(
View
.
TRANSLATION_Y
,
Keyframe
.
ofFloat
(
0
f
,
0
),
Keyframe
.
ofFloat
(.
10
f
,
-
delta
),
Keyframe
.
ofFloat
(.
26
f
,
delta
),
Keyframe
.
ofFloat
(.
42
f
,
-
delta
),
Keyframe
.
ofFloat
(.
58
f
,
delta
),
Keyframe
.
ofFloat
(.
74
f
,
-
delta
),
Keyframe
.
ofFloat
(.
90
f
,
delta
),
Keyframe
.
ofFloat
(
1
f
,
0
f
)
);
return
ObjectAnimator
.
ofPropertyValuesHolder
(
view
,
pvhTranslateY
).
setDuration
(
500
);
public
void
AnimationShake
(){
Animation
shake
=
AnimationUtils
.
loadAnimation
(
this
,
R
.
anim
.
shake
);
//加载动画资源文件
findViewById
(
R
.
id
.
cube
).
startAnimation
(
shake
);
//给组件播放动画效果
}
public
void
BtnJoinQQGroup
()
{
$
(
R
.
id
.
btn_join_qq_group
).
setOnClickListener
((
v
)
->
{
String
key
=
"dRkD2L9QgYiYmQoqJUgkR4QUth9UhuT4"
;
joinQQGroup
(
key
);
});
}
public
boolean
joinQQGroup
(
String
key
)
{
//
Intent
intent
=
new
Intent
();
intent
.
setData
(
Uri
.
parse
(
"mqqopensdkapi://bizAgent/qm/qr?url=http%3A%2F%2Fqm.qq.com%2Fcgi-bin%2Fqm%2Fqr%3Ffrom%3Dapp%26p%3Dandroid%26k%3D"
+
key
));
// 此Flag可根据具体产品需要自定义,如设置,则在加群界面按返回,返回手Q主界面,不设置,按返回会返回到呼起产品界面 //intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
try
{
startActivity
(
intent
);
return
true
;
}
catch
(
Exception
e
)
{
// 未安装手Q或安装的版本不支持
return
false
;
}
}
}
mobile/src/main/res/anim/cycle.xml
0 → 100644
View file @
94a8f8cc
<?xml version="1.0" encoding="utf-8"?>
<cycleInterpolator
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:cycles=
"50"
/>
mobile/src/main/res/anim/shake.xml
0 → 100644
View file @
94a8f8cc
<?xml version="1.0" encoding="utf-8"?>
<translate
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:fromYDelta=
"0"
android:toYDelta=
"10"
android:duration=
"30000"
android:interpolator=
"@anim/cycle"
/>
\ No newline at end of file
mobile/src/main/res/drawable-xhdpi/cube.png
View replaced file @
7221007d
View file @
94a8f8cc
8.77 KB
|
W:
|
H:
10.5 KB
|
W:
|
H:
2-up
Swipe
Onion skin
mobile/src/main/res/drawable-xhdpi/cube2.png
View replaced file @
7221007d
View file @
94a8f8cc
8.92 KB
|
W:
|
H:
8.42 KB
|
W:
|
H:
2-up
Swipe
Onion skin
mobile/src/main/res/drawable-xhdpi/joinqqgroup.png
0 → 100644
View file @
94a8f8cc
10.2 KB
mobile/src/main/res/layout/activity_deck_cards.xml
View file @
94a8f8cc
...
...
@@ -13,6 +13,13 @@
android:background=
"@drawable/bg3"
tools:openDrawer=
"left"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#80000000"
android:orientation=
"vertical"
>
</LinearLayout>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
...
...
@@ -64,20 +71,21 @@
<com.nightonke.boommenu.BoomMenuButton
android:id=
"@+id/bmb"
android:layout_width=
"60dp"
android:layout_height=
"
60
dp"
android:layout_height=
"
48
dp"
android:layout_gravity=
"center_vertical"
android:background=
"@drawable/buttonfunction"
app:bmb_buttonEnum=
"textOutsideCircle"
app:bmb_buttonPlaceEnum=
"buttonPlace_sc_9_1"
app:bmb_dimColor=
"#
9
0000000"
app:bmb_dimColor=
"#
8
0000000"
app:bmb_normalColor=
"@android:color/transparent"
app:bmb_piecePlaceEnum=
"piecePlace_dot_9_1"
>
<ImageView
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:id=
"@+id/cube2"
android:layout_width=
"35dp"
android:layout_height=
"35dp"
android:layout_gravity=
"center"
app:srcCompat=
"@drawable/
bottom_1"
/>
app:srcCompat=
"@drawable/
cube"
/>
</com.nightonke.boommenu.BoomMenuButton>
</LinearLayout>
</FrameLayout>
...
...
mobile/src/main/res/layout/activity_home.xml
View file @
94a8f8cc
...
...
@@ -8,31 +8,55 @@
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
android:background=
"@drawable/bg3"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#80000000"
android:orientation=
"vertical"
>
</LinearLayout>
<com.tubb.smrv.SwipeMenuRecyclerView
android:id=
"@+id/list_server"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:scrollbars=
"none"
/>
<com.nightonke.boommenu.BoomMenuButton
android:id=
"@+id/bmb"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom|left"
android:layout_marginBottom=
"10dp"
android:layout_marginLeft=
"10dp"
android:background=
"@drawable/buttonfunction"
app:bmb_buttonEnum=
"textOutsideCircle"
app:bmb_buttonPlaceEnum=
"buttonPlace_sc_9_1"
app:bmb_dimColor=
"#90000000"
app:bmb_normalColor=
"@android:color/transparent"
app:bmb_piecePlaceEnum=
"piecePlace_dot_9_1"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"70dp"
android:layout_gravity=
"bottom"
android:orientation=
"horizontal"
android:weightSum=
"1"
>
<com.nightonke.boommenu.BoomMenuButton
android:id=
"@+id/bmb"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom|left"
android:background=
"@drawable/buttonfunction"
app:bmb_buttonEnum=
"textOutsideCircle"
app:bmb_buttonPlaceEnum=
"buttonPlace_sc_9_1"
app:bmb_dimColor=
"#80000000"
app:bmb_normalColor=
"@android:color/transparent"
app:bmb_piecePlaceEnum=
"piecePlace_dot_9_1"
>
<ImageView
android:id=
"@+id/cube"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_gravity=
"center"
app:srcCompat=
"@drawable/cube"
/>
</com.nightonke.boommenu.BoomMenuButton>
<ImageView
android:id=
"@+id/
cube
"
android:id=
"@+id/
btn_join_qq_group
"
android:layout_width=
"50dp"
android:layout_height=
"50dp"
android:layout_gravity=
"center"
app:srcCompat=
"@drawable/cube"
/>
</com.nightonke.boommenu.BoomMenuButton>
android:layout_marginLeft=
"2dp"
android:layout_marginRight=
"2dp"
android:layout_gravity=
"bottom"
android:src=
"@drawable/joinqqgroup"
/>
</LinearLayout>
</FrameLayout>
\ No newline at end of file
mobile/src/main/res/values/dimens.xml
View file @
94a8f8cc
...
...
@@ -49,5 +49,4 @@
<dimen
name=
"brower_arrow_height"
>
150dp
</dimen>
<dimen
name=
"menu_text_size"
>
6dp
</dimen>
<dimen
name=
"menu_text_top"
>
-5dp
</dimen>
<dimen
name=
"spacing_medium"
>
1dp
</dimen>
</resources>
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