XML Android align TextView -


this first try create android application.
trying create layout right , stuck allready.
here trying accomplish:

         jaarverbruik          2013 - 2014 afrekendatum         peildatum 

so, word afrekendatum should aligned left, word peildatum should aligned right of screen.

this current code:

<?xml version="1.0" encoding="utf-8"?>  <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingleft="16dp" android:paddingright="16dp" >  <textview     android:id="@+id/periode"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_centerhorizontal="true"     android:textsize="20sp"     android:text="@string/periode" />  <textview     android:id="@+id/afrekendatum"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_below="@+id/periode"     android:layout_alignparentleft="true"     android:text="@string/afrekendatum" />  <textview     android:id="@+id/peildatum"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_below="@+id/periode"     android:layout_torightof="@id/afrekendatum"     android:layout_alignparentright="true"     android:text="@string/peildatum" />  </relativelayout> 

sadly, words displayed directly behind each other.
best way fix this?

you don't need android:layout_torightof="@id/afrekendatum" because have declared android:layout_alignparentright="true". remove , work fine.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -