android - What is wrong with my layout file? Text overlaps -
my texts in layouts overlapping or , text cut off i'm not sure why, please i'm making app , i'm relatively new xml need same other text being cut off. put screenshot of layout can see text being cutoff.
here xml file:
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingleft="0dp" android:paddingright="0dp" android:paddingtop="0dp" android:paddingbottom="0dp" tools:context=".mainmenu" android:background="#ffcf688f"> <imageview android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/imageview" android:src="@drawable/menuimage" android:layout_alignbottom="@+id/tobattlebutton" /> <imageview android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/imageview2" android:src="@drawable/menuimage" android:layout_alignparenttop="true" android:layout_alignparentleft="true" android:layout_alignparentstart="true"/> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="store" android:id="@+id/store" android:layout_centervertical="true" android:layout_alignparentleft="true" android:layout_alignparentstart="true" android:textcolor="@android:color/white" android:textsize="60sp" /> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="battle" android:id="@+id/battle" android:layout_centervertical="true" android:layout_alignparentright="true" android:layout_alignparentend="true" android:textcolor="@android:color/white" android:textsize="60sp"/> <button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/tostorebutton" android:background="@android:color/transparent" android:layout_centervertical="true" android:layout_alignparentleft="true" android:layout_alignparentstart="true"/> <button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/tobattlebutton" android:layout_aligntop="@+id/tostorebutton" android:layout_alignparentright="true" android:layout_alignparentend="true" android:layout_alignparentbottom="true" android:layout_alignleft="@+id/battle" android:layout_alignstart="@+id/battle" android:background="@android:color/transparent" android:singleline="false"/> <linearlayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_below="@+id/imageview2" android:layout_centerhorizontal="true" android:weightsum="5" android:paddingbottom="15dp"> <linearlayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="new text" android:id="@+id/menutext1" android:editable="true" android:textsize="20sp" android:textcolor="#ff9cf8ff" android:textalignment="center" android:layout_gravity="center" /> </linearlayout> <linearlayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="new text" android:id="@+id/menutext2" android:textsize="20sp" android:textcolor="#ff9cf8ff" android:layout_gravity="center" android:textalignment="center" /> </linearlayout> <linearlayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="new text" android:id="@+id/menutext3" android:textsize="20sp" android:textcolor="#ff9cf8ff" android:layout_gravity="center" android:textalignment="center" /> </linearlayout> <linearlayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="new text" android:id="@+id/menutext4" android:textsize="20sp" android:textcolor="#ff9cf8ff" android:layout_gravity="center" android:textalignment="center" /> </linearlayout> <linearlayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="new text" android:id="@+id/menutext5" android:textsize="20sp" android:textcolor="#ff9cf8ff" android:layout_gravity="center" android:textalignment="center" android:paddingtop="1dp"/> </linearlayout> </linearlayout>
trying using linearlayout instead of relativelayout.
Comments
Post a Comment