Last active
August 29, 2015 14:10
-
-
Save shengoo/a91e40ae4bd40d95b3b6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
package com.sheng00.customuridemo; | |
import android.os.Bundle; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.view.Menu; | |
import android.widget.TextView; | |
public class MainActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
} | |
@Override | |
protected void onResume() { | |
super.onResume(); | |
Intent intent = getIntent(); | |
if (intent != null) { | |
String action = intent.getAction(); | |
String dataString = intent.getDataString(); | |
if(dataString!=null){ | |
TextView tv = (TextView) findViewById(R.id.tv); | |
tv.append("n" + dataString); | |
} | |
} | |
} | |
@Override | |
public boolean onCreateOptionsMenu(Menu menu) { | |
// Inflate the menu; this adds items to the action bar if it is present. | |
getMenuInflater().inflate(R.menu.main, menu); | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment