title: How use a variable List<Object> that refers more CONSTANT List<Object>
body: <ol>
  <li><p>Opening the activity there is the list with the first listView. The list is a copy of a Constant list copied with <code>new ArrayList&lt;&gt;(Constants.FIRST)</code>.</p></li>
  <li><p>I clear the (activity) list and refer to the second list with <code>list = new ArrayList(Constants.SECOND);</code>, notify the adapter but is empty.</p></li>
  <li><p>Return back to the first list the list is again empty.</p></li>
  </ol>
  
  <p>This is the code that I used</p>
  
  <pre><code>public class Activity extends AppCompatActivity{
      private List&lt;Object&gt; list; //tried also... = new ArrayList&lt;&gt;;
      private boolean boo;
      private ObjectAdapter adapter;
      @Override
      protected void onCreate(Bundle saveInstanceState) {
          super.onCreate(saveInstanceState);
          setContentView(R.layout.list_view);
  
          getSupportActionBar().setDisplayHomeAsUpEnabled(true);
          ListView listView = (ListView) findViewById(R.id.list);
          list = new ArrayList&lt;&gt;(Constants.FIRST);
          adapter = new ObjectAdapter(this, list);
          listView.setAdapter(adapter);
          listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
              @Override
              public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
                  if (boo){
                     newIntent(position);
                  }
                  else {
                      secondList(position);
                  }
              }
          });
      }
  public void newIntent(int position){
          startActivity(new Intent(this, Activity2.class);
      }
  
      public void secondList(int position){
          list.clear();
          list = new ArrayList&lt;&gt;(Constants.SECOND);
          adapter.notifyDataSetChanged();
          boo = true;
      }
  
      @Override
      public void onBackPressed() {
          if (boo) {list.clear(); list = new ArrayList&lt;&gt;(Constants.FIRST); adapter.notifyDataSetChanged(); boo=false;}
          else {finish();}
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          switch (item.getItemId()) {
              case android.R.id.home:
                  onBackPressed();
                  return true;
          }
  
          return (super.onOptionsItemSelected(item));
      }
  }
  </code></pre>
  
  <p>And this is the constant List</p>
  
  <pre><code>public interface Constants {
  
      List&lt;Object&gt; FIRST= new ArrayList&lt;Object&gt;(){{
          add (new Object(0, 1, "Good"));
          add (new Object(1, 1, "Ok"));
  
      List&lt;Object&gt; SECOND= new ArrayList&lt;Object&gt;(){{
          add (new Object(0, 2, "First"));
          add (new Object(1, 2, "Second"));
  </code></pre>