ParseQueryAdapter loads into mainActivity. I now want the list to be clickable

30 Views Asked by At

I have a ParseQueryAdapter that loads information posted from tip class to the main activity. I now want the post to be able to be saved to a my favorites class once it is clicked.

My mainActivity class, I think i need to add the code here. I am assuming onSelectedItem needs to be implemented

 @Override
    protected void onCreate(Bundle savedInstanceState) {


        super.onCreate(savedInstanceState);
        getListView().setClickable(true);

        mainAdapter = new ParseQueryAdapter<Tip>(this, Tip.class);
        mainAdapter.setTextKey("title");
        mainAdapter.setImageKey("photo");

        //Subclass ParseQueryAdapter
        favoritesAdapter = new FavoriteTipAdapter(this);

        //Default view is all wingman tips
        setListAdapter(mainAdapter);

       /* String url = "http://twitter.com/";
        WebView view = (WebView) this.findViewById(R.id.webView);
        view.getSettings().setJavaScriptEnabled(true);
        view.loadUrl(url); */
    }

More information may be necessary but I do not know how to start the code. I have a favorite list that populates if the user gives his Tip a rating of 4 or higher. However, I want the favorite list to be populated by clicking on the "tip" from the mainActivity page.

0

There are 0 best solutions below