Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android2-赵东浩1407084135 #56

Open
z1908144712 opened this issue Jan 9, 2016 · 0 comments
Open

Android2-赵东浩1407084135 #56

z1908144712 opened this issue Jan 9, 2016 · 0 comments

Comments

@z1908144712
Copy link

public class MainActivity extends AppCompatActivity {
private Button bu;
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        bu=(Button)findViewById(R.id.button);
        bu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
            Uri uri =Uri.parse("http://baidu.com");
            Intent intent = new Intent(Intent.ACTION_VIEW);
            intent.setData(uri);
            startActivity(intent);
        }
        });
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant