@Nullable
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.news_recent, container, false);
    setHasOptionsMenu(true);

    listView = (ListView) v.findViewById(R.id.lsv_latest);

    list = new ArrayList<ItemRecent>();
    array_news = new ArrayList<String>();
    array_news_cat_name = new ArrayList<String>();
    array_cid = new ArrayList<String>();
    array_cat_id = new ArrayList<String>();
    array_cat_name = new ArrayList<String>();
    array_title = new ArrayList<String>();
    array_image = new ArrayList<String>();
    array_desc = new ArrayList<String>();
    array_date = new ArrayList<String>();

    str_news = new String[array_news.size()];
    str_news_cat_name = new String[array_news_cat_name.size()];
    str_cid = new String[array_cid.size()];
    str_cat_id = new String[array_cat_id.size()];
    str_cat_name = new String[array_cat_name.size()];
    str_title = new String[array_title.size()];
    str_image = new String[array_image.size()];
    str_desc = new String[array_desc.size()];
    str_date = new String[array_date.size()];

    util = new JsonUtils(this.getActivity());

    if (JsonUtils.isNetworkAvailable(getActivity())) {
      new MyTask().execute(Constant.SERVER_URL + "/api.php?latest_news=50");
    } else {
      Toast.makeText(getActivity(), "No Internet Connection!!", Toast.LENGTH_SHORT).show();
    }

    listView.setOnItemClickListener(
        new AdapterView.OnItemClickListener() {

          @Override
          public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {

            object = list.get(position);
            int pos = Integer.parseInt(object.getCatId());
            Intent intplay = new Intent(getActivity(), ActivityNewsDetail.class);
            getActivity().overridePendingTransition(R.anim.open_next, R.anim.close_next);
            intplay.putExtra("POSITION", pos);
            intplay.putExtra("CATEGORY_ITEM_CID", str_cid);
            intplay.putExtra("CATEGORY_ITEM_NAME", str_cat_name);
            intplay.putExtra("CATEGORY_ITEM_CAT_ID", str_cat_id);
            intplay.putExtra("CATEGORY_ITEM_NEWSIMAGE", str_image);
            intplay.putExtra("CATEGORY_ITEM_NEWSHEADING", str_title);
            intplay.putExtra("CATEGORY_ITEM_NEWSDESCRI", str_desc);
            intplay.putExtra("CATEGORY_ITEM_NEWSDATE", str_date);

            startActivity(intplay);
          }
        });

    return v;
  }