package mindpop.learnpop;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import org.w3c.dom.Text;


/**
 * A simple {@link Fragment} subclass.
 */
public class WebItem extends Fragment {


    private Resource resource;
    private TextView title;
    private TextView summary;
    private Button viewButton;

    public WebItem() {
        // Required empty public constructor
    }

    public void init(Resource res){this.resource = res;}


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View rootView = inflater.inflate(R.layout.fragment_web_item, container, false);

        title = (TextView)rootView.findViewById(R.id.titleTxt);
        summary = (TextView)rootView.findViewById(R.id.sumTXT);
        viewButton = (Button) rootView.findViewById(R.id.btnView);

        title.setText(resource.getTitle());
        summary.setText(resource.getSummary());

        viewButton.setOnClickListener(new View.OnClickListener(){
            public void onClick(View v){
                WebViewFragment webFrag = new WebViewFragment();
                webFrag.init(resource.getUrl());
                getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.container, webFrag).addToBackStack(null).commit();
            }
        });

        return rootView;
    }


}

@@ -448,16 +448,80 @@
 ummary;%0A
+    private TextView likesTxt;%0A    private TextView unlikesTxt;%0A
     priv
@@ -1161,96 +1161,339 @@
 w);%0A
-%0A        title.setText(resource.getTitle());%0A        summary.setText(resource.getSummary
+        likesTxt = (TextView) rootView.findViewById(R.id.numLikes);%0A        unlikesTxt = (TextView) rootView.findViewById(R.id.numDislikes);%0A%0A%0A%0A        title.setText(resource.getTitle());%0A        summary.setText(resource.getSummary());%0A        likesTxt.setText(resource.getUpVote());%0A        unlikesTxt.setText(resource.getDownVote
 ());

put number of dislikes and likes