What I want is to load view in the viewer fragment class when
something in the list fragment class is clicked. But I can't find any
method to do it. I have used this code for loading view in
viewerFragment class but nothing seems to happen.If someone knows how
to do this please tell me.

public void update(int index) {
    this.getView().setId(R.layout.search);
}
I have used this code in ListActivity class

@Override
    public void onListItemSelected(int index) {
        SampleViewerFragment iv = (SampleViewerFragment)
getSupportFragmentManager()
                .findFragmentById(R.id.image_viewer_fragment);

        if (iv == null || !iv.isInLayout()) {
            Intent showImage = new Intent(getApplicationContext(),
                    SampleViewerActivity.class);
            showImage.putExtra("index", index);
            startActivity(showImage);
        } else {
            iv.update(index);
        }
    }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to