package com.example.layoutsproject;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class MainActivity extends AppCompatActivity {

    String[] predmeti = {"PIA", "PKI", "PMU", "KDP", "ASP"};

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_list);

        ArrayAdapter adapter = new ArrayAdapter(this, R.layout.list_item, predmeti);

        ListView lv = findViewById(R.id.listView);
        lv.setAdapter(adapter);
    }
}