1. Download our Official Android App: Forums for Android!

Apps Can't fix this Text View problem

Discussion in 'Android Development' started by GodLovesYou, Feb 23, 2016.

  1. GodLovesYou

    GodLovesYou Android Enthusiast
    Thread Starter
    Rank:
    None
    Points:
    43
    Posts:
    255
    Joined:
    Jan 25, 2016

    Jan 25, 2016
    255
    43
    43
    What's up!

    I am doing a project that consists on import from storage a .csv file, but I had a problem after I upload the excel.

    I have a textview that will shows me the search of what I want, but I cant understand why this is happen.

    This is the code:
    Code (Java):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    3.     android:layout_width="fill_parent"
    4.     android:layout_height="wrap_content"
    5.     android:orientation="vertical" >
    6.     <LinearLayout
    7.         android:layout_width="match_parent"
    8.         android:layout_height="match_parent"
    9.         android:orientation="horizontal">
    10.     <EditText
    11.         android:id="@+id/etSearch"
    12.         android:layout_width="fill_parent"
    13.         android:layout_height="wrap_content">
    14.     </EditText>
    15.     </LinearLayout>
    16.     <LinearLayout
    17.         android:id="@+id/lvh"
    18.         android:layout_width="fill_parent"
    19.         android:layout_height="wrap_content"
    20.         android:orientation="horizontal"
    21.         android:background="#ffe6e6e6"
    22.         android:weightSum="3" >
    23.  
    24.         <TextView
    25.             android:id="@+id/txtproductcompany"
    26.             android:layout_width="0dp"
    27.             android:layout_height="wrap_content"
    28.             android:layout_weight="1"
    29.             android:gravity="left"
    30.             android:text="COMPANY"
    31.             android:textColor="#000000"
    32.             android:textSize="13sp" />
    33.         <TextView
    34.             android:id="@+id/txtproductname"
    35.             android:layout_width="0dp"
    36.             android:layout_height="wrap_content"
    37.             android:layout_weight="1"
    38.             android:gravity="left"
    39.             android:padding="3dp"
    40.             android:text="PRODUCT"
    41.             android:textColor="#000000"
    42.             android:textSize="13sp" />
    43.         <TextView
    44.             android:id="@+id/txtproductprice"
    45.             android:layout_width="0dp"
    46.             android:layout_height="wrap_content"
    47.             android:layout_weight="1"
    48.             android:gravity="left"
    49.             android:text="PRICE"
    50.             android:padding="3dp"
    51.             android:textColor="#000000"
    52.             android:textSize="13sp" />
    53.     </LinearLayout>
    54. </RelativeLayout>
    The problem is the print that I have taken. Basicly this is multiplying Textview's
     

    Advertisement

Share This Page

Loading...