Android Studio Fix text overlay

0

I have a problem in my code in adroid studio, in my layout it's all perfect as I want it but when I pass it to the tablet the description text and unit cost overlap one another, below it will appear text of products and these too The same thing happens to them. I have tried several things, change in text and design but I have not been able to solve it.

Thank you very much.

 <RelativeLayout
    android:id="@+id/create_replen_request_header_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/app_replen_color"
    android:paddingTop="10dp"
    android:paddingLeft="265dp"
    android:paddingRight="265dp"
    android:paddingBottom="10dp">

    <TextView
        android:id="@+id/create_replen_request_products_required_header_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:text="@string/create_replen_request_products_required_text"
        android:textColor="@color/app_white_color"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <TextView
        android:id="@+id/add_call_products_description_textview"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/create_replen_request_products_required_header_text"
        android:layout_below="@+id/create_replen_request_products_required_header_text"
        android:layout_marginTop="5dp"
        android:layout_marginLeft="60dp"
        android:text="@string/create_replen_request_description_text"
        android:textColor="@color/app_white_color"
        android:textAppearance="?android:attr/textAppearanceMedium" />

    <ImageButton
        android:id="@+id/create_replen_request_add_product_btn"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/add_call_products_description_textview"
        android:layout_alignParentRight="true"
        android:layout_alignTop="@+id/create_replen_request_products_required_header_text"
        android:src="@drawable/add_item"
        android:padding="5dp"
        android:contentDescription="@string/create_add_product_btn_desc"
        android:background="?android:attr/selectableItemBackground"/>

    <TextView
        android:id="@+id/create_replen_request_quantity_requested_textview"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/create_replen_request_add_product_btn"
        android:layout_toLeftOf="@+id/create_replen_request_add_product_btn"
        android:layout_marginRight="0dp"
        android:text="@string/create_replen_request_quantity_text"
        android:layout_alignWithParentIfMissing="true"
        android:textColor="@color/app_white_color"
        android:textAppearance="?android:attr/textAppearanceMedium" />

        <TextView
        android:id="@+id/create_replen_request_unit_cost_textview"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="@color/app_white_color"
        android:layout_alignBaseline="@+id/create_replen_request_quantity_requested_textview"
        android:layout_alignBottom="@+id/create_replen_request_quantity_requested_textview"
        android:layout_toLeftOf="@+id/create_replen_request_quantity_requested_textview"
        android:layout_marginRight="25dp"
        android:text="@string/create_call_unit_cost_text"
        android:textAppearance="?android:attr/textAppearanceMedium" />

</RelativeLayout>
    
asked by Chris 26.06.2018 в 18:06
source

1 answer

1

I have already solved it, in the part where the text overlapped I changed a couple of parameters.

I leave the code in case someone helps or guides you.

 <ScrollView
    android:id="@+id/pscrollview_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginEnd="0dp"
    android:layout_marginRight="0dp"
    android:layout_marginLeft="0dp"
    android:orientation="vertical"
    android:paddingLeft="20dp"
    android:paddingRight="20dp"
    app:layout_constraintEnd_toEndOf="parent">

    <LinearLayout
        android:id="@+id/rlayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

    </LinearLayout>
</ScrollView>
    
answered by 27.06.2018 в 15:07