Questions tagged [custom-adapter]

A custom-adapter is an interface which provides the ability to define non-standard iterators for specific data representations.

A custom-adapter is often used to integrate custom data structures with a view in an MVC framework.

References

990 questions
-2
votes
2 answers

Cannot make a static reference to the non-static method in onitemclicklistener on custom listview adapter fetching data from sqlite database

Application Structure first: //This class has a listview which will be populated from custom adapter public class Transactions_show extends Activity implements OnItemClickListener //This class is custom adapter which returns custom view for each…
devprashant
  • 1,285
  • 1
  • 13
  • 23
-2
votes
1 answer

getView never called

I am implementing a grid view which is inside fragment with a custom adapter. But the getView() of custom adapter has never called. I set the grid view like below. public class MainFragment extends Fragment { ArrayList objects; GridView…
genki98
  • 680
  • 1
  • 11
  • 31
-2
votes
1 answer

Populate a custom list view with two textviews and a checkbox

I have created the main.xml and the list.xml my java class extends menuActivity I have 2 vectors-- Vector name=new Vector(); Vector nickname=new Vector(); i have created my custom holder class too. my question is…
D-D
  • 954
  • 2
  • 12
  • 27
-3
votes
2 answers

SearchView shows only one & same record from listView with CustomAdapter but searchView works fine with ArrayAdapter. Here's my adapter

import com.example.mis_internee.atendence_app_android.R; public class EMP_LEAVE_ADAPTER extends ArrayAdapter { private final Activity context; private final String[] itemname; public EMP_LEAVE_ADAPTER(Activity…
-3
votes
2 answers

Custom adapter listview not working Android

there is a problem with the custom adapter. I cannot display listview. When i run the app it stops running. Please take a look at code below. Thank you in advance AllProductsActivity.java @Override public void onCreate(Bundle savedInstanceState)…
-3
votes
4 answers

Moving to a new activity when ListViewItem is clicked

I'm creating a sort of sign in system for my app and I have it working to a point where the user can add their details and choose them from a list. the user inputs their information into a UserInput class and this information is then stored in a…
-3
votes
2 answers

Number picker in custom listview changing number by itself

I am working on app in which I am using a Custom ArrayAdaptor to populate my listView.The customoized row includes a number Picker along with some text boxes in its activity. Now the Problem Part--> The funny part is that when i am changing the…
scorpio
  • 9
  • 5
-3
votes
1 answer

server side values inside customadapter using JSON

//CustomAdapter.java public class CustomAdapter extends PagerAdapter{ Context context; int[] imageId = {R.drawable.slider1, R.drawable.slider2}; String[] caption = { "1", "2" }; public CustomAdapter(Context context){ this.context =…
Jithin Varghese
  • 2,018
  • 3
  • 29
  • 56
-4
votes
2 answers

Can I use a single Custom Adapter for multiple activities in the same project?

I am creating a food ordering android app. In this app I have already used custom adapter for image flipper (Image Slideshow) and now I want to use it for custom Listview. So, can anybody guide me how to do it This is code for the custom…
-4
votes
1 answer

How to get values from a ArrayList in one class and use them in another class

I'm trying to retrieve values from a Arraylist which is in another class, in the first class I have: public ArrayList> getListaCategorias() { return listaCategorias; } And now in my other class I'm trying to get the…
alb
  • 347
  • 2
  • 7
  • 24
-4
votes
2 answers

Change icon in listview

I am trying to change the icon of the custom listview but it keeps crashing. How do i change the icon for each page ? for example: I tried adding the Icon in the Forloop but that just makes it crash, i also tried to google it, but couldnt find…
Robbert
  • 68
  • 2
  • 12
-4
votes
1 answer

ListView with Custom Adapter - IndexOutOfBoundsException when list is empty

I have a List in which i store some strings that i get from server. I have a custom adapter for the ListView. Each item has a TextView and a Switch. In the onCreate method, the list will be empty and after the data is received from server, i am…
Vamsi Challa
  • 11,038
  • 31
  • 99
  • 149
-4
votes
1 answer

json parsed listview with different type of item

I parsed a JSON api and put it in ListView. I have different type item, like Video, Audio, Image, and text. Means in one row, may I have sound with play button and other options. I know that should I use of GetViewTypeCount() and…
MAY3AM
  • 1,182
  • 3
  • 17
  • 42
-5
votes
2 answers

custom font in customAdapter

I use custom adapter for my listView, and I want to make the textView with custom font. the listView is in fragment: todolist_fragment.xml
-6
votes
3 answers

How can i use List and pass it to another class

i have created a custom adapter in TweetAdapter.java. I have written the code as public class TweetAdapter extends ArrayAdapter { private List tweets; private Context context; public TweetAdapter(TweetListActivity ctx, List tweets) { …
1 2 3
65
66