title: How to pass value through Intent
body: <p>HI all,
  this is my class A, where on button click , i m sending a int variable to class B</p>
  
  <pre><code>Intent bgIntent = new Intent(Background.this, MainScreen.class);
  bgIntent.putExtra("background",  bgColor);
  startActivity(bgIntent);
  </code></pre>
  
  <p>and on class B</p>
  
  <pre><code>Intent bgIntent = getIntent();
  bgGlobal = bgIntent.getIntExtra("background",-1 );
  
  if(bgGlobal == 0) 
  {
     DetailsTextView.setBackgroundResource(R.color.a0);
  }
  else 
      if(bgGlobal == 1)
      {
          DetailsTextView.setBackgroundResource(R.color.a1);
      }
  </code></pre>
  
  <p>But the problem is i am getting a blank view.My view is not coming up with textview.
  is this proper to set background</p>
  
  <p>"DetailsTextView.setBackgroundResource"???</p>