Android cannot use CustomAdapter in Listview : I am new in Android programming and I am about to create listview app that will show the list of movies with pics, titles, ratings, and genres. When I run the app I see the white screen, that is empty. There is no problem wth layouts, I have created two layouts, one is activity_main and another one is custom_layout.

MainActivity.java

    import android.support.v7.app.AppCompatActivity;
    import android.os.Bundle;
    import android.support.v7.widget.ListViewCompat;
    import android.widget.ArrayAdapter;
    import android.widget.ListView;
    import java.util.ArrayList;
    import java.util.Arrays;

    public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        int[] images = {R.drawable.dfg,R.drawable.godf,R.drawable.godf2,R.drawable.thedark,R.drawable.twelv,R.drawable.shindl};
        String[] movie_titles = getResources().getStringArray(R.array.Movie_titles);
        String[] movie_ratings=getResources().getStringArray(R.array.Movie_ratings);
        String[] movie_janrs=getResources().getStringArray(R.array.Movie_janrs);
        setContentView(R.layout.activity_main);
        ListView mylist = (ListView) findViewById(R.id.list);
        ArrayList<String> rowItems = new ArrayList<>();
        ArrayAdapter<String> myadapter = new ArrayAdapter<>
    (this,android.R.layout.simple_list_item_1,rowItems);
        if(mylist!=null){
            mylist.setAdapter(myadapter);
        }
    }
    }

CustomAdapter.java

    import android.content.Context;
    import android.support.annotation.IdRes;
    import android.support.annotation.LayoutRes;
    import android.support.annotation.NonNull;
    import android.support.annotation.Nullable;
    import android.view.LayoutInflater;
    import android.view.View;
    import android.view.ViewGroup;
    import android.widget.ArrayAdapter;
    import android.widget.BaseAdapter;
    import android.widget.ImageView;
    import android.widget.TextView;
    import java.util.ArrayList;
    import java.util.List;
    public class CustomAdapter extends ArrayAdapter<RowItem> {


    public CustomAdapter(@NonNull Context context, @LayoutRes int resource, @NonNull List<RowItem> objects) {
        super(context, resource, objects);
    }

    @NonNull
    @Override
    public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
        RowItem rowItem = getItem(position);
        if(convertView ==null){
            LayoutInflater vi = LayoutInflater.from(getContext());
            convertView = vi.inflate(R.layout.custom_layout,null);
            //convertView = LayoutInflater.from(getContext()).inflate(R.layout.custom_layout,parent,false);
        }
        if(rowItem!=null){
            ImageView tvImage = (ImageView) convertView.findViewById(R.id.shekil);
            TextView tvTittle = (TextView) convertView.findViewById(R.id.ad);
            TextView tvRating = (TextView) convertView.findViewById(R.id.rating);
            TextView tvJanr = (TextView) convertView.findViewById(R.id.janr);
            if(tvImage!=null && tvTittle!=null && tvRating!=null && tvJanr!=null){
                tvImage.setImageResource(rowItem.getImages());
                tvTittle.setText(rowItem.getMovie_titles());
                tvRating.setText(rowItem.getMovide_ratings());
                tvJanr.setText(rowItem.getMovide_janrs());
            }
        }

        return convertView;
    }

RowItem.java

    public class RowItem {
        int images;
        String movie_titles;
        String movide_ratings;
        String movide_janrs;

    public RowItem(int images, String movie_titles, String movide_ratings, String movide_janrs) {
        this.images = images;
        this.movie_titles = movie_titles;
        this.movide_ratings = movide_ratings;
        this.movide_janrs = movide_janrs;
    }

    public int getImages() {
        return images;
    }

    public String getMovie_titles() {
        return movie_titles;
    }

    public String getMovide_ratings() {
        return movide_ratings;
    }


    public String getMovide_janrs() {
        return movide_janrs;
    }

    }