[Solved] Application unfortunately stopped on clicking bookmarked item in fragment view Im using json to store title & links


hello guys i used following code & my problem got solved

 listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            public void onItemClick(AdapterView<?> parent, View view,
                                    int position, long id) {
                Object o = listView.getAdapter().getItem(position);
                 if (o instanceof Map) {
                    final Map map = (Map) o;
                    Intent in = new Intent(getActivity(),HomeFragment.class);
                    in.putExtra("url", String.valueOf(map.get(TAG_LINK)));

                     System.out.println("loading url..."+String.valueOf(map.get(TAG_LINK))+" please wait");
                     HomeFragment.wv.post(new Runnable() {
                         public void run() {
                             HomeFragment.wv.loadUrl(String.valueOf(map.get(TAG_LINK)));
                         }
                     });

                     seacoders.abhilash.bogguru.MainActivity.changefrag();

                }

            }

        });

And following code in MainActivity.

 private static int getItem(int i) {
    return mViewPager.getCurrentItem() + i;
  }

  public static void changefrag() {
    mViewPager.setCurrentItem(getItem(-1),true);
  }

solved Application unfortunately stopped on clicking bookmarked item in fragment view Im using json to store title & links