How in Android do I centre text that changes per second?
<p>I've got some Android code that works fine to make a piece of text count down...</p>

<pre><code>final TextView mTextField = new TextView(this);

            mTextField.setTextColor(Color.RED);
            mTextField.setTextSize(25);
            mTextField.setTypeface(tf);
            final Handler handler = new Handler();
            final Runnable r = new Runnable() {
                public void run() {

                    mTextField.setText("Days : " + getTimes()[0] + " Hours : "
                            + getTimes()[1] + " Minutes : " + getTimes()[2]
                            + " Seconds : " + getTimes()[3]);

                    handler.postDelayed(this, 1000);

                }
            };

            handler.postDelayed(r, 1000);
            setContentView(mTextField);
</code></pre>

<p>The problem I have is, I can't format this text in anyway, I want it to be like exact centre of the screen, but as the text is actually in Java rather than XML, how would I go about say embedding this inside a relativeLayout so I can control the location of where the text is printed to the screen?</p>

<p>Thanks,</p>
