http://oi41.tinypic.com/2z6tuh5.jpg
In this picture, the orange thing is supposed to be the letter A, but it constantly gets cut-off by the background of the parent layout. Anyone have any idea what might be causing this, and how to fix it. I tried experimenting with different layouts and stuff, but it always gets cut off.
And BTW it's not padding, I checked.
Here's the code for the activity `
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#16467A"
android:orientation="vertical"
android:padding="10dp" >
<LinearLayout
android:id="@+id/liniar"
android:layout_width="205dp"
android:layout_height="190dp"
android:layout_alignLeft="@+id/btn_ok"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="false"
android:background="@drawable/kvadrat"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="204dp"
android:layout_height="140dp"
android:layout_gravity="top" >
<TextView
android:id="@+id/graph1"
android:layout_width="30dp"
android:layout_height="120dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="false"
android:layout_centerVertical="true"
android:layout_marginLeft="9dp"
android:background="#00a313"
android:gravity="center"
android:text="1"
android:textColor="@android:color/white"
android:textSize="20dip" />
<TextView
android:id="@+id/graph2"
android:layout_width="30dp"
android:layout_height="140dp"
android:layout_alignParentBottom="true"
android:layout_centerVertical="true"
android:layout_marginLeft="14dp"
android:layout_toRightOf="@+id/graph1"
android:background="#00a313"
android:gravity="center"
android:text="2"
android:textColor="@android:color/white"
android:textSize="20dip" />
<TextView
android:id="@+id/textView1"
android:layout_width="30dp"
android:layout_height="80dp"
android:layout_alignParentBottom="true"
android:layout_centerVertical="true"
android:layout_marginLeft="14dp"
android:layout_toRightOf="@+id/graph2"
android:background="#00a313"
android:gravity="center"
android:text="3"
android:textColor="@android:color/white"
android:textSize="20dip" />
<TextView
android:id="@+id/graph4"
android:layout_width="30dp"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:layout_marginLeft="14dp"
android:layout_toRightOf="@+id/textView1"
android:background="#00a313"
android:gravity="center"
android:text="4"
android:textColor="@android:color/white"
android:textSize="20dip" />
</RelativeLayout>
<LinearLayout
android:layout_width="204dp"
android:layout_height="50dp"
android:layout_margin="10dp"
android:orientation="horizontal" >
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:text="A"
android:textColor="#DCA601"
android:textSize="25dp"
android:textStyle="bold"
android:typeface="normal" />
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/btn_ok"
android:layout_width="204dp"
android:layout_height="40dp"
android:layout_below="@+id/liniar"
android:layout_marginTop="10dp"
android:background="@drawable/kvadrat"
android:clickable="true"
android:text="ОК"
android:textColor="#FFFFFF"
android:textStyle="bold" />
</LinearLayout>`
And here's the kvadrat.9.png which is used for the background of one of the components. http://oi42.tinypic.com/rssc3p.jpg
It looks all fine in the XML editor, but when I actually compile it in Virtual machine, the textview becomes half-hidden.
EDIT: Nevermind, this post Why nine-patch image in RelativeLayour hides all inner elements? helped me find the mistake. I hadn't configured my 9patch file correctly.