java - Row selection ListView Android -


My question is: Loads and parses using the volley library, everything loads well on a custom list row

But when I press a line it does nothing

Really annoying thing ...

Im using custom view and it's impossible to assign OnListItemClick

This is my code

  // Increases the public class InicioPasajero activity to all the necessary libraries {Personal Static Last String TAG = InicioPasajero.class.getSimpleName ( ); // cinema json url personal static final string url = "URL_RETURNING_JSON"; Personal progression pDialog; Private listing & lt; Movie & gt; Movie List = New Arrestist & lt; Movie & gt; (); See the list of private list views; Private customist adapter adapter; ImageButtonB_JustS; ImageButtonB_Filters; @ Override Protected Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); setContentView (R.layout.activity_inicio_pasajero); b_ajustes = (ImageButton) Find ViewById (R.id.Bajustes); Find B_Filteros = (ImageButton) VVBIID (RID. BeFilters); B_ajustes.setOnClickListener (see new OnClickListener) {click on Public Zero (see View) {Intent one = new intent (InicioPasajero.this, MiPerfil.class); startActivity (a);}}); ListView = (ListView) findViewById (R.id.list); Adapter = new customist adapter (this, movie list); ListView.setAdapter (adapter); PDialog = New Progress Diablog (this); // http request pDialog.setMessage ("Cargando ...") before showing the progress dialog; PDialog.show (); // Change the action bar color // volley request obj JsonArrayRequest movieReq = new JsonArrayRequest (URL, create new Response.Listener; JSONArray & gt; () {@Override Public Zero onResponse (JSONArray response) {Log.d (TAg , Response.toString ()); hidePDialog (); // parsing for json (int i = 0; i & lt; reaction. Lamp (); i ++) {try {JSONObject obj = response.getJSONObject (i) ; Movie Movie = New Movie (); movie.setTitle (obj.getString ("n"); movie.setThumbnailUrl (obj.getString ("i")); film.setRating (obj.getString ("r")) ; Movie.setYear (obj.getString ("h"); // style json array is JSONArray genreArry = obj.getJSONArray ("G"), ArrayList & lt; string & gt; style = A ArrayList & lt; string & gt; (); j & lt; genreArry (for int j = 0. length (); J ++) {genre.add ((String) genreArry.get (j))}} Movie.setGenre (genre); // Movies in Movie ARA Movie List.Add (Movie);} Catch (JSOXEction E) {e.printStackTrace ();}} // Data Adapters notification about data changes // So that it can represent the list view with the updated view. Ta adapter.notifyDataSetChanged (); }}, New response Error lister () {@ Override public wide on error response (volley error error) {Volley log D. (Tag, "error:" + error. Short message ()); HidePDialog (); }}); // Request request to add AppController.getInstance () AddToRequestQueue (movieReq); } Secure void onListItemClick (ListView Movie List, View View, int posicion, long id) {Log.i ("Sel:", "si"); // Hacer is listed as an element in the Algon list TextView textoTitulo = (TextView) view.findViewById (R.id.title); Foursevenes Texo = "Celibiionado:" + Textootul.Get Text;); Toast. Make Text (getApplicationContext (), Texo, Toast.LNGTH_LONG). Show (); } @ Override Public Watch OnDestoy () {Super. One day (); HidePDialog (); } Private Zero Hide PDIO () {if (pdilog! = Null) {pDialog.dismiss (); PDialog = null; }} / * @ Override public boolean on cret option menu (menu menu) {// increase menu; It adds the item to the Action Bar if it exists GetMenuInflater (). Fulao (R. menu menu, menu); Back true; } * / @ Override Public Boolean on Kadadown (Int kikod, Key Event event) {if (keycode == KeyEvent.KEYCODE_BACK and event.getRepeatCount () == 0) {// no hacemos nada Back true; } Return super.Condondon (keycode, event); }}   

Thanks in advance.

I do not see you calling anywhere on your ListView? It also shows that you mean implementing the activity - then the override method called onItemClick will be found when a list item is clicked.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -