Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onDataReceived(Map<String, List<Map<Integer, String>>> receivedData) {
- Log.i("CarerActivity:onDataReceived", "Map received by Fragment.");
- Log.i("CarerActivity:onDataReceived", receivedData.toString());
- Log.i("Fragment ID", ""+R.id.configurationfragment);
- TabConfiguration configurationFragment = (TabConfiguration) getSupportFragmentManager().findFragmentById(R.id.configurationfragment);
- if(configurationFragment != null){
- Log.i("CarerActivity:onDataReceived", "Fragment not null.");
- }else{
- Log.i("CarerActivity:onDataReceived", "Fragment null!");
- }
- }
- public static final int configurationfragment=0x7f080001;
- public static final class id{
- public class PagerUserAdapter extends FragmentStatePagerAdapter
- {
- private final static String titles[] = {"Profile", "Badges", "Skills", "Accomplishments"};
- private Bundle args;
- public PagerUserAdapter(FragmentManager fm, CWUser u)
- {
- super(fm);
- this.args = new Bundle();
- args.putSerializable(Constants.BUNDLE_USER, u);
- }
- public void refresh(CWUser u)
- {
- args.putSerializable(Constants.BUNDLE_USER, u);
- this.notifyDataSetChanged();
- }
- @Override
- public CharSequence getPageTitle(int position)
- {
- return titles[position];
- }
- @Override
- public Fragment getItem(int position)
- {
- switch(position)
- {
- case 0:
- return ProfileFragment.newInstance(args);
- case 1:
- return BadgesFragment.newInstance(args);
- case 2:
- return SkillsFragment.newInstance(args);
- case 3:
- return AccomplishmentsFragment.newInstance(args);
- default:
- return ProfileFragment.newInstance(args);
- }
- }
- @Override
- public int getCount()
- {
- return titles.length;
- }
- @Override
- public int getItemPosition(Object object)
- {
- return POSITION_NONE;
- }
- }
- public class BadgesFragment extends BaseFragment
- {
- public static BadgesFragment newInstance(Bundle args)
- {
- BadgesFragment f = new BadgesFragment();
- f.setArguments(args);
- return f;
- }
- @Override
- public void onActivityCreated(Bundle savedInstanceState)
- {
- super.onActivityCreated(savedInstanceState);
- CWUser u = (CWUser) getArguments().get(Constants.BUNDLE_USER);
- //do what you want with your new data
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement