java - Android Dynamic List View -


I want to fix a button at the top of the layout and a dynamic editing text is just below the button. I'm creating my own adapter button Click another activity starts and the string returns, which is shown on the list view item below the button. How can I do this?

My XML Layout -

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" Android: layout_width = "match_parent" Android: layout_height = "match_parent" Android: orientation = "vertical" & gt; & Lt; Android: ID = "@ + ID / button1" style = "Android: ATR / button" Style "" Android: Layout_Wind = "wrap_content" Android: layout_height = "wrap_content" Android: text = "button" / & Gt; & Lt; EditText android: id = "@ + id / etList" Android: layout_width = "match_parent" android: layout_height = "wrap_content" android: ems = "10" & gt; & Lt; / EditText> & Lt; / LinearLayout & gt;  

My list view adapter -

  package com.example.tasktable; Import android.content.Context; Import android.view.LayoutInflater; Import android.view.View; Import android.view.ViewGroup; Import android.widget.ArrayAdapter; Import android.widget.Button; Import android.widget.TextView; Public category work adapter ArrayAdapter and lt; String & gt; {Personal Final Reference Reference; Private last string [] value; Button click; TextView text view; Public work adapters (reference references, string [] values) {super (references, r.lit.list_view, value); This.context = context; this. Value = value; } @ Override public view getView (int position, seeviewview, ViewGroup parent) {// TODO auto generated method stub layout Inflater inflator = (LayoutInflater) reference .getSystemService (context.LAYOUT_INFLATER_SERVICE); See lineview = inflator.inflate (R.layout.list_view, guardian, incorrect); Click = (button) rowView.findViewById (R.id.button1); TextView = (TextView) rowView.findViewById (RID list); TextView.setText (value [position]); Return line view; }}  

I do not want to inflate buttons with every edit text.

You can place layout elements with relative layout


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -