title: Android create ID programmatically
body: <p>I am looking for creating ID in code without using XML declaration. For example, I have code, where I programmatically create View like this</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
  
    super.onCreate(savedInstanceState);
    setContentView(R.layout.new_layout);
  
    LinearLayout ll = (LinearLayout)findViewById(R.id.layout);
    View v = new View(this);
    v.setBackgroundColor(0xFFFF0000);
    ll.addView(v, 100, 100);
  
  }
  </code></pre>
  
  <p>and I can add <code>v.setId(50)</code>, but I would like add <code>v.setId(R.id.some_id)</code> and I wouldn't like add <code>some_id</code> into xml file, this option I know. </p>
  
  <p>My question is, how to create <code>R.id.some_id</code> programmatically without setting it in XML file. Thanks</p>