Created
November 24, 2015 14:57
-
-
Save Aiur3908/d60a95248756bb977a11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main2); | |
//取得上一頁傳過來的 Key為Bundle的 Value | |
Bundle bundle = getIntent().getBundleExtra("Bundle"); | |
//取得bundle裡的 Key為Name的 Value | |
String Name = bundle.getString("Name"); | |
//取得bundle裡的 Key為Year的 Value , 若是沒值則為0 | |
int Year = bundle.getInt("Year", 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment