title: Android creating a view and positioning it through java
body: <p>so I'm trying to figure out how to create a basic view and position it directly in the center of the screen using java code and not the xml. I've been able to create the view, but I can't seem to get the positioning right, every time I try something it just stays in the top left corner. </p>
  
  <p>Just to clearify what I mean by view, in xml it's just called a view, it does not include text or images or anythign, I just need a square that has a colored background.</p>
  
  <p>Hopefully someone can help me with the steps of creating this properly and positioning it correctly in the center.</p>