Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

intent in fragment android

Button button = (Button) rootView.findViewById(R.id.button1);
button.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
        Intent intent = new Intent(getActivity(), AnotherActivity.class);
        startActivity(intent);
    }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #intent #fragment #android
ADD COMMENT
Topic
Name
9+5 =