Question: I want to pull from a webservice that returns a list of parcels in JSON format. I want to display the results in a html list that is nice and pretty. I did some googling, it looks like there maybe some libraries built to do this.

Or do I have to do this?

[How to display data on html from json webservice link using jquery](https://stackoverflow.com/questions/11773124/how-to-display-data-on-html-from-json-webservice-link-using-jquery)

Answer: 
No doubt: best solution is to call an activity method from the fragment:

Here an example with a Bitmap Object.

In ACTIVITY: 

define your method:

```
public Bitmap getMyBitmap() {
    return myBitmap;
}

```

In FRAGMENT:

1 - Define your activity

```
private Activity_Main myActivity;

```

2 - Link your activity

```
@Override
public void onAttach(Activity myActivity) {
    super.onAttach(myActivity);
    this.activity= (Activity_Main) myActivity;
}

```

3 - Call your method!

```
myActivity.getMyBitmap()

```

Quick and easy!
You need to know how interfaces work and how to set tags to a fragment as well as how you find a specific fragment by tag. You should read this...

<http://developer.android.com/training/basics/fragments/communicating.html>

To send objects to you fragments this are the basics. On the activity....

```
        // Create fragment and give it an argument for the selected article
        ArticleFragment newFragment = new ArticleFragment();
        Bundle args = new Bundle();
        args.putInt(ArticleFragment.ARG_POSITION, position);
        newFragment.setArguments(args);

        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();

        // Replace whatever is in the fragment_container view with this fragment,
        // and add the transaction to the back stack so the user can navigate back
        transaction.replace(R.id.fragment_container, newFragment);
        transaction.addToBackStack(null);

        // Commit the transaction
        transaction.commit();

```

On the fragment...

```
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {

    ScrollView scroller = new ScrollView(getActivity());
    TextView text = new TextView(getActivity());
    int padding = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
            4, getActivity().getResources().getDisplayMetrics());
    text.setPadding(padding, padding, padding, padding);
    scroller.addView(text);
    text.setText(Shakespeare.DIALOGUE[getShownIndex()]);
    return scroller;
}

```

where getShownIndex is....

```
 public int getShownIndex() {
    return getArguments().getInt("index", 0);
}

```

If you wanna communicate from the fragment to the activity then you need interfaces.