I have following compose view in my android app

As you can see there is a number just above the text view at the bottom. This number indicates the current text length.
I just cannot figure out how to put the number on the right side. Another problem is that when the text field expands, it hides the length indicator. So the grey layer goes obove the number.
<RelativeLayout
xmlns:a="http://schemas.android.com/apk/res/android"
a:layout_width="fill_parent"
a:layout_height="fill_parent"
a:background="#ffffff" >
<LinearLayout
a:layout_width="fill_parent"
a:layout_height="wrap_content"
a:orientation="horizontal"
a:paddingBottom="5dip"
a:paddingLeft="5dip"
a:paddingRight="5dip"
a:paddingTop="5dip" >
<MultiAutoCompleteTextView
a:id="@+id/recipientBody"
a:layout_width="0dip"
a:layout_height="wrap_content"
a:layout_weight="1.0"
a:hint="@string/sms_to_whom"
a:maxLines="10"
a:nextFocusRight="@+id/smsRecipientButton" />
<LinearLayout
a:layout_width="wrap_content"
a:layout_height="fill_parent"
a:orientation="vertical" >
<Button
a:id="@+id/smsRecipientButton"
a:layout_width="wrap_content"
a:layout_height="0dip"
a:layout_marginLeft="5dip"
a:layout_weight="1.0"
a:enabled="true"
a:nextFocusLeft="@+id/recipientBody"
a:onClick="onPickContact"
a:text="@string/sms_contacts" />
</LinearLayout>
</LinearLayout>
//************
<LinearLayout
a:layout_width="wrap_content"
a:layout_height="fill_parent"
a:layout_marginBottom="65dip"
a:layout_marginLeft="10dip"
a:gravity="bottom"
a:orientation="vertical" >
<TextView
android:id="@+id/chars"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="" />
</LinearLayout>
//************
<LinearLayout
a:layout_width="fill_parent"
a:layout_height="wrap_content"
a:layout_alignParentBottom="true"
a:background="#9c9e9c"
a:orientation="horizontal"
a:paddingBottom="5dip"
a:paddingLeft="5dip"
a:paddingRight="5dip"
a:paddingTop="5dip" >
<EditText
a:id="@+id/smsBody"
a:layout_width="0dip"
a:layout_height="wrap_content"
a:layout_weight="1.0"
a:autoText="true"
a:capitalize="sentences"
a:hint="@string/sms_enter_message"
a:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"
a:nextFocusRight="@+id/send_button" />
<LinearLayout
a:layout_width="wrap_content"
a:layout_height="fill_parent"
a:orientation="vertical" >
<Button
a:id="@+id/smsSendButton"
a:layout_width="wrap_content"
a:layout_height="0dip"
a:layout_marginLeft="5dip"
a:layout_weight="1.0"
a:enabled="false"
a:nextFocusLeft="@+id/smsBody"
a:text="@string/sms_send_abbr" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
I marked the indicator with //************ . What do I have to change in that layout file to place the indicator on the right side and to avoid overlapping?
First, give an id to your bottom LinearLayout.
Then, add:
a:layout_above="@+id/lowerLinearLayout"a:layout_alignParentRight="true"
inside the definition of the LinearLayout for your indicator view.