Questions tagged [baseadapter]

BaseAdapter is an abstract Android adapter class which is used to implement specialized adapters.

From the documentation of the BaseAdapter class:

Common base class of common implementation for an Adapter that can be used in both ListView (by implementing the specialized ListAdapter interface) and Spinner (by implementing the specialized SpinnerAdapter interface).

Tag Usage:

1659 questions
10
votes
3 answers

Android - Gridview with Custom BaseAdapter, create onclicklistener

I have created a gridview which displays the letters of the alphabet. I populate the gridview with a string array using a custom BaseAdapter. What i want to do is to be able to get the value (letter) of the clicked cell. In order to verify that it…
Christos Baziotis
  • 5,845
  • 16
  • 59
  • 80
10
votes
4 answers

How to show Toast in a class extended by BaseAdapter Get View Method

I am having problem of showing Toast Message when i click a button within a list View. The problem is that i a custom class extended by BaseAdapter i have a method named GetView I wanna show a toast Message from that particular message Following is…
10
votes
1 answer

Is Android's BaseAdapter an example of Adapter pattern?

Does Android's class BaseAdapter have "Adapter" in its name because it follows the Adapter pattern or is it just a coincidence?
fhucho
  • 34,062
  • 40
  • 136
  • 186
10
votes
4 answers

BaseAdapter.notifyDatasetChanged() not updating the ListView

why does my listview not update when I call notifyDatasetChanged() ? the only way I can make it display the data is, to call setAdatper() on the ListView again... i also tried to call it via runOnUIThread() which did not change anything The…
Andreas Linden
  • 12,489
  • 7
  • 51
  • 67
9
votes
2 answers

Android: What to do if performance of ListView is still not enough?

Well this topic was and still is debated really a lot and I already read many tutorials, hints and saw talks about it. But I still have problems with my implementation of a custom BaseAdapter for a ListView whenever I reach a certain complexity of…
9
votes
4 answers

Fragment's are not calling OnResume() when swiping with ViewPager

Explaining my problem : I spend much time but I can not get this to work.I have view pager in main activty that contains three fragments using (Tabhost).My ViewPagerAdapter class extend FragmentStatePagerAdapter. The problem I'm facing that my…
9
votes
1 answer

ParseQueryAdapter : sort data on client side

My problem is quite simple, but my code is not working. I want to sort result of a ParseQuery into the ParseQueryAdapter before display it into a ListView. products.addOnQueryLoadListener(new ParseQueryAdapter.OnQueryLoadListener() { …
MLKiiwy
  • 133
  • 1
  • 8
9
votes
4 answers

List items position repeating in getview

I am creating a custom list view using baseadapter.i have 10 list item in my list.my problem is that afetr 6 items ,the first 4 are repeating.i just printed position values in getview.it gives 0,1,2,3,4,5,6,7,8,9,0,1,2,3.My code is below. thanx in…
Sanu
  • 455
  • 1
  • 6
  • 17
8
votes
1 answer

Why doing listview.setAdapter(_adapter) twice crashes app?

The key issue I have is doing lv_apps.setAdapter(_adapter) TWICE is what crashes my app. (Basically, when i call populateListView_trial() the 2nd time, app crashes -- and the offending line is lv_apps.setAdapter(_adapter) Stacktrace is below the…
8
votes
4 answers

Prevent the adapter from recycling views on scroll ( Edit do not ever do this.)

I have a custom base adapter that will take in an arraylist of data. From here it will fill out a grid view with custom buttons. It does so perfectly and fills up the gridview. The problem is. I want to set a button to change colors on change. When…
Jesusrz001
  • 85
  • 1
  • 1
  • 6
8
votes
1 answer

Android : Custom DialogFragment so slow to display

I have a DialogFragment which serves as a popup. This DialogFragment has a ListView in it and that uses a BaseAdapter that has custom TableRow. My problem is, it takes about 2 seconds to display the popup fully. Is there any solution, or…
dzep
  • 685
  • 1
  • 8
  • 20
8
votes
1 answer

overridePendingTransition on gridview adapter

How can I insert overridePendingTransition on a GridView `Adapter? In this way don't work, without transition startactivity work perfectly bt.setOnLongClickListener(new OnLongClickListener(){ @Override public boolean…
kosma822
  • 183
  • 1
  • 2
  • 7
7
votes
1 answer

Attempt to invoke virtual method 'android.content.Context android.support.v4.app.FragmentActivity.getApplicationContext()' on a null object reference

Following is my code for my fragment, i get the above error of null exception /** * Created by USer on 09-04-2016. */ public class FeaturedFragment extends android.support.v4.app.Fragment { private List url; private SliderLayout…
7
votes
4 answers

ListView with Coundown timer. Timer flickers when scrolling the listview

In my app, I have to show countdown timer for every item in listview. I have been able to do this using CountDownTimer. But, problem is when scrolling the listview up or down, timer starts flickering. Searched a lot but couldn't got a solution. My…
Nitish
  • 3,097
  • 13
  • 45
  • 80
7
votes
6 answers

How to get id of particular item of listview in android?

I am using Listview and set the multiple item and each item have Like, share and comment option. Actually I have fetch the Item Id and also setText of TextView, Its Successfully. But Not able to get Item Id on Like Button Click event for…
Reena
  • 563
  • 4
  • 11
  • 22