Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flutter_boost_1.22.4
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
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
谢冠章
flutter_boost_1.22.4
Commits
2bb3e0ee
Commit
2bb3e0ee
authored
Jan 18, 2021
by
李增强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
useAndroidX
parent
7a28edc0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
22 deletions
+25
-22
android/src/main/java/com/idlefish/flutterboost/containers/BoostFlutterActivity.java
...dlefish/flutterboost/containers/BoostFlutterActivity.java
+11
-18
example/android/build.gradle
example/android/build.gradle
+14
-4
No files found.
android/src/main/java/com/idlefish/flutterboost/containers/BoostFlutterActivity.java
View file @
2bb3e0ee
package
com.idlefish.flutterboost.containers
;
import
android.app.Activity
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.lifecycle.Lifecycle
;
import
androidx.lifecycle.LifecycleOwner
;
import
androidx.lifecycle.LifecycleRegistry
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.pm.ActivityInfo
;
...
...
@@ -15,10 +19,9 @@ import android.graphics.drawable.ColorDrawable;
import
android.graphics.drawable.Drawable
;
import
android.os.Build
;
import
android.os.Bundle
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
android.view.*
;
import
android.widget.*
;
import
com.idlefish.flutterboost.FlutterBoost
;
import
com.idlefish.flutterboost.interfaces.IFlutterViewContainer
;
...
...
@@ -34,7 +37,7 @@ import java.io.Serializable;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
BoostFlutterActivity
extends
Activity
public
class
BoostFlutterActivity
extends
A
ppCompatA
ctivity
implements
FlutterActivityAndFragmentDelegate
.
Host
,
LifecycleOwner
{
...
...
@@ -131,9 +134,10 @@ public class BoostFlutterActivity extends Activity
lifecycle
=
new
LifecycleRegistry
(
this
);
}
public
IFlutterViewContainer
getIFlutterViewContainer
(){
public
IFlutterViewContainer
getIFlutterViewContainer
()
{
return
delegate
;
}
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
switchLaunchThemeForNormalTheme
();
...
...
@@ -290,6 +294,7 @@ public class BoostFlutterActivity extends Activity
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
data
)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
delegate
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
}
...
...
@@ -341,22 +346,10 @@ public class BoostFlutterActivity extends Activity
*/
@Override
@NonNull
public
Activity
getActivity
()
{
public
A
ppCompatA
ctivity
getActivity
()
{
return
this
;
}
/**
* {@link FlutterActivityAndFragmentDelegate.Host} method that is used by
* {@link FlutterActivityAndFragmentDelegate} to obtain a {@code Lifecycle} reference as
* needed. This reference is used by the delegate to provide Flutter plugins with access
* to lifecycle events.
*/
@Override
@NonNull
public
Lifecycle
getLifecycle
()
{
return
lifecycle
;
}
/**
* {@link FlutterActivityAndFragmentDelegate.Host} method that is used by
* {@link FlutterActivityAndFragmentDelegate} to obtain Flutter shell arguments when
...
...
example/android/build.gradle
View file @
2bb3e0ee
buildscript
{
repositories
{
google
()
jcenter
()
maven
{
url
'https://maven.aliyun.com/repository/google'
}
maven
{
url
'http://maven.aliyun.com/repository/gradle-plugin'
}
maven
{
url
'https://maven.aliyun.com/repository/public'
}
maven
{
url
'https://maven.aliyun.com/repository/jcenter'
}
maven
{
url
'http://maven.aliyun.com/nexus/content/groups/public/'
}
}
dependencies
{
...
...
@@ -11,8 +18,11 @@ buildscript {
allprojects
{
repositories
{
google
()
jcenter
()
maven
{
url
'https://maven.aliyun.com/repository/google'
}
maven
{
url
'http://maven.aliyun.com/repository/gradle-plugin'
}
maven
{
url
'https://maven.aliyun.com/repository/public'
}
maven
{
url
'https://maven.aliyun.com/repository/jcenter'
}
maven
{
url
"https://jitpack.io"
}
}
}
...
...
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