Skip to content

Commit

Permalink
更新demo
Browse files Browse the repository at this point in the history
  • Loading branch information
查郁 committed Apr 8, 2019
1 parent 52eb5d1 commit e543eb6
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 2 deletions.
2 changes: 1 addition & 1 deletion atlas-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ description = """atlas_core"""
String postFix = mini=='true' ? "-mini" : "";


version "5.1.0.9-rc25"
version "5.1.0.9-rc26"


String getEnvValue(key, defValue) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.taobao.atlas.runtime.BundleIniter;
import android.taobao.atlas.runtime.RuntimeVariables;
import android.util.Log;
import android.view.Menu;
Expand All @@ -35,6 +36,7 @@ public class MainActivity extends AppCompatActivity
Toast.makeText(RuntimeVariables.androidApplication,"on click",Toast.LENGTH_SHORT).show();
return true;
case R.id.navigation_dashboard:
BundleIniter.initBundle("com.taobao.secondbundle",null);
switchToActivity("com.taobao.secondbundle.SecondBundleActivity");
return true;
case R.id.navigation_notifications:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<uses-permission android:name="android.permission.INTERNET" />

<application
android:name=".SecondBundleApplication"
android:allowBackup="true"
android:supportsRtl="true">
<activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ public class SecondBundleActivity extends AppCompatActivity implements PlusOneFr
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_secondbundle);
// Toast.makeText(this,"ddddddddddd",Toast.LENGTH_LONG).show();

Toast.makeText(this, SecondBundleApplication.secondBundleIniter.getApplication().toString(), Toast.LENGTH_LONG).show();


}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.taobao.secondbundle;

import android.app.Application;

/**
* 创建日期:2019/4/8 on 下午2:21
* 描述:
* 作者:zhayu.ll
*/
public class SecondBundleApplication extends Application {

public static SecondBundleIniter secondBundleIniter;
// here is the second bundle init method
@Override
public void onCreate() {
super.onCreate();
secondBundleIniter = new SecondBundleIniter();
secondBundleIniter.init(this);

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.taobao.secondbundle;

import android.app.Application;

/**
* 创建日期:2019/4/8 on 下午2:25
* 描述:
* 作者:zhayu.ll
*/
public class SecondBundleIniter {


private Application application;


public void init(Application application){

this.application = application;
}


public Application getApplication(){

return application;
}
}

0 comments on commit e543eb6

Please sign in to comment.