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
1
vote
2 answers

Re-inflating view in handler.post when getView() is null

I recently replaced all the deprecated AsyncTask code in my apps with handlers and newSingleThreadExecutors. After retrieving response data from a remote server, I update the UI in the handler.post section of the code. I've never personally been…
1
vote
3 answers

fullcalendar get current month start and end date react example

What is alternative solution for below piece of code if I wanted to write use this in React js or simple Javascript ? var startDate = $('#calendar').fullCalendar('getView').intervalStart.format('DD/MM/YYYY'); var endDate =…
1
vote
0 answers

android sometime getView() method doesn't work

I made a listview. But sometime it disappeared, and it appeared when I clicked search Button. I found out through logcat that getView() method is the problem. Sometime getView() method doesn't work, but it works when I press the search…
jisoo0427
  • 39
  • 5
1
vote
0 answers

ViewHolder returning incorrect position in getView method

I have cardviews, and I need to change some of them. The problem is that when I have more than one cardview I click on one and it changes the data of the last cardview that I have and not of exactly that I clicked @RequiresApi(api =…
1
vote
1 answer

java.lang.ClassCastException, trying to have two activites using the same custom adapter

I have two activities, NewContact.java and ViewContact.java, that I want to have using the same custom adapter as the two activites are very similar. But I am getting the following error and my app crashes: AndroidRuntime: FATAL EXCEPTION:…
CHarris
  • 2,693
  • 8
  • 45
  • 71
1
vote
4 answers

Get value in activity from getView of BaseAdapter

I have a listview and for that i am using a BaseAdapter. I want the value of listitem in that Activity . Below is my code MainActivity.java ArrayList dkulist = new ArrayList<>(); CustomAdapter adapter; @Override protected void…
manjari
  • 183
  • 1
  • 14
1
vote
0 answers

How can I manipulate certain elements of a ListView and scroll the view manually without weird things to happen?

So basically my goal is to have a ListView filled with large icons which i want to scroll to the previous or next item by clicking a corresponding button. Furthermore I want to highlight (Set the alpha from 30% to 100%) the icon which is currently…
tom.a.hawk
  • 53
  • 8
1
vote
2 answers

GetView + Intent Param Object Error

I have this problem now: java.lang.RuntimeException: Parcelable encountered IOException writing serializable object .. Class Filho implements serializable. How to solve? public View getView(int position, View view, ViewGroup parent) { final…
1
vote
3 answers

launching a DialogFragment within getView of a custom Adapter

I have a custom Adapter and within its getView() method, I'm trying to launch an alert dialog when the user clicks a Button but I get an error. I hope someone can help me here Here is my Custom Adapter: package…
1
vote
0 answers

Convert View inconsistency

Extended baseadapter using convertview's recycle logic causes list items TextView setText method to be called twice (overlaying text) in listview after scrolling view off screen and then back. Inflating convertview each time getview is called…
Robert Goodrick
  • 190
  • 1
  • 11
1
vote
0 answers

how i can display my gallery in tabhost with fragment

Here is the code of the fragment in which I am setting a custom adapter to the gallery, no errors but nothing to view it's empty. i want to display this gallery in one tab of tabhost. Souar.java class fragment package com.TP.dhikr; import…
1
vote
2 answers

Checkedtextview check/uncheck after scroll Listview

I'm developing checkedtextview in listvew using viewHolder and getview. To populate check/uncheck status binding from database is running well. But, if I check item and then scroll listview, it will back to uncheck. here is my customAdapter…
1
vote
1 answer

Android View Audio Files NumberFormatException

I am trying to view some audio files in a folder on my phone. This problem happen when i trying to test with 2 android 4.4 phones. With android 6.0, there is no problem at all. This is my View file: @Override public View getView(int position, View…
J Dang
  • 13
  • 2
1
vote
2 answers

Android programmatically adding border to ArrayAdapter view in AlertDialog

I am trying to add a border programmatically to certain row elements in an ArrayAdapter that is displayed within an AlertDialog. Basically I want to take this : And make it like this (so placing white borders on the left and right side of the views…
1
vote
0 answers

Understanding getView

I just started android course and I am like native to it. I want to understand the below lines of code used in custom Array adapters. public View getView(int position, View convertView, ViewGroup parent) { // Check if the existing view is being…
fed
  • 11
  • 1
1 2
3
16 17