|
||
|
|
|
|||||||
| Avisos |
| Programación y Desarrollo para Android Subforo exclusivo para temas de programación de software para PDAs y desarrollo de aplicaciones, interfaces, etc bajo Android |
![]() |
|
|
Herramientas |
|
#1
|
||||
|
||||
|
Dos Arrays
Vereis, tengo este Json el cual tiene varios arrays que muestro en un solo layout, pero me sale todo como una lista. ¿Hay alguna manera de mostrar los dos arrays por separado?, es decir en dos listas o yo que se, algo para poner cuales son los locales y cuales los visitantes.
Código:
import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.Volley;
import com.herprogramacion.restaurantericoparico.R;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.List;
public class Goles_Adapter extends ArrayAdapter {
// Atributos
private RequestQueue requestQueue;
JsonObjectRequest jsArrayRequest;
private static final String URL_BASE = "http://cadetes.esy.es/2015/goles.php";
private static final String URL_JSON = "";
private static final String TAG = "";
private static final String ESCUDO = "http://ffcv.es/ncompeticiones/";
List<Goles_Local> items;
public Goles_Adapter(Context context) {
super(context,0);
// Crear nueva cola de peticiones
requestQueue= Volley.newRequestQueue(context);
// Nueva peticion JSONObject
jsArrayRequest = new JsonObjectRequest(
Request.Method.GET,
URL_BASE + URL_JSON,
null,
new Response.Listener<JSONObject>() {
@override
public void onResponse(JSONObject response) {
items = parseJson(response);
notifyDataSetChanged();
}
},
new Response.ErrorListener() {
@override
public void onErrorResponse(VolleyError error) {
Log.d(TAG, "Error Respuesta en JSON: " + error.getMessage());
}
}
);
// Anyadir peticion a la cola
requestQueue.add(jsArrayRequest);
}
@override
public int getCount() {
return items != null ? items.size() : 0;
}
@override
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
// Referencia del view procesado
View listItemView;
//Comprobando si el View no existe
listItemView = null == convertView ? layoutInflater.inflate(
R.layout.goles_row,
parent,
false) : convertView;
// Obtener el item actual
Goles_Local item = items.get(position);
// Obtener Views
TextView textoNombre = (TextView) listItemView.findViewById(R.id.tv_Nombre);
TextView textoMinuto = (TextView) listItemView.findViewById(R.id.tv_Minuto);
// Actualizar los Views
textoNombre.setText(item.getNombre());
textoMinuto.setText(item.getMinuto());
// Anyadir peticion a la cola
return listItemView;
}
public List<Goles_Local> parseJson(JSONObject jsonObject){
// Variables locales
List<Goles_Local> goles_Local_local = new ArrayList<>();
JSONArray jsonArray= null;
try {
// Obtener el array del objeto
jsonArray = jsonObject.getJSONArray("golesLocal");
for(int i=0; i<jsonArray.length(); i++){
try {
JSONObject objeto= jsonArray.getJSONObject(i);
Goles_Local goles_Local_Local = new Goles_Local(
objeto.getString("nombre"),
objeto.getString("minuto"));
goles_Local_local.add(goles_Local_Local);
} catch (JSONException e) {
Log.e(TAG, "Error de parsing: " + e.getMessage());
}
}
} catch (JSONException e) {
e.printStackTrace();
}
JSONArray jsonArray1= null;
try {
// Obtener el array del objeto
jsonArray1 = jsonObject.getJSONArray("golesVisitante");
for(int i=0; i<jsonArray1.length(); i++){
try {
JSONObject objeto= jsonArray1.getJSONObject(i);
Goles_Local goles_Local_Local = new Goles_Local(
objeto.getString("nombre"),
objeto.getString("minuto"));
goles_Local_local.add(goles_Local_Local);
} catch (JSONException e) {
Log.e(TAG, "Error de parsing: " + e.getMessage());
}
}
} catch (JSONException e) {
e.printStackTrace();
}
return goles_Local_local;
}
}
Última edición por Merche300 Día 28/08/16 a las 08:12:29. |
|
|
|
#2
|
||||
|
||||
|
Puedes desde hacer 2 ArrayAdapter para mostrar en 2 ListView por separado (cosa que no veo).
Hasta parsear los goles por separado (cosa que haces a medias, porque todo lo metes en un List de Goles_Local, que se podría llamar simplemente Goles ya que todos son iguales) y tenerlos en 2 List distintos. Y luego en el getView hacer la lógica para poner en distintas columnas (en un layout los locales alineados a la izquierda y los visitantes a la derecha) según la posición de los goles locales y visitantes. Si hay más visitantes que locales habrá posiciones en el ListView que tendrán elementos a la derecha y no a la izquierda, y viceversa. |
| Gracias de parte de: | ||
|
#3
|
||||
|
||||
|
creo que es esto lo que quieres decir:
Código:
public class Goles_Adapter extends ArrayAdapter {
// Atributos
private RequestQueue requestQueue;
JsonObjectRequest jsArrayRequest;
private static final String URL_BASE = "http://www.ffcv.es/ncompeticiones/server.php?action=getActa&tmp=2015/2016&jor=9&cmp=284&idl=0201045301&idv=0201239301";
private static final String URL_JSON = "";
private static final String TAG = "";
private static final String ESCUDO = "http://ffcv.es/ncompeticiones/";
List<Goles> items;
List<Goles_V> items_v;
public Goles_Adapter(Context context) {
super(context,0);
// Crear nueva cola de peticiones
requestQueue= Volley.newRequestQueue(context);
// Nueva peticion JSONObject
jsArrayRequest = new JsonObjectRequest(
Request.Method.GET,
URL_BASE + URL_JSON,
null,
new Response.Listener<JSONObject>() {
@override
public void onResponse(JSONObject response) {
items = parseJson(response);
notifyDataSetChanged();
}
},
new Response.ErrorListener() {
@override
public void onErrorResponse(VolleyError error) {
Log.d(TAG, "Error Respuesta en JSON: " + error.getMessage());
}
}
);
// Anyadir peticion a la cola
requestQueue.add(jsArrayRequest);
}
@override
public int getCount() {
return items != null ? items.size() : 0;
}
@override
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
// Referencia del view procesado
View listItemView;
//Comprobando si el View no existe
listItemView = null == convertView ? layoutInflater.inflate(
R.layout.goles_row,
parent,
false) : convertView;
// Obtener el item actual
Goles item = items.get(position);
// Obtener Views
TextView textoNombre = (TextView) listItemView.findViewById(R.id.tv_jornada);
TextView textoMinuto = (TextView) listItemView.findViewById(R.id.tv_Fecha);
// Actualizar los Views
textoNombre.setText(item.getNombre());
textoMinuto.setText(item.getMinuto());
View listItemView1;
listItemView1 = null == convertView ? layoutInflater.inflate(
R.layout.goles_row,
parent,
false) : convertView;
Goles_V item1 = items_v.get(position);
// Obtener Views
TextView textoNombre1 = (TextView) listItemView1.findViewById(R.id.tv_jornada1);
TextView textoMinuto1 = (TextView) listItemView1.findViewById(R.id.tv_Fecha1);
// Actualizar los Views
textoNombre1.setText(item1.getNombre());
textoMinuto1.setText(item1.getMinuto());
// Anyadir peticion a la cola
return listItemView;
}
public List<Goles> parseJson(JSONObject jsonObject){
// Variables locales
List<Goles> rankingAmonestacionesCadetes = new ArrayList<>();
JSONArray jsonArray= null;
try {
// Obtener el array del objeto
jsonArray = jsonObject.getJSONArray("golesLocal");
for(int i=0; i<jsonArray.length(); i++){
try {
JSONObject objeto= jsonArray.getJSONObject(i);
Goles RankingAmonestacionesCadetes = new Goles(
objeto.getString("nombre"),
objeto.getString("minuto"));
rankingAmonestacionesCadetes.add(RankingAmonestacionesCadetes);
} catch (JSONException e) {
Log.e(TAG, "Error de parsing: " + e.getMessage());
}
}
} catch (JSONException e) {
e.printStackTrace();
}
public List<Goles_V> parseJson(JSONObject jsonObject){
// Variables locales
List<Goles_V> goles_Visitante = new ArrayList<>();
JSONArray jsonArray_visi= null;
try {
// Obtener el array del objeto
jsonArray_visi = jsonObject.getJSONArray("golesVisitante");
for(int i=0; i<jsonArray_visi.length(); i++){
try {
JSONObject objeto= jsonArray_visi.getJSONObject(i);
Goles_V goles_visitante = new Goles_V(
objeto.getString("nombre"),
objeto.getString("minuto"));
goles_Visitante.add(goles_visitante);
} catch (JSONException e) {
Log.e(TAG, "Error de parsing: " + e.getMessage());
}
}
} catch (JSONException e) {
e.printStackTrace();
}
return rankingAmonestacionesCadetes;
}
}
}
public List<Goles_V> parseJson(JSONObject jsonObject){ hay algo mal. Error 155, 9) error: illegal start of expressionError 155, 39) error: ';' expectedError 155, 61) error: ';' expectedError:Execution failed for task ':app:compileDebugJavaWithJavac'. > Compilation failed; see the compiler error output for details. Última edición por Merche300 Día 20/03/16 a las 15:34:09. |
|
#4
|
||||
|
||||
|
No veo muy bien la indentación, pero parece que estás tratando de meter un método dentro de otro, por eso te da error de sintaxis.
|
| Gracias de parte de: | ||
|
#5
|
||||
|
||||
|
|
|
#6
|
||||
|
||||
|
Creo que esta ahora mejor
Código:
public class Goles_Adapter_J25 extends ArrayAdapter {
// Atributos
private RequestQueue requestQueue;
JsonObjectRequest jsArrayRequest;
private static final String URL_BASE = "http://juveniles.esy.es/2015/jornadas/info_jornadas/info_j_25.php";
private static final String URL_JSON = "";
private static final String TAG = "";
private static final String ESCUDO = "http://ffcv.es/ncompeticiones/";
List<Goles_Local> items_local;
List<Goles_Visi> items_visi;
public Goles_Adapter_J25(Context context) {
super(context,0);
// Crear nueva cola de peticiones
requestQueue= Volley.newRequestQueue(context);
// Nueva peticion JSONObject
jsArrayRequest = new JsonObjectRequest(
Request.Method.GET,
URL_BASE + URL_JSON,
null,
new Response.Listener<JSONObject>() {
public void onResponse(JSONObject response) {
items_local = parseJson(response);
notifyDataSetChanged();
}
},
new Response.ErrorListener() {
public void onErrorResponse(VolleyError error) {
Log.d(TAG, "Error Respuesta en JSON: " + error.getMessage());
}
}
);
// Anyadir peticion a la cola
requestQueue.add(jsArrayRequest);
}
public int getCount() {
return items_local != null ? items_local.size() : 0;
}
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
// Referencia del view procesado
View listItemView;
//Comprobando si el View no existe
listItemView = null == convertView ? layoutInflater.inflate(
R.layout.goles_row,
parent,
false) : convertView;
// Obtener el item actual
Goles_Local item = items_local.get(position);
// Obtener Views
TextView textoNombre = (TextView) listItemView.findViewById(R.id.tv_Nombre);
TextView textoMinuto = (TextView) listItemView.findViewById(R.id.tv_Minuto);
// Actualizar los Views
textoNombre.setText(item.getNombre());
textoMinuto.setText(item.getMinuto());
// Obtener el item actual
Goles_Visi item_visi = items_visi.get(position);
// Obtener Views
TextView textoNombre1 = (TextView) listItemView.findViewById(R.id.textView2);
TextView textoMinuto1 = (TextView) listItemView.findViewById(R.id.textView3);
// Actualizar los Views
textoNombre1.setText(item_visi.getNombre());
textoMinuto1.setText(item_visi.getMinuto());
// Anyadir peticion a la cola
return listItemView;
}
public List<Goles_Local> parseJson(JSONObject jsonObject) {
// Variables locales
List<Goles_Local> goles_Local_local = new ArrayList<>();
JSONArray jsonArray_Local = null;
try {
// Obtener el array del objeto
jsonArray_Local = jsonObject.getJSONArray("golesLocal");
for (int i = 0; i < jsonArray_Local.length(); i++) {
try {
JSONObject objeto = jsonArray_Local.getJSONObject(i);
Goles_Local goles_Local_Local = new Goles_Local(
objeto.getString("nombre"),
objeto.getString("minuto"));
goles_Local_local.add(goles_Local_Local);
} catch (JSONException e) {
Log.e(TAG, "Error de parsing: " + e.getMessage());
}
}
} catch (JSONException e) {
e.printStackTrace();
}
return goles_Local_local;
}
public List<Goles_Visi> parseJson (JSONObject jsonObject){
// Variables locales
List<Goles_Visi> goles_Visitante = new ArrayList<>();
JSONArray jsonArray_visi = null;
try {
// Obtener el array del objeto
jsonArray_visi = jsonObject.getJSONArray("golesVisitante");
for (int i = 0; i < jsonArray_visi.length(); i++) {
try {
JSONObject objeto = jsonArray_visi.getJSONObject(i);
Goles_Visi goles_visitante = new Goles_Visi(
objeto.getString("nombre"),
objeto.getString("minuto"));
goles_Visitante.add(goles_visitante);
} catch (JSONException e) {
Log.e(TAG, "Error de parsing: " + e.getMessage());
}
}
} catch (JSONException e) {
e.printStackTrace();
}
return goles_Visitante;
}
}
Error 159, 29) error: method parseJson(JSONObject) is already defined in class Goles_Adapter_J25y las lineas public List<Goles_Local> parseJson(JSONObject jsonObject) { public List<Goles_Visi> parseJson (JSONObject jsonObject){ subrayadas en rojo. items_local = parseJson(response); y en esta el response Que pasa ahora? Si es lo que me gustaria a la derecha locales e izquierda visitantes. Gracias Última edición por Merche300 Día 01/05/16 a las 14:25:32. |
|
#7
|
||||
|
||||
|
No existe la sobrecarga en devolución, sólo en parámetros.
Es decir, no puedes tener 2 métodos llamados parseJson con un JSONObject como parámetro, porque no sabrá a cual llamar. Es Java básico. |
| Gracias de parte de: | ||
|
#8
|
||||
|
||||
|
|
|
#9
|
||||
|
||||
|
Muy pronto cante victoria, sólo me funciona si hay empate, no muestra por ejemplo, 4 registros locales y 2 visitantes, se cierra la aplicacion
java.lang.IndexOutOfBoundsException: Invalid index 1, size is 1 Código:
public class Goles_Adapter_J25 extends ArrayAdapter {
// Atributos
private RequestQueue requestQueue;
JsonObjectRequest jsArrayRequest;
private static final String URL_BASE = "http://juveniles.esy.es/2015/jornadas/info_jornadas/info_j_25.php";
private static final String URL_JSON = "";
private static final String TAG = "";
private static final String ESCUDO = "http://ffcv.es/ncompeticiones/";
List<Goles_Local> items_local;
List<Goles_Visi> items_visi;
public Goles_Adapter_J25(Context context) {
super(context,0);
// Crear nueva cola de peticiones
requestQueue= Volley.newRequestQueue(context);
// Nueva peticion JSONObject
jsArrayRequest = new JsonObjectRequest(
Request.Method.GET,
URL_BASE + URL_JSON,
null,
new Response.Listener<JSONObject>() {
public void onResponse(JSONObject response) {
items_local = parseJson_local(response);
items_visi = parseJson_visitante(response);
notifyDataSetChanged();
}
},
new Response.ErrorListener() {
public void onErrorResponse(VolleyError error) {
Log.d(TAG, "Error Respuesta en JSON: " + error.getMessage());
}
}
);
// Anyadir peticion a la cola
requestQueue.add(jsArrayRequest);
}
public int getCount() {
return items_local != null ? items_local.size() : 0;
}
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
// Referencia del view procesado
View listItemView;
//Comprobando si el View no existe
listItemView = null == convertView ? layoutInflater.inflate(
R.layout.goles_dos_listas_row,
parent,
false) : convertView;
// Obtener el item actual
Goles_Local item = items_local.get(position);
// Obtener Views
TextView textoNombre = (TextView) listItemView.findViewById(R.id.tv_Nombre_Local);
TextView textoMinuto = (TextView) listItemView.findViewById(R.id.tv_Minuto_Local);
// Actualizar los Views
textoNombre.setText(item.getNombre());
textoMinuto.setText(item.getMinuto());
// Obtener el item actual
Goles_Visi item_visi = items_visi.get(position);
// Obtener Views
TextView textoNombre1 = (TextView) listItemView.findViewById(R.id.tv_Nombre_Visi);
TextView textoMinuto1 = (TextView) listItemView.findViewById(R.id.tv_Minuto_Visi);
// Actualizar los Views
textoNombre1.setText(item_visi.getNombre_visi());
textoMinuto1.setText(item_visi.getMinuto_visi());
// Anyadir peticion a la cola
return listItemView;
}
public List<Goles_Local> parseJson_local(JSONObject jsonObject) {
// Variables locales
List<Goles_Local> goles_Local_local = new ArrayList<>();
JSONArray jsonArray_Local = null;
try {
// Obtener el array del objeto
jsonArray_Local = jsonObject.getJSONArray("golesLocal");
for (int i = 0; i < jsonArray_Local.length(); i++) {
try {
JSONObject objeto = jsonArray_Local.getJSONObject(i);
Goles_Local goles_Local_Local = new Goles_Local(
objeto.getString("nombre"),
objeto.getString("minuto"));
goles_Local_local.add(goles_Local_Local);
} catch (JSONException e) {
Log.e(TAG, "Error de parsing: " + e.getMessage());
}
}
} catch (JSONException e) {
e.printStackTrace();
}
return goles_Local_local;
}
public List<Goles_Visi> parseJson_visitante (JSONObject jsonObject){
// Variables locales
List<Goles_Visi> goles_Visitante = new ArrayList<>();
JSONArray jsonArray_visi = null;
try {
// Obtener el array del objeto
jsonArray_visi = jsonObject.getJSONArray("golesVisitante");
for (int i = 0; i < jsonArray_visi.length(); i++) {
try {
JSONObject objeto = jsonArray_visi.getJSONObject(i);
Goles_Visi goles_visitante = new Goles_Visi(
objeto.getString("minuto"),
objeto.getString("nombre"));
goles_Visitante.add(goles_visitante);
} catch (JSONException e) {
Log.e(TAG, "Error de parsing: " + e.getMessage());
}
}
} catch (JSONException e) {
e.printStackTrace();
}
return goles_Visitante;
}
}
Última edición por Merche300 Día 06/05/16 a las 22:44:47. |
|
#10
|
||||
|
||||
|
casi esta despues de varias semanas. esto es lo que he conseguido gracias a @viruslaura lo que ocurre es que asi me los saca todos, pero si el resultado por ejemplo es 1 - 3
lo que hace es que me rellena los locales con 1 item que es el nombre y minuto y 2 mas en blanco y los visitantes correctamente. Código:
import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.Volley;
import com.herprogramacion.restaurantericoparico.R;
import com.herprogramacion.restaurantericoparico.adapters.Goles_Local;
import com.herprogramacion.restaurantericoparico.adapters.Goles_Visi;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.List;
public class Goles_Adapter_J19 extends ArrayAdapter {
// Atributos
private RequestQueue requestQueue;
JsonObjectRequest jsArrayRequest;
private static final String URL_BASE = "http://juveniles.esy.es/2015/jornadas/info_jornadas/info_j_19.php";
private static final String URL_JSON = "";
private static final String TAG = "";
private static final String ESCUDO = "http://ffcv.es/ncompeticiones/";
List<Goles_Local> items_local;
List<Goles_Visi> items_visi;
public Goles_Adapter_J19(Context context) {
super(context,0);
// Crear nueva cola de peticiones
requestQueue= Volley.newRequestQueue(context);
// Nueva peticion JSONObject
jsArrayRequest = new JsonObjectRequest(
Request.Method.GET,
URL_BASE + URL_JSON,
null,
new Response.Listener<JSONObject>() {
public void onResponse(JSONObject response) {
items_local = parseJson_local(response);
items_visi = parseJson_visitante(response);
notifyDataSetChanged();
}
},
new Response.ErrorListener() {
public void onErrorResponse(VolleyError error) {
Log.d(TAG, "Error Respuesta en JSON: " + error.getMessage());
}
}
);
// Anyadir peticion a la cola
requestQueue.add(jsArrayRequest);
}
public int getCount() {
//return items_local != null ? items_local.size() : 0;
int locales = items_local!=null?items_local.size():0;
int visitantes = items_visi!=null?items_visi.size():0;
return (locales>visitantes)?locales:visitantes;
}
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
// Referencia del view procesado
View listItemView;
//Comprobando si el View no existe
listItemView = null == convertView ? layoutInflater.inflate(
R.layout.goles_dos_listas_row,
parent,
false) : convertView;
// Obtener el item actual
if(items_local.size ()> position){
// Obtener el item actual
Goles_Local item_local = items_local.get(position);
// Obtener Views
TextView textoNombre_Local = (TextView) listItemView.findViewById(R.id.tv_Nombre_Local);
TextView textoMinuto_Local = (TextView) listItemView.findViewById(R.id.tv_Minuto_Local);
// Actualizar los Views
textoNombre_Local.setText(item_local.getNombre());
textoMinuto_Local.setText(item_local.getMinuto());
}
if(items_visi.size ()> position){
// Obtener el item actual
Goles_Visi item = items_visi.get(position);
// Obtener Views
TextView textoNombre_Visi = (TextView) listItemView.findViewById(R.id.tv_Nombre_Visi);
TextView textoMinuto_Visi = (TextView) listItemView.findViewById(R.id.tv_Minuto_Visi);
// Actualizar los Views
textoNombre_Visi.setText(item.getNombre_visi());
textoMinuto_Visi.setText(item.getMinuto_visi());
}
// Anyadir peticion a la cola
return listItemView;
}
public List<Goles_Local> parseJson_local(JSONObject jsonObject) {
// Variables locales
List<Goles_Local> goles_Local_local = new ArrayList<>();
JSONArray jsonArray_Local = null;
try {
// Obtener el array del objeto
jsonArray_Local = jsonObject.getJSONArray("golesLocal");
for (int i = 0; i < jsonArray_Local.length(); i++) {
try {
JSONObject objeto = jsonArray_Local.getJSONObject(i);
Goles_Local goles_Local_Local = new Goles_Local(
objeto.getString("nombre"),
objeto.getString("minuto"));
goles_Local_local.add(goles_Local_Local);
} catch (JSONException e) {
Log.e(TAG, "Error de parsing: " + e.getMessage());
}
}
} catch (JSONException e) {
e.printStackTrace();
}
return goles_Local_local;
}
public List<Goles_Visi> parseJson_visitante (JSONObject jsonObject){
// Variables locales
List<Goles_Visi> goles_Visitante = new ArrayList<>();
JSONArray jsonArray_visi = null;
try {
// Obtener el array del objeto
jsonArray_visi = jsonObject.getJSONArray("golesVisitante");
for (int i = 0; i < jsonArray_visi.length(); i++) {
try {
JSONObject objeto = jsonArray_visi.getJSONObject(i);
Goles_Visi goles_visitante = new Goles_Visi(
objeto.getString("minuto"),
objeto.getString("nombre"));
goles_Visitante.add(goles_visitante);
} catch (JSONException e) {
Log.e(TAG, "Error de parsing: " + e.getMessage());
}
}
} catch (JSONException e) {
e.printStackTrace();
}
return goles_Visitante;
}
}
|