trying to store objects in an ArrayList as a reference
<p>Here is my array</p>

<pre><code>arrayLayout = new ArrayList&lt;LinearLayout&gt;();
</code></pre>

<p>I'm adding my linearLayouts in a loop using</p>

<pre><code>arrayLayout.add(info);
</code></pre>

<p>And I'm trying to remove the layout using the following in a method</p>

<pre><code>arrayLayout.get(gallery.getSelectedItemPosition()).setVisibility(View.GONE);
</code></pre>

<p>But it doesnt do anything. I think it's because I'm not referencing the object properly.
Should I be referencing object using an Array instead of an ArrayList? If so, how do I do it?</p>
