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
d98f7243
Commit
d98f7243
authored
Feb 26, 2019
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
6cdb6525
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
103 additions
and
17 deletions
+103
-17
mobile/assets/changelog.html
mobile/assets/changelog.html
+4
-8
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
...c/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
+13
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/widget/ShiningTextView.java
...n/java/cn/garymb/ygomobile/ui/widget/ShiningTextView.java
+56
-0
mobile/src/main/res/layout/activity_home.xml
mobile/src/main/res/layout/activity_home.xml
+30
-9
No files found.
mobile/assets/changelog.html
View file @
d98f7243
...
@@ -17,18 +17,14 @@
...
@@ -17,18 +17,14 @@
特别感谢: 菜菜,尸体,废话多,大毛,龙道香姐,晓L,幻兽L 的支持与努力.
特别感谢: 菜菜,尸体,废话多,大毛,龙道香姐,晓L,幻兽L 的支持与努力.
</pre>
</pre>
<ul>
<ul>
<li
style=
"color:#ffff00"
>
3.
3.12
</li>
<li
style=
"color:#ffff00"
>
3.
4.0
</li>
</ul>
</ul>
<pre>
<pre>
更新:
更新:
1.新卡1008(DANE);
1.更新ygo内核;
2.新卡20AC+DBIC+VJ;
修复:
修复:
1.墓地成为对象的卡不会翻开展示的问题;
1.后台mobile开启中点图标会重启的问题;
2.权限申请和复制贴图同时执行导致复制不全的问题;
3.已知卡图错误;
4.部分安卓9.0收不到更新推送的问题;
新增:
1.桌面图标长按增加快捷打开卡查和组卡;
</pre>
</pre>
</body>
</body>
</html>
</html>
\ No newline at end of file
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
View file @
d98f7243
...
@@ -64,6 +64,7 @@ import cn.garymb.ygomobile.ui.plus.DefaultOnBoomListener;
...
@@ -64,6 +64,7 @@ import cn.garymb.ygomobile.ui.plus.DefaultOnBoomListener;
import
cn.garymb.ygomobile.ui.plus.DialogPlus
;
import
cn.garymb.ygomobile.ui.plus.DialogPlus
;
import
cn.garymb.ygomobile.ui.plus.ServiceDuelAssistant
;
import
cn.garymb.ygomobile.ui.plus.ServiceDuelAssistant
;
import
cn.garymb.ygomobile.ui.preference.SettingsActivity
;
import
cn.garymb.ygomobile.ui.preference.SettingsActivity
;
import
cn.garymb.ygomobile.ui.widget.ShiningTextView
;
import
cn.garymb.ygomobile.utils.AlipayPayUtils
;
import
cn.garymb.ygomobile.utils.AlipayPayUtils
;
import
cn.garymb.ygomobile.utils.FileLogUtil
;
import
cn.garymb.ygomobile.utils.FileLogUtil
;
import
cn.garymb.ygomobile.utils.PermissionUtil
;
import
cn.garymb.ygomobile.utils.PermissionUtil
;
...
@@ -72,6 +73,8 @@ import cn.garymb.ygomobile.utils.ScreenUtil;
...
@@ -72,6 +73,8 @@ import cn.garymb.ygomobile.utils.ScreenUtil;
public
abstract
class
HomeActivity
extends
BaseActivity
implements
NavigationView
.
OnNavigationItemSelectedListener
{
public
abstract
class
HomeActivity
extends
BaseActivity
implements
NavigationView
.
OnNavigationItemSelectedListener
{
protected
SwipeMenuRecyclerView
mServerList
;
protected
SwipeMenuRecyclerView
mServerList
;
long
exitLasttime
=
0
;
long
exitLasttime
=
0
;
ShiningTextView
tv
;
Shimmer
shimmer
;
private
ServerListAdapter
mServerListAdapter
;
private
ServerListAdapter
mServerListAdapter
;
private
ServerListManager
mServerListManager
;
private
ServerListManager
mServerListManager
;
...
@@ -193,6 +196,7 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
...
@@ -193,6 +196,7 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
EventBus
.
getDefault
().
register
(
this
);
EventBus
.
getDefault
().
register
(
this
);
initBoomMenuButton
(
$
(
R
.
id
.
bmb
));
initBoomMenuButton
(
$
(
R
.
id
.
bmb
));
AnimationShake
();
AnimationShake
();
tv
=
(
ShiningTextView
)
findViewById
(
R
.
id
.
shimmer_tv
);
QbSdk
.
PreInitCallback
cb
=
new
QbSdk
.
PreInitCallback
()
{
QbSdk
.
PreInitCallback
cb
=
new
QbSdk
.
PreInitCallback
()
{
@Override
@Override
...
@@ -550,6 +554,15 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
...
@@ -550,6 +554,15 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
findViewById
(
R
.
id
.
cube
).
startAnimation
(
shake
);
//给组件播放动画效果
findViewById
(
R
.
id
.
cube
).
startAnimation
(
shake
);
//给组件播放动画效果
}
}
public
void
toggleAnimation
(
View
target
)
{
if
(
shimmer
!=
null
&&
shimmer
.
isAnimating
())
{
shimmer
.
cancel
();
}
else
{
shimmer
=
new
Shimmer
();
shimmer
.
start
(
tv
);
}
}
public
void
StartMycard
()
{
public
void
StartMycard
()
{
ImageView
iv_mc
=
$
(
R
.
id
.
btn_mycard
);
ImageView
iv_mc
=
$
(
R
.
id
.
btn_mycard
);
iv_mc
.
setOnClickListener
((
v
)
->
{
iv_mc
.
setOnClickListener
((
v
)
->
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/widget/ShiningTextView.java
0 → 100644
View file @
d98f7243
package
cn.garymb.ygomobile.ui.widget
;
import
android.content.Context
;
import
android.graphics.Canvas
;
import
android.graphics.LinearGradient
;
import
android.graphics.Matrix
;
import
android.graphics.Paint
;
import
android.graphics.Shader
;
import
android.support.v7.widget.AppCompatTextView
;
import
android.util.AttributeSet
;
public
class
ShiningTextView
extends
AppCompatTextView
{
private
LinearGradient
mLinearGradient
;
private
Matrix
mGradientMatrix
;
private
Paint
mPaint
;
private
int
mViewWidth
=
0
;
private
int
mTranslate
=
0
;
private
boolean
mAnimating
=
true
;
public
ShiningTextView
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
}
@Override
protected
void
onSizeChanged
(
int
w
,
int
h
,
int
oldw
,
int
oldh
)
{
super
.
onSizeChanged
(
w
,
h
,
oldw
,
oldh
);
if
(
mViewWidth
==
0
)
{
mViewWidth
=
getMeasuredWidth
();
if
(
mViewWidth
>
0
)
{
mPaint
=
getPaint
();
mLinearGradient
=
new
LinearGradient
(-
mViewWidth
,
0
,
0
,
0
,
new
int
[]{
0x33ffffff
,
0xffffffff
,
0x33ffffff
},
new
float
[]{
0
,
0.5f
,
1
},
Shader
.
TileMode
.
CLAMP
);
mPaint
.
setShader
(
mLinearGradient
);
mGradientMatrix
=
new
Matrix
();
}
}
}
@Override
protected
void
onDraw
(
Canvas
canvas
)
{
super
.
onDraw
(
canvas
);
if
(
mAnimating
&&
mGradientMatrix
!=
null
)
{
mTranslate
+=
mViewWidth
/
10
;
if
(
mTranslate
>
2
*
mViewWidth
)
{
mTranslate
=
-
mViewWidth
;
}
mGradientMatrix
.
setTranslate
(
mTranslate
,
0
);
mLinearGradient
.
setLocalMatrix
(
mGradientMatrix
);
postInvalidateDelayed
(
50
);
}
}
}
mobile/src/main/res/layout/activity_home.xml
View file @
d98f7243
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/bg3"
android:fitsSystemWindows=
"true"
android:fitsSystemWindows=
"true"
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
>
android:background=
"@drawable/bg3"
>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#80000000"
android:background=
"#80000000"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
></LinearLayout>
</LinearLayout>
<com.tubb.smrv.SwipeMenuRecyclerView
<com.tubb.smrv.SwipeMenuRecyclerView
android:id=
"@+id/list_server"
android:id=
"@+id/list_server"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:scrollbars=
"none"
/>
android:scrollbars=
"none"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -58,7 +56,7 @@
...
@@ -58,7 +56,7 @@
android:layout_height=
"20dp"
android:layout_height=
"20dp"
android:gravity=
"bottom|center_horizontal"
android:gravity=
"bottom|center_horizontal"
android:text=
"@string/Function_Menu"
android:text=
"@string/Function_Menu"
android:textSize=
"10sp"
/>
android:textSize=
"10sp"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
...
@@ -82,7 +80,30 @@
...
@@ -82,7 +80,30 @@
android:layout_height=
"20dp"
android:layout_height=
"20dp"
android:gravity=
"bottom|center_horizontal"
android:gravity=
"bottom|center_horizontal"
android:text=
"@string/mycard"
android:text=
"@string/mycard"
android:textSize=
"10sp"
/>
android:textSize=
"10sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_gravity=
"bottom"
android:orientation=
"vertical"
>
<Button
android:onClick=
"toggleAnimation"
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:layout_gravity=
"center"
android:background=
"@drawable/start"
/>
<cn.garymb.ygomobile.ui.widget.ShiningTextView
android:id=
"@+id/shimmer_tv"
android:layout_width=
"150dp"
android:layout_height=
"30dp"
android:text=
"点击返回决斗中"
android:textColor=
"#999"
android:textSize=
"20sp"
android:layout_gravity=
"center"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</FrameLayout>
</FrameLayout>
\ No newline at end of file
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