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
     

    Attached Files:


    Advertisement

  2. LV426

    LV426 I say we take off and nuke this place from orbit
    Recognized Developer
    Rank:
     #12
    Points:
    1,988
    Posts:
    9,176
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    9,176
    13,681
    1,988
    Male
    Software developer
    South West of England
    Which view is this layout for? Is it for your Listview?
     
  3. GodLovesYou

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

    Jan 25, 2016
    255
    43
    43
    I will explain...

    I have two xml layout's and they are exacly the same but the one that I've posted here is the result layout and where I want to add in the top a Textview that will help me search.
     

Share This Page

Loading...