how could i set the class ,when irunthe app,it will runthis main activity.notother class
this is an android app with android studio .
package com.example.myapplication;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ListView;
public class PlayerActivity2 extends AppCompatActivity {
ListView simpleList;
String SerialNo[] = {"1", "2", "3", "4", "5", "6","7","8","9","10"};
int flags[] = {R.drawable.image1, R.drawable.image2, R.drawable.image3, R.drawable.image4, R.drawable.image5, R.drawable.image6, R.drawable.image7, R.drawable.image8, R.drawable.image9, R.drawable.image10};
String Names[] = {"mmm", "nnn", "aaa.", "bbb", "ccc", "ddd","eee jk"," ijk","Virgil jk","gil jklk"};
String Score[] = {"1", "2","3", "5", "4", "3","5","5","5","5"};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity2);
simpleList = (ListView)findViewById(R.id.simpleListView);
//ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this, R.layout.activity_listview, R.id.textView, countryList);
//simpleList.setAdapter(arrayAdapter);
CustomAdapter customAdapter = new CustomAdapter(getApplicationContext(),simpleList,SerialNo, flags,Names, Score);
simpleList.setAdapter(customAdapter);
}
}
xml file :
<?xml version="1.0" encoding="utf-8"?
==================
how could i set the class ,when irunthe app,it will runthis main activity.notother class ?
Step by step
Solved in 2 steps