title: Calling api when button is clicked
body: <p>Hello everyone i am trying to make an app which returns the result from an api into my text view which is in my activity right now i just click on the button and the onclick listener should start working but the problem is that it is not returning anything here is the code:-
  package com.example.youtubehub;</p>
  <pre><code>import android.os.Bundle;
  import android.util.Log;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.TextView;
  import android.widget.Toast;
  
  import androidx.appcompat.app.AppCompatActivity;
  
  import com.android.volley.Request;
  import com.android.volley.Response;
  import com.android.volley.VolleyError;
  import com.android.volley.toolbox.JsonObjectRequest;
  
  import org.json.JSONException;
  import org.json.JSONObject;
  import org.w3c.dom.Text;
  
  public class Download_Page extends AppCompatActivity {
      Button download_button;
      EditText editText;
      String full_url, receive_url,title;
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_download_page);
          download_button = findViewById(R.id.download_button_1);
          TextView textView = findViewById(R.id.textView4);
          download_button.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  Toast.makeText(getApplicationContext(), &quot;working&quot;, Toast.LENGTH_LONG).show();
                  load_page();
              }
          });
  //
      }
          public void load_page()  {
              String url = &quot;https://meme-api.herokuapp.com/gimme&quot;;
              TextView textView = findViewById(R.id.textView4);
  
              JsonObjectRequest jsonObjectRequest = new JsonObjectRequest
                      (Request.Method.GET, url, null, new Response.Listener&lt;JSONObject&gt;() {
  
                          @Override
                          public void onResponse(JSONObject response) {
                              try {
                                  String answer = response.getString(&quot;title&quot;);
                                  textView.setText(answer);
                              } catch (JSONException e) {
                                  Toast.makeText(getApplicationContext(), &quot;something went wrong&quot;, Toast.LENGTH_LONG).show();
                                  Log.d(&quot;scuess&quot;, &quot;onResponse: &quot;);
  
                              }
                          }
                      }, new Response.ErrorListener() {
  
  
  
                          @Override
                          public void onErrorResponse(VolleyError error) {
                              // TODO: Handle error
  
                          }
                      });
  
  
  
  
  
      }}
  </code></pre>