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
ca60633c
Commit
ca60633c
authored
Oct 25, 2019
by
kenan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dialog
parent
f3a145f3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
12 deletions
+19
-12
mobile/src/main/java/cn/garymb/ygomobile/ui/activities/LogoActivity.java
.../java/cn/garymb/ygomobile/ui/activities/LogoActivity.java
+6
-2
mobile/src/main/java/cn/garymb/ygomobile/utils/SystemUtils.java
.../src/main/java/cn/garymb/ygomobile/utils/SystemUtils.java
+11
-9
mobile/src/main/res/layout/dialog_plus_base.xml
mobile/src/main/res/layout/dialog_plus_base.xml
+2
-1
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/activities/LogoActivity.java
View file @
ca60633c
...
...
@@ -64,10 +64,15 @@ public class LogoActivity extends BaseActivity {
}
private
void
startLoad
()
{
if
(
ly_loading
.
getVisibility
()
==
View
.
VISIBLE
){
return
;
}
ly_loading
.
setVisibility
(
View
.
VISIBLE
);
int
vercode
=
SystemUtils
.
getVersion
(
this
);
boolean
isNewVersion
;
if
(
AppsSettings
.
get
().
getAppVersion
()
<
vercode
)
{
int
oldVer
=
AppsSettings
.
get
().
getAppVersion
();
Log
.
i
(
"ygomobile"
,
"check version old="
+
oldVer
+
", new="
+
vercode
);
if
(
oldVer
<
vercode
)
{
AppsSettings
.
get
().
setAppVersion
(
vercode
);
isNewVersion
=
true
;
}
else
{
...
...
@@ -75,7 +80,6 @@ public class LogoActivity extends BaseActivity {
}
ResCheckTask
resCheckTask
=
new
ResCheckTask
(
this
,
isNewVersion
,
1000
);
number_progress_bar
.
setMax
(
100
);
long
time
=
System
.
currentTimeMillis
();
VUiKit
.
defer
()
.
when
(
resCheckTask
)
.
progress
((
str
)
->
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/utils/SystemUtils.java
View file @
ca60633c
...
...
@@ -9,6 +9,8 @@ import android.view.Display;
import
java.lang.reflect.Method
;
import
cn.garymb.ygomobile.lite.BuildConfig
;
public
class
SystemUtils
{
public
static
String
getVersionName
(
Context
context
)
{
PackageInfo
packageInfo
=
null
;
...
...
@@ -23,15 +25,15 @@ public class SystemUtils {
}
public
static
int
getVersion
(
Context
context
)
{
PackageInfo
packageInfo
=
null
;
try
{
packageInfo
=
context
.
getPackageManager
().
getPackageInfo
(
context
.
getPackageName
(),
0
);
}
catch
(
PackageManager
.
NameNotFoundException
e
)
{
}
if
(
packageInfo
!=
null
)
{
return
packageInfo
.
versionCode
;
}
return
0
;
//
PackageInfo packageInfo = null;
//
try {
//
packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
//
} catch (PackageManager.NameNotFoundException e) {
//
}
//
if (packageInfo != null) {
//
return packageInfo.versionCode;
//
}
return
BuildConfig
.
VERSION_CODE
;
}
public
static
DisplayMetrics
getHasVirtualDisplayMetrics
(
Activity
context
)
{
...
...
mobile/src/main/res/layout/dialog_plus_base.xml
View file @
ca60633c
...
...
@@ -43,7 +43,8 @@
<LinearLayout
android:id=
"@+id/container"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:layout_gravity=
"center_horizontal|center_vertical"
android:layout_marginBottom=
"5dp"
android:minWidth=
"200dp"
...
...
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