1. Are you ready for the Galaxy S20? Here is everything we know so far!

Can't fix this Text View problem

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

  1. GodLovesYou

    GodLovesYou Android Enthusiast
    Thread Starter

    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
     


Loading...
Similar Threads - Can't fix Text
  1. MoodyBlues
    Replies:
    9
    Views:
    320
  2. userde
    Replies:
    7
    Views:
    318
  3. brandonsmith29
    Replies:
    8
    Views:
    366
  4. Greg Android
    Replies:
    0
    Views:
    180
  5. Billybronco
    Replies:
    2
    Views:
    240
  6. mingus
    Replies:
    6
    Views:
    345
  7. Lauris
    Replies:
    2
    Views:
    408
  8. Tristan Raghnall
    Replies:
    1
    Views:
    766
  9. KateThatcham
    Replies:
    2
    Views:
    5,364
  10. SampsonNation
    Replies:
    5
    Views:
    1,539

Share This Page

Loading...