{"action":"created","issue":{"url":"https://api.github.com/repos/PaoloRotolo/AppIntro/issues/225","repository_url":"https://api.github.com/repos/PaoloRotolo/AppIntro","labels_url":"https://api.github.com/repos/PaoloRotolo/AppIntro/issues/225/labels{/name}","comments_url":"https://api.github.com/repos/PaoloRotolo/AppIntro/issues/225/comments","events_url":"https://api.github.com/repos/PaoloRotolo/AppIntro/issues/225/events","html_url":"https://github.com/PaoloRotolo/AppIntro/issues/225","id":155678968,"number":225,"title":"Is it possible to get data from those fragments","user":{"login":"sunil512","id":14230000,"avatar_url":"https://avatars.githubusercontent.com/u/14230000?v=3","gravatar_id":"","url":"https://api.github.com/users/sunil512","html_url":"https://github.com/sunil512","followers_url":"https://api.github.com/users/sunil512/followers","following_url":"https://api.github.com/users/sunil512/following{/other_user}","gists_url":"https://api.github.com/users/sunil512/gists{/gist_id}","starred_url":"https://api.github.com/users/sunil512/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunil512/subscriptions","organizations_url":"https://api.github.com/users/sunil512/orgs","repos_url":"https://api.github.com/users/sunil512/repos","events_url":"https://api.github.com/users/sunil512/events{/privacy}","received_events_url":"https://api.github.com/users/sunil512/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PaoloRotolo/AppIntro/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-05-19T08:20:29Z","updated_at":"2016-05-19T11:51:42Z","closed_at":null,"body":"Hi, I used AppIntro it was nice, actually I designed my own custom fragment and added to MyIntro class(which extends AppIntro). Here in my custom fragment I added a edit text and sub radiobuttons, when I pressed on done or Get started I want data from edit text, is it possible to get the data from the fragments."},"comment":{"url":"https://api.github.com/repos/PaoloRotolo/AppIntro/issues/comments/220302203","html_url":"https://github.com/PaoloRotolo/AppIntro/issues/225#issuecomment-220302203","issue_url":"https://api.github.com/repos/PaoloRotolo/AppIntro/issues/225","id":220302203,"user":{"login":"sunil512","id":14230000,"avatar_url":"https://avatars.githubusercontent.com/u/14230000?v=3","gravatar_id":"","url":"https://api.github.com/users/sunil512","html_url":"https://github.com/sunil512","followers_url":"https://api.github.com/users/sunil512/followers","following_url":"https://api.github.com/users/sunil512/following{/other_user}","gists_url":"https://api.github.com/users/sunil512/gists{/gist_id}","starred_url":"https://api.github.com/users/sunil512/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunil512/subscriptions","organizations_url":"https://api.github.com/users/sunil512/orgs","repos_url":"https://api.github.com/users/sunil512/repos","events_url":"https://api.github.com/users/sunil512/events{/privacy}","received_events_url":"https://api.github.com/users/sunil512/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T11:51:42Z","updated_at":"2016-05-19T11:51:42Z","body":"you didn't get me .\r\n\r\nMyIntro class\r\n`public final class MyIntro extends AppIntro {\r\n\r\n    @Override\r\n    public void init(Bundle savedInstanceState) {\r\n        addSlide(SampleSlide.newInstance(R.layout.fragmenta));\r\n        addSlide(SampleSlide.newInstance(R.layout.fragmentb));\r\n        addSlide(SampleSlide.newInstance(R.layout.fragmentc));\r\n    }\r\n\r\n    @Override\r\n    public void onSkipPressed() {\r\n        loadMainActivity();\r\n        Toast.makeText(getApplicationContext(), getString(R.string.skip), Toast.LENGTH_SHORT).show();\r\n    }\r\n\r\n    @Override\r\n    public void onNextPressed() {\r\n\r\n    }\r\n\r\n    @Override\r\n    public void onDonePressed() {\r\n\r\n    }\r\n\r\n    @Override\r\n    public void onSlideChanged() {\r\n\r\n    }\r\n\r\n    private void loadMainActivity() {\r\n        Intent intent = new Intent(this, MainActivity.class);\r\n        startActivity(intent);\r\n    }\r\n\r\n    public void getStarted(View v) {\r\n\r\n    }\r\n}\r\n`\r\n\r\nMy custom fragmentc class\r\n\r\n`public class Fragmentc extends Fragment {\r\n\r\n    EditText ed;\r\n    RadioButton rb1,rb2;\r\n\r\n    public Fragmentc() {\r\n        // Required empty public constructor\r\n    }\r\n\r\n\r\n    @Override\r\n    public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n                             Bundle savedInstanceState) {\r\n        // Inflate the layout for this fragment\r\n        View v = inflater.inflate(R.layout.fragmentc, container, false);\r\n        ed = (EditText) v.findViewById(R.id.editText);\r\n        rb1 = (RadioButton) v.findViewById(R.id.radioButton1);\r\n        rb2 = (RadioButton) v.findViewById(R.id.radioButton2);\r\n        return v;\r\n    }\r\n`\r\n\r\nwhen user clicks on GetStarted or Done in the third fragmentc. My logic implements and send data to MainActivity, so, logic should be in these two methods below in MyIntro.\r\nmy logic is:\r\n\r\n`if (!ed.getText().toString().equals(\"\")) {\r\n            if (rb1.isChecked()) {\r\n                int input = Integer.valueOf(ed.getText().toString());\r\n                double out = input / 24.0;\r\n                out = Double.parseDouble(new DecimalFormat(\"#.0\").format(out));\r\n                Intent m = new Intent(getActivity(), MainActivity.class);\r\n                m.putExtra(\"res\", out);\r\n                startActivity(m);`\r\n\r\nthe above code should be added to these two methods below in MyIntro ,but the edittext and buttons are of my custom fragment so it'll show error.\r\n\r\nmethods in MyIntro:\r\n\r\n` @Override\r\n    public void onDonePressed() {\r\n\r\n    }`\r\n\r\n` public void getStarted(View v) {\r\n\r\n    }` methods in MyIntro class.\r\n\r\n\r\n`@Override\r\n    public void onDonePressed() {\r\nif (!ed.getText().toString().equals(\"\")) {\r\n            if (rb1.isChecked()) {\r\n                int input = Integer.valueOf(ed.getText().toString());\r\n                double out = input / 24.0;\r\n                out = Double.parseDouble(new DecimalFormat(\"#.0\").format(out));\r\n                Intent m = new Intent(getActivity(), MainActivity.class);\r\n                m.putExtra(\"res\", out);\r\n                startActivity(m);\r\n    }`\r\nif I added above code, it'll show error..\r\n\r\nHere, we cannot send data to the MainActivity. can we implement my logic in fragment class,I think its not possible  because the onDonePressed and getStarted Methods are in MyInto class.\r\n\r\nis there any solution with you.\r\n\r\n\r\n"}}