Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MainActivity extends AppCompatActivity {
- Button b;
- @SuppressLint("WrongViewCast")
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- b = findViewById(R.id.b);
- b.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- Intent intent = new Intent(MainActivity.this, Browser.class);
- intent.putExtra("url", "https://www.google.com");
- startActivity(intent);
- }
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement