Android : Missed a } and/or ) on if/else

on Sunday, September 21, 2014


I missed a } and/or ) at the end of the code, I tried so many times but I didn't get it, can someone know?



doclink.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
if(!uri.contains("https://www.facebook.com/")) {
String natgeo = "natgeo";
String uri = "fb://Page/" + natgeo;
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(intent);
}
else{
String natgeo = "natgeo";
String uri = "https://www.facebook.com/" + natgeo;
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(i);
}
};

0 comments:

Post a Comment