Note that there are some explanatory texts on larger screens.

plurals
  1. PObreakpoint is hitting twice in eclipse
    primarykey
    data
    text
    <p>I have this problem with the break point I have set.I have created a small application in android and I want to display the result in one activity , but the thing is the result is getting displayed as null value always ,I have put a break point to find the bug and I have found the issue here as it is hitting the break point twice , during the first time it is working on debugging but it again hitting the break point i don't know why? then I am getting a null value, I know I have done some mistake somewhere , So please i need some help to solve the issue. </p> <p>giving my java class below</p> <pre><code> public class ShowScoreActivity extends Activity { Bundle getBundle; int score; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.score_form); TextView txtScore; txtScore=(TextView)findViewById(R.id.txtScore); **breakpoint here --&gt;** Bundle extras=getIntent().getExtras(); if(extras != null) { score=extras.getInt("finalScore"); txtScore.setText(txtScore.getText().toString()+ " "+ score); } Button btnOk = (Button) findViewById(R.id.btnOk); btnOk.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub final Dialog dialog=new Dialog(ShowScoreActivity.this); dialog.setContentView(R.layout.thank_you_dialog); dialog.setTitle("Quiz over !"); dialog.show(); Button btnOk=(Button)dialog.findViewById(R.id.btnThanks); btnOk.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub dialog.dismiss(); Intent in = new Intent(ShowScoreActivity.this, MainActivity.class); startActivity(in); } }); } }); } } </code></pre> <p>Main activity java classs</p> <p>public class MainActivity extends Activity {</p> <pre><code>DbCreation dbcr; Button btnStart; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); btnStart=(Button)findViewById(R.id.idHomBtn); btnStart.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub Intent in=new Intent(MainActivity.this,ShowQuizActivity.class); startActivity(in); } }); } </code></pre> <p>}</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload