Questions tagged [getview]

To be used with the android tag. Refers to the getview(int position, View convertView, ViewGroup parent) method in the adapter class and other methods related to this. Add any other tags relevant to the question.

To be used with the . Refers to the getview(int position, View convertView, ViewGroup parent) method in the adapter class and other methods related to this. Use any other tags that are relevant to the question.

247 questions
0
votes
1 answer

Spinner conflicts with Checkbox inside a ListView - Why?

I'm trying to find out why spinner is conflicting with checkBox inside a listView. If I comment the spinner lines, the checkBox listener works fine, I can select it, check if is selected and delete the row of the List. If I let the spinner…
Victor Oliveira
  • 3,293
  • 7
  • 47
  • 77
0
votes
1 answer

Getting wrong item position ListView

I have a Custom adapter extending BaseAdapter, everything works fine except the returned position of items in the getView method which looks wrong. After the first scroll of the list It gives me the index of the last displayed item. First scroll top…
user1079425
0
votes
1 answer

How to make changes in only one row in listview generated using BaseAdapter?

I have generated a ListView using BaseAdapter. I have 2 Button in my Listview. I want to make my Button1 invisible when a Button2 in the row is clicked. Then when another row's Button2 is clicked I want to make the Button1 in the current row…
user3509091
0
votes
1 answer

How to change the color of only one Button at a time in a Listview generated using BaseAdapter?

I have generated a Listview using a BaseAdapter . At present I have 4 rows in my Listview. I have some Textviews and a Button in the row.At present the color of my button is the default grey color. I want to do the following: When I click the…
user3509091
0
votes
1 answer

ListView/custom array adapter - adapter being set to null when getView is called

I'm having a lot of trouble trying to figure out this array adapter stuff. I've put this together with the help of some tutorials and this page How to add/remove item from listview in android when click button in item listview But I'm having an…
user3425269
  • 249
  • 1
  • 3
  • 12
0
votes
0 answers

android preferencefragment listview arrayadapter getview not called

After researching / reviewing code the past couple days, a solution eludes me. The ArrayAdapter.getView() function is not being called. ArrayAdapter.getCount() is returning 3. This listview is similar to the WiFi preference fragment…
E Net Arch
  • 458
  • 5
  • 13
0
votes
0 answers

My list is null after the first getView()

I am using two different lists because I need information from both. the getItem(position) gets the item from the mChampionList so I can retrieve the ID and look up the champion from the mChampionListSTATIC list. The first time it calls getView(),…
DDukesterman
  • 1,391
  • 5
  • 24
  • 42
0
votes
2 answers

How to obtain the text color of a single item within an Android ListView

My ListView contains items that are different text colors. I need to grab the color state of each item to to be saved within the onSaveInstanceState of my fragment. ListView lvItems = (ListView) getActivity().findViewById(R.id.lvItems); …
zeroprobe
  • 580
  • 1
  • 8
  • 19
0
votes
1 answer

I get more than one id in one click (ListView custom adapter GetView)

I want to do that when I click a ToggleButton from the list, retrieve the ID of the row textview. The problem is that when most IDS pulse are obtained, and when I scroll too ... I do not know what to do! I get all these IDS in my LogCat.. with only…
Jaume Colom Ferrer
  • 334
  • 1
  • 3
  • 13
-1
votes
2 answers

calling getViewById in a class outside a Fragment generates null pointer exception and the content of

I'm trying to change the text from a TextView that is in a Fragment when onLocationChanged function is called. I know that i could implement LocationListener when creating HomeFragment but i want this to be modularized. public void…
-1
votes
2 answers

stop getView() from getting called automatically

I'm implementing Expandable ListView. Each child item has a Text View and an EditText. The problem is, Suppose a Group has 10 items/rows. I entered a data in row 1 and 2. When I scroll down to row 6 and 7. They already have a text (Row 6 has data of…
-1
votes
1 answer

Android fragment reutn null on getview() when OnTextMessage is triggered

I want to update text in a fragment when the messages come. In the Main Activity I do the connection with wsuri. Every message that I received the callback onTextMessage is triggered. The library I use is autoBahn. public class MainActivity extends…
-1
votes
4 answers

My getView method in my custom array adapter is not working

can you give me some advice about my getView methood; I have custom adapter that extends ArrayAdapter(context, id, list) public class myCustomAdapter extends ArrayAdapter{ private List obj = null; public myCustomAdapter(@NonNull Context…
Vlad Skurtolov
  • 1,024
  • 1
  • 7
  • 20
-1
votes
1 answer

getView() not being called for custom ArrayAdapter

I am new to Android Development and am using Android Studio. I am trying to build a basic chat application. Content of my ChatActivity.java is: public class ChatActivity extends AppCompatActivity implements View.OnClickListener { private…
Pukki
  • 586
  • 1
  • 7
  • 18
-1
votes
1 answer

intent within onclicklistener on a listview adapter

I'm rather new to programming, but I've got a listview which displays the contents of a database. It also has a button which can be pressed. the code im having trouble with is in my adapter class for the listview. Ideally I would like to pass…
krisC
  • 1
  • 1