Volley 正在工作,当我关闭 listData 时,没有崩溃并且工作良好,但没有 listView:
package com.example.tronksinc4d;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Context;
import android.content.Intent;
import android.database.DataSetObserver;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ListAdapter;
import android.widget.ListView;
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.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.squareup.picasso.Picasso;
import com.squareup.picasso.PicassoProvider;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
public class Home extends AppCompatActivity {
public static prefconfig prefcoonfig;
private TextView helloo;
RequestQueue requestQueue;
String url =
"https://tronksinc4d.000webhostapp.com/show_all_movies.php";
ArrayList<listitem> listmovies = new ArrayList<listitem>();
ListView listView;
TextView text_total, try_data;
@Override
`enter code here` protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
prefcoonfig = new prefconfig(this);
helloo = (TextView) findViewById(R.id.hello);
helloo.setText(" أهلا بك " + prefcoonfig.readname());
慕少森
相关分类