title: Transparent View over ImageView
body: <p>I'm blocked there. I'm trying to put a transparent View over a background.
  I've tried several methods.</p>
  
  <p>throught XML with:</p>
  
  <pre><code>android:background="@color/transparent"
  </code></pre>
  
  <p>or</p>
  
  <pre><code>android:color="#80000000"  
  </code></pre>
  
  <p>or putting a reference to color.xml file as so</p>
  
  <pre><code>&lt;resources&gt;
      &lt;color name="transp"&gt;#80000000&lt;/color&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>with my layout.xml like this</p>
  
  <pre><code>android:background="@color/transp"
  </code></pre>
  
  <p>I've also tried to do it by generated code</p>
  
  <pre><code>myView.getBackground().setAlpha(45);
  </code></pre>
  
  <p>or</p>
  
  <pre><code>myViewm.setBackgroundResource(R.color.trans);
  </code></pre>
  
  <p>I've seen some posts related, but none of the answers worked.</p>
  
  <p>Besides which is even stranger is that all of these solutions seems to wrok fine on the GraphicalLayout in Eclipse.
  But when I launch my device, the screen remains not transparent.I've drawn a line on that view to make sure that something happens; and the line does show.</p>
  
  <p>here is my layout.xml</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      tools:context=".MainActivity" &gt;
  
        &lt;ImageView
          android:id="@+id/backgroundview"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:src="@drawable/space_bg"
          android:contentDescription="@string/desc" /&gt;
  
        &lt;View 
          android:id="@+id/tileview"        
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"/&gt;&lt;!-- 
          android:background="@color/transp"/&gt;--&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>and my code</p>
  
  <pre><code>private ImageView bg;
      MyView tV;
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState)
      {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  
          tV = new MyView(this);
  
  setContentView(tV);
  </code></pre>
  
  <p>}</p>
  
  <p>and the myView onDraw</p>
  
  <pre><code>@Override
      protected void onDraw(Canvas canvas)    
      {
  
          super.onDraw(canvas);
          this.setBackgroundResource(R.color.transp);
          canvas.drawLine(10,20,30,40, paint);
  
      }
  </code></pre>
  
  <p>So,  where am I wrong?
  Thanks!!!</p>