Click here to Skip to main content
15,907,913 members

Comments by C0DE_007 (Top 70 by date)

C0DE_007 2-Apr-16 15:27pm View    
i also try to use onNewIntent but after click app crash

protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
getIntent();
String restaurant_name = intent.getStringExtra("restaurant_name");
Toast.makeText(MainActivity.this, restaurant_name, Toast.LENGTH_LONG).show();
if(restaurant_name != null ) {
if (restaurant_name.equals("Romys")) {
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(26.89209, 75.82759), 15.0f)); // App crash show error here

}else {
Toast.makeText(MainActivity.this,"It was not", Toast.LENGTH_LONG).show();
}
}
C0DE_007 2-Apr-16 15:17pm View    
Sir as u said i put getIntent() in onCreate but app is crashing
C0DE_007 26-Mar-16 7:28am View    
oh srry .. on this line mMap.animateCamera(location); it showing error
C0DE_007 17-Mar-16 14:11pm View    
Is this is right ?

for (int x = 0; x < mainListView.getChildCount(); x++) {
checkbox = (CheckBox) mainListView.getChildAt(x).findViewById(R.id.checkBox1);
if (checkbox.isChecked() ) {
getFood();
}
checkbox1 = (CheckBox) mainListView.getChildAt(x).findViewById(R.id.checkBox1);
if (checkbox1.isChecked()) {
Veg();
}
checkbox2 = (CheckBox) mainListView.getChildAt(x).findViewById(R.id.checkBox1);
if (checkbox2.isChecked()) {
NonVeg();
}
checkbox3 = (CheckBox) mainListView.getChildAt(x).findViewById(R.id.checkBox1);
if (checkbox3.isChecked()) {
Drinks();
} else {
getFood();

}
}
C0DE_007 17-Mar-16 14:09pm View    
checkbox = (CheckBox) mainListView.getChildAt(0);
checkbox1 = (CheckBox) mainListView.getChildAt(1);
checkbox2 = (CheckBox) mainListView.getChildAt(2);
checkbox3 = (CheckBox) mainListView.getChildAt(3);