hi TreKing, I did change the method to update the UI to the TextWatcher onTextChanged , then I changed the String reference method to String valueOf and it worked. The problem was in the code, when changing integer to string. Thanks
On Monday, February 22, 2016 at 1:41:26 AM UTC+3, TreKing wrote: > > Please trim your question down to the bare minimum that illustrates your > issue. No one has time to read through all of your code and debug your > problem for you. > > That said, ListViews are generally used for showing data, not gathering > input, so this could be tricky. One idea would be to pass the model object > associated with a list view item to that view as its tag when calling > getView, then updating the model directly in the text changed event you've > already set up to the do the calculation. > > Ultimately, you have to update the model data in the adapter as soon as > possible since you'll lose that data as soon as it gets scrolled offscreen > and gets recycled. > > On Sat, Feb 20, 2016 at 4:06 AM, James Shisiah <[email protected] > <javascript:>> wrote: > > Hello, I have implemented a listview in android with a complex list item > using an xml layout as shown below > > <?xml version="1.0" encoding="utf-8"?> > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > android:layout_width="match_parent" > android:layout_height="wrap_content"> > <TextView > android:id="@+id/ticket_id" > android:layout_width="0dp" > android:visibility="invisible" > android:layout_height="wrap_content" > android:layout_weight="0.2"/> > <TextView > android:id="@+id/ticket_name" > android:layout_width="0dp" > android:layout_height="wrap_content" > android:layout_weight="1" > android:text="NAME" > android:textSize="13sp"/> > <TextView > android:id="@+id/ticket_price" > android:layout_width="0dp" > android:layout_height="wrap_content" > android:layout_weight="1" > android:textSize="13sp" > android:text="PRICE"/> > <EditText > android:id="@+id/ticket_qty" > android:inputType="number" > android:layout_width="0dp" > android:layout_height="wrap_content" > android:layout_weight="1" > android:textSize="13sp" /> > <TextView > android:id="@+id/ticket_subtotal" > android:layout_width="0dp" > android:layout_height="wrap_content" > android:layout_weight="1" > android:textSize="13sp" /> > </LinearLayout> > > > > i have the layout with the ListView that is populated with this listetem, > the code is shown below; > > <android.support.design.widget.CoordinatorLayout > xmlns:android="http://schemas.android.com/apk/res/android" > xmlns:tools="http://schemas.android.com/tools" > android:id="@+id/coordinatorLayout" > android:layout_width="match_parent" > android:layout_height="match_parent" > android:orientation="vertical" > tools:context="com.jaymoh.mookh.SellTicketFragment"> > > <LinearLayout > android:orientation="vertical" > android:layout_width="match_parent" > android:layout_height="match_parent"> > <ScrollView > android:layout_width="match_parent" > android:layout_height="300dp" > > > > <LinearLayout > android:layout_width="match_parent" > android:layout_height="400dp" > android:layout_marginTop="25dp" > android:layout_marginLeft="5dp" > android:layout_marginRight="5dp" > android:layout_marginBottom="5dp" > android:elevation="5dp" > android:orientation="vertical"> > > <fr.castorflex.android.smoothprogressbar.SmoothProgressBar > android:id="@+id/smooth_progress" > android:layout_width="match_parent" > android:layout_height="wrap_content" > style="@style/GNowProgressBar" > android:indeterminate="true"/> > > <TextView > android:id="@+id/textview_event_name" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > android:textSize="24dp" > android:text="Project X" > android:layout_gravity="center" > android:gravity="center" > android:textStyle="bold" > android:textColor="@android:color/secondary_text_light" > android:layout_margin="5dp" /> > > <LinearLayout > android:layout_width="match_parent" > android:layout_height="wrap_content" > android:orientation="horizontal" > android:background="@color/feed_bg"> > <TextView > android:layout_width="0dp" > android:layout_height="wrap_content" > android:layout_weight="0.2"/> > <TextView > > > ... -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/73678055-df50-4fcc-a7a7-8fd5101c15ca%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

