title: How to get current content view in Android programming?
body: <p>I know that I can set the content of the view in an Android app by saying setContentView(int). Is there a function I can use to know what the current content view is? I don't know if that makes any sense, but what I'm looking for is a function called, say, getContentView that returns an int.</p>
  
  <p>Ideally, it would look like this:</p>
  
  <pre><code>setContentView(R.layout.main); // sets the content view to main.xml
  int contentView = getContentView(); // does this function exist?
  </code></pre>
  
  <p>How would I do that?</p>