kendi projemde kullanmıştım işini görür
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final ListView listview = (ListView) findViewById(R.id.Status);
listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
String result = "";
if (position==0) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
ScanResult accesPoint = null;
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(), Ekran_1.class);
startActivity(intent);
}});
alert.setPositiveButton("İptal", null);
alert.show();
} else {
if (position == 1) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 2) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 3) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(), Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 4) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 5) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position ==6) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(), Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 7) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 8) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 8) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 9) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 10) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 11) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 12) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 13) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 14) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 15) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 16) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 17) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 18) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 19) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}else {
if (position == 20) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(R.string.izle);
alert.setMessage(R.string.mesaj);
alert.setIcon(R.mipmap.ic_launcher);
alert.setNeutralButton(R.string.izleme, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(getApplicationContext(),Ekran_1.class);
startActivity(intent);
}
});
alert.setPositiveButton("İptal", null);
alert.show();
}}}}}}}}}}}}}}}}}}}}}}
}
private int randomResult(String result) {
return 0;
}
});
}