jeudi 18 décembre 2014

How can I use many if in one time? [on hold]

Firsty Excuse me Guys for my bad english..


I have a list box and There have many position.. I triend a code like this



super.onListItemClick(l, v, position, id);
if (position == 0)
{
if (checkInternetConnection())
{
wvbrowser =(WebView)findViewById(R.id.wvbrowser);
wvbrowser.setWebViewClient(new wvwebClient());
wvbrowser.loadUrl("http://ift.tt/1ma954c");
}
else
{
Toast.makeText(adana.this,"Lütfen İnternet Bağlantınızı Kontrol Ediniz.",Toast.LENGTH_LONG ).show();
}
}
else if(position == 1)
{

}


but İt's failed


I also tried a absurd code here, İt's failed too..



super.onListItemClick(l, v, position, id);
if (position == 0 && checkInternetConnection())
{
wvbrowser =(WebView)findViewById(R.id.wvbrowser);
wvbrowser.setWebViewClient(new wvwebClient());
wvbrowser.loadUrl("http://ift.tt/1ma954c");
}

else
{
Toast.makeText(adana.this,"Lütfen İnternet Bağlantınızı Kontrol Ediniz.",Toast.LENGTH_LONG ).show();
}\

else if
{

}


Damnn.. How can I do this ? I hope you all understand I mean...


Aucun commentaire:

Enregistrer un commentaire