-2

This is the code in which I want to change this one Toast message into 3 Intent. How can I do so:

 @Override
   public void onClick(int buttonIndex) {
   Toast.makeText(
              parent.getContext(),
               "On click " + circleSubButtonTexts[buttonIndex],
   Toast.LENGTH_SHORT).show();
                            }
halfer
  • 19,824
  • 17
  • 99
  • 186
Anish
  • 1
  • 3

2 Answers2

0

By this much of your question I can help you by below code only. Try with below code , set clickListner on FloatingActionButton

 FloatingActionButton fab1 = (FloatingActionButton) rootView.findViewById(R.id.fab_1);
    fab1.setOnCheckedChangeListener(this);

    fab1.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

            Intent intent = new Intent(MainActivity.this, SecondActivity.class);
        startActivity(intent);
        }
    });
Abhishek kumar
  • 4,347
  • 8
  • 29
  • 44
-1

Assuming you have created and registered your activities to the manifest, (and you have access to application), simply replace the content of above function with:

Intent intent = new Intent(this, SomeActivity.class);
// Add data or something
startActivity(intent);

For more details: https://developer.android.com/training/basics/firstapp/starting-activity.html

halfer
  • 19,824
  • 17
  • 99
  • 186
skaur
  • 168
  • 2
  • 11