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
57ed30ec
Commit
57ed30ec
authored
Dec 05, 2019
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add dialog_upgrade.xml
封装initBugly
parent
99da0806
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
8 deletions
+81
-8
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
...c/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
+12
-8
mobile/src/main/res/layout/dialog_upgrade.xml
mobile/src/main/res/layout/dialog_upgrade.xml
+69
-0
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
View file @
57ed30ec
...
...
@@ -124,14 +124,7 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
//trpay
TrPay
.
getInstance
(
HomeActivity
.
this
).
initPaySdk
(
"e1014da420ea4405898c01273d6731b6"
,
"YGOMobile"
);
//初始化bugly
ApplicationInfo
appInfo
=
null
;
try
{
appInfo
=
this
.
getPackageManager
().
getApplicationInfo
(
getPackageName
(),
PackageManager
.
GET_META_DATA
);
}
catch
(
PackageManager
.
NameNotFoundException
e
)
{
e
.
printStackTrace
();
}
String
msg
=
appInfo
.
metaData
.
getString
(
"BUGLY_APPID"
);
Bugly
.
init
(
this
,
msg
,
true
);
initBugly
();
//check update
Beta
.
checkUpgrade
(
false
,
false
);
//ServiceDuelAssistant
...
...
@@ -500,6 +493,17 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
}
}
public
void
initBugly
(){
ApplicationInfo
appInfo
=
null
;
try
{
appInfo
=
this
.
getPackageManager
().
getApplicationInfo
(
getPackageName
(),
PackageManager
.
GET_META_DATA
);
}
catch
(
PackageManager
.
NameNotFoundException
e
)
{
e
.
printStackTrace
();
}
String
msg
=
appInfo
.
metaData
.
getString
(
"BUGLY_APPID"
);
Bugly
.
init
(
this
,
msg
,
true
);
}
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
));
...
...
mobile/src/main/res/layout/dialog_upgrade.xml
0 → 100644
View file @
57ed30ec
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/tr_transparent_background"
>
<RelativeLayout
android:layout_width=
"350dp"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:layout_gravity=
"center"
android:background=
"@drawable/window"
>
<TextView
android:id=
"@+id/tv_title"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"Title"
android:textColor=
"@color/gold"
android:textSize=
"20dp"
android:tag=
"beta_title"
/>
<ImageView
android:id=
"@+id/iv_upgrade_banner"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tv_title"
android:tag=
"beta_upgrade_banner"
/>
<TextView
android:id=
"@+id/tv_upgrade_feature"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingStart=
"5dp"
android:paddingLeft=
"5dp"
android:paddingRight=
"5dp"
android:paddingBottom=
"5dp"
android:text=
"Title"
android:textColor=
"@color/white"
android:textSize=
"15dp"
android:layout_below=
"@id/tv_title"
android:tag=
"beta_upgrade_feature"
/>
<Button
android:id=
"@+id/tv_upgrade_confirm"
android:layout_width=
"match_parent"
android:layout_height=
"45dp"
android:background=
"@drawable/button_n"
android:layout_below=
"@id/tv_upgrade_feature"
android:gravity=
"center"
android:text=
"@string/Download"
android:textColor=
"@color/white"
android:textStyle=
"bold"
android:textSize=
"15dp"
android:visibility=
"visible"
android:tag=
"beta_confirm_button"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:tag=
"beta_upgrade_info"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:tag=
"beta_cancel_button"
/>
</RelativeLayout>
</RelativeLayout>
\ 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