title: Image not showing up in launch screen Android Studio
body: <p>I have a project to do that involves downloading images from the internet with asyncTask with a progressbar at the bottom of the image and an infinite loop so it continues to through the images. When I run my code it says it was successful but the images are not showing up in the Android Emulator. If anyone could help that would great, thank you.
  This is the code for mainActivity.java:</p>
  <pre><code>public class MainActivity extends AppCompatActivity {
  
  String url = &quot;https://cataas.com/cat&quot;;
  private static XmlPullParser xpp;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
  ProgressBar progressBar = findViewById(R.id.progress_bar);
      progressBar.setVisibility(View.VISIBLE);
      progressBar.setProgress(0);
  
  }
  
  ImageView imageView;
  
  public void Loading (View view) {
  
      CatImages catImages = new CatImages();
  
      imageView = findViewById(R.id.imgView);
  
  
      try {
  
          Bitmap bitmap = catImages.execute(url).get();
  
          bitmap = catImages.execute(url).get();
  
          imageView.setImageBitmap(bitmap);
  
      } catch (ExecutionException e) {
          e.printStackTrace();
  
      } catch (InterruptedException e) {
          e.printStackTrace();
      }
   }
  
   class CatImages extends AsyncTask&lt;String, Void, Bitmap&gt; {
  
  
      @Override
      protected Bitmap doInBackground(String... strings) {
          Bitmap bitmap = null;
  
  
          URL url;
  
          HttpURLConnection httpURLConnection;
  
          InputStream in;
  
          try {
  
  
              url = new URL(strings[0]);
  
              httpURLConnection = (HttpURLConnection) 
  url.openConnection();
  
              in = httpURLConnection.getInputStream();
  
              bitmap = BitmapFactory.decodeStream(in);
  
              while (true) { }
  
          } catch (MalformedURLException e) {
              e.printStackTrace();
          } catch (IOException e) {
              e.printStackTrace();
  
          }
  
  
          return bitmap;
  
      }
    }
  }
  </code></pre>
  <p>enter code here</p>