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
7
votes
1 answer

ListView with multiple types of row layout - BaseAdapter is not working properly in Android

Hi below is my class for baseadapter, but it is not working properly: private static class MyBaseAdapter extends BaseAdapter { private Context context; private LayoutInflater inflater; private MyBaseAdapter(Context…
Vinay Raut
  • 119
  • 2
  • 10
7
votes
4 answers

Launch a Dialog Fragment on button click from a custom base adapter>getView [IMG INCLUDED]

Alright so i have a list(which is also a fragment dialog) that displays a users friends and each item in that list has a button(labeled friends in the picture) and when users click that button id like to display another fragment dialog that displays…
ChuckKelly
  • 1,742
  • 5
  • 25
  • 54
7
votes
3 answers

How to Refresh ListView in Fragment that is filled with BaseAdapter?

I want to Refresh a ListView in a Fragment when a Dialog is closed. Until now the refresh only works when I restart the app and I don't really know why. Here are the classes: This is the Fragment with the ListView on it, that i want to refresh, when…
7
votes
3 answers

Why are ViewPager and GridLayout with 30 Elements very slow?

I have a ViewPager and a GridView to show a monthly calendar. The GridView has about 30 elements and swipe to left and right is very slow. I made a sample project to test without any database access and it is slow, too. Maybe someone sees the…
6
votes
3 answers

How to use DatePickerDialog in BaseAdapter

I am working with the BaseAdapter Class. I want to Display DatePickerDialog in it. When I use showDialog(DATE_DIALOG_ID); I am getting error. Please guide me regarding this. package com.OrganisemeePhone.adapter; import java.util.ArrayList; import…
Android
  • 2,383
  • 1
  • 26
  • 44
6
votes
1 answer

Android: ListView not refreshing on notifyDataSetChanged();

I've got a custom BaseAdapter and an add button in the main activity. The button opens a dialog with a textbox and you can add new elements to the list that way. The problem is that the list is not refreshing. In the onActivityResult() function I…
FloIancu
  • 2,685
  • 8
  • 29
  • 34
6
votes
2 answers

Best way of showing Stream Data in Android Listview

We are trying to show a table data on a listview. The data consists of 8 columns and around 50 rows. In one second period approximatelly 8 update data comes. (ie:update row2-column5 to something.) Every time a new data comes, we are updating the…
e13420xx
  • 718
  • 1
  • 8
  • 26
6
votes
3 answers

How to create onclick event in adapter using interface android?

How can I create on click event using interface? In my application I've created view click interface to detect clicking on adapter items into parent activity. After creating interface and method into adapter how I can use this interface to call the…
ios
  • 143
  • 1
  • 2
  • 9
6
votes
4 answers

Error:This class should provide a default constructor (a public constructor with no arguments) [Instantiatable] in Android

I am generating the file apk with Generated Signed APK in Android Studio, but I have this error: Error:Error: This class should provide a default constructor (a public constructor with no arguments)…
elvega
  • 73
  • 1
  • 2
  • 6
6
votes
2 answers

Android communication between fragment and baseadapter

Need expert opinion how should i structure this issue. I have a custom method process_filter that resides in a fragment as it needs to access a private TextView and List of this fragment. In the middle of processing, this fragment will access a…
Bih Cheng
  • 655
  • 1
  • 13
  • 28
6
votes
3 answers

Android ListView with multiple layouts

I have to show a list with different type of Views. So I have to define a ListView with an Adapter where I have to inflate multiple views. I have gone through example given, but problem is for my list is not symmetric like the example where header…
dev_android
  • 8,698
  • 22
  • 91
  • 148
6
votes
2 answers

How to reset listview after searchview is closed in android?

I have implemented a listview with a baseadapter that is getting filtered (only matching items are shown) when the user searches for a query, but when there is no more text in the search bar and the search action is closed, I'm not able to reset…
Prudhvi
  • 2,276
  • 7
  • 34
  • 54
6
votes
3 answers

Android BaseAdapter with Fragment

Unable to compile this code and run. getting issue in lv.setAdapter(new VcAdapter (this)); kindly help. If I try to not pass (this), then code compile fine, but run time getting error stating content need to have listview. import…
user2612717
  • 61
  • 1
  • 3
6
votes
3 answers

Android ImageAdapter with Gridview in Fragment

I have an adapter with gridview that works as an Activity. I am trying to place it in a Fragment now and converted things but it does not work. When I include the IconFragmentSystem in my Activity I get a force close when I try to open the Activity.…
Jai Romeo
  • 173
  • 1
  • 1
  • 5
6
votes
4 answers

List item repeating in android customized listview

In my customized list view items are repeating.position of item is same for all item. code is below ListAdapter.java- public class ListAdapter extends BaseAdapter{ private List mName; private List mIcon; private Context…
yuva ツ
  • 3,707
  • 9
  • 50
  • 78