title: the tab screen appears blank activity
body: <pre><code>public class SongsTab extends Fragment {
      private ArrayList&lt;songInfo&gt; _songs = new ArrayList&lt;songInfo&gt;();
      RecyclerView recyclerView;
      SeekBar seekBar;
      songAdapter songAdapter1;
      MediaPlayer mediaPlayer;
      private Handler myHandler = new Handler();
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          View v = inflater.inflate(R.layout.fragment_main, container, false);
          recyclerView = (RecyclerView)v. findViewById(R.id.recyclerView);
          CardView cardView = (CardView) v.findViewById(R.id.card);
          seekBar = (SeekBar) v.findViewById(R.id.seekBar);
          songAdapter1 = new songAdapter(getActivity(),_songs);
          recyclerView.setAdapter(songAdapter1);
          LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
          DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(recyclerView.getContext(),
                  linearLayoutManager.getOrientation());
          recyclerView.setLayoutManager(linearLayoutManager);
          recyclerView.addItemDecoration(dividerItemDecoration);
          songAdapter1.setOnItemClickListener(new songAdapter.OnItemClickListener() {
              @Override
              public void onItemClick(RecyclerView.ViewHolder holder, View view, final songInfo obj, int position) {
                  if(mediaPlayer.isPlaying()){
                      mediaPlayer.stop();
                      mediaPlayer.reset();
                      mediaPlayer.release();
                      mediaPlayer = null;
  
                  }else {
  
                      Runnable runnable = new Runnable() {
                          @Override
                          public void run() {
                              try {
                                  mediaPlayer = new MediaPlayer();
                                  mediaPlayer.setDataSource(obj.getSongUrl());
                                  mediaPlayer.prepareAsync();
                                  mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
                                      @Override
                                      public void onPrepared(MediaPlayer mp) {
                                          mp.start();
                                          seekBar.setProgress(0);
                                          seekBar.setMax(mediaPlayer.getDuration());
                                          Log.d("Prog", "run: " + mediaPlayer.getDuration());
                                      }
                                  });
                                  Log.i("devesh","vikas");
  
  
  
                              }catch (Exception e){}
                          }
  
                      };
                      myHandler.postDelayed(runnable,100);
  
                  }
              }
          });
          checkUserPermission();
  
          Thread t = new runThread();
          t.start();
          return v;
      }
  
      public class runThread extends Thread {
  
  
          @Override
          public void run() {
              while (true) {
  
                  try {
                      Thread.sleep(1000);
                  } catch (InterruptedException e) {
                      e.printStackTrace();
                  }
                  Log.d("Runwa", "run: " + 1);
                  if (mediaPlayer != null) {
                      seekBar.post(new Runnable() {
                          @Override
                          public void run() {
                              seekBar.setProgress(mediaPlayer.getCurrentPosition());
                          }
                      });
  
                      Log.d("Runwa", "run: " + mediaPlayer.getCurrentPosition());
                  }
              }
          }
  
      }
  
      private void checkUserPermission(){
          if(Build.VERSION.SDK_INT&gt;=23){
              if(ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.READ_EXTERNAL_STORAGE)
                      != PackageManager.PERMISSION_GRANTED){
                  requestPermissions(new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},123);
                  return;
              }
          }
          loadSongs();
      }
  
      @Override
      public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
          switch (requestCode){
              case 123:
                  if (grantResults[0] == PackageManager.PERMISSION_GRANTED){
                      loadSongs();
                  }else{
                      Toast.makeText(getContext(), "Permission Denied", Toast.LENGTH_SHORT).show();
                      checkUserPermission();
                  }
                  break;
              default:
                  super.onRequestPermissionsResult(requestCode, permissions, grantResults);
  
          }
  
      }
  
      private void loadSongs(){
          Uri uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
          String selection = MediaStore.Audio.Media.IS_MUSIC+"!=0";
          Cursor cursor = getContext().getContentResolver().query(uri,null,selection,null,null);
          if(cursor != null){
              if(cursor.moveToFirst()){
                  do{
                      String name = cursor.getString(cursor.getColumnIndex(MediaStore.Audio.Media.ALBUM));
                      String artist = cursor.getString(cursor.getColumnIndex(MediaStore.Audio.Media.ARTIST));
                      String url = cursor.getString(cursor.getColumnIndex(MediaStore.Audio.Media.DATA));
  
                      songInfo s = new songInfo(name,artist,url);
                      _songs.add(s);
                      songAdapter1.notifyDataSetChanged();
                  }while (cursor.moveToNext());
              }
  
              cursor.close();
              songAdapter1 = new songAdapter(getActivity(),_songs);
  
          }
      }
  }
  </code></pre>
  
  <p>I m trying to get list of song in tab activity but when app runs it appears blank and says:</p>
  
  <blockquote>
    <p>no adapter attached, skipping layout </p>
  </blockquote>
  
  <p>But when I run the same code in other project without tab activity it works fine. Please help. Let me know if you want other details.</p>
  
  <p>This is my logact:</p>
  
  <blockquote>
    <p>No adapter attached; skipping layout 01-04
    02:56:42.346 24747-24775/com.example.murarilal.musicmania
    E/EGL_emulation: tid 24775: eglSurfaceAttrib(1223): error 0x3009
    (EGL_BAD_MATCH) 01-04 02:56:42.346
    24747-24775/com.example.murarilal.musicmania W/OpenGLRenderer: Failed
    to set EGL_SWAP_BEHAVIOR on surface 0x9e211d00, error=EGL_BAD_MATCH
    01-04 02:56:42.352 24747-24747/com.example.murarilal.musicmania
    I/Choreographer: Skipped 33 frames!  The application may be doing too
    much work on its main thread. 01</p>
  </blockquote>