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
-1
votes
3 answers

Custom listview adapter -Cannot figure out how to set the image resource

So I am creating a custom adapter where each row has an ImageView and a TextView. The TextView works fine but I am having trouble with the ImageView. I have a typed array of image resources in an xml file. When I try to set the image resource in the…
zsh5032
  • 141
  • 1
  • 10
-1
votes
2 answers

Are custom adapters only used with ListView?

I'm working on presentation about Custom Adapters in Android. So far from what I have seen is that Custom adapters are only used with ListView and nothing else. Is this a limitation or just a good approach ? Are there any other options from…
-1
votes
1 answer

Implement CustomAdapter to Fragment ListView

i'm attemp to implement CustomAdapter on Fragment and ListView, but it show an error NullPointerException in androidListView.setAdapter(androidListAdapter); Previously I tried CustomAdapter without fragment, and it was a success This is my Fragment…
-1
votes
1 answer

ListView Android - displays two Items from the List < String>

I'm trying to do ListView. This is my code: List list = new ArrayList<>(); String[] add1 = {"FirstName1 ","LastName1", "12-12.1993"}; String[] add2 = {"FirstName2 ","LastName2", "20-12.1993"}; // Then adds these tables to the…
-1
votes
1 answer

Please suggest me on proper usage of notifyDataSetChanged()

I'm using view pager with swiping tab layouts. And i'm displaying list view of data using custom adapter. And also onclick of list view i have a list view detail activity where I'm displaying data in more detail. In these detail activity i'm…
Rakesh
  • 43
  • 1
  • 1
  • 10
-1
votes
2 answers

Custom ArrayAdapter shows wrong image after being filtered

i'm trying to make a custom adapter to fill a ListView with strings and their corresponding images. problem is that when the filtering takes place, images keep the same order as when they were not filtered as opposed to strings that are correctly…
M47
  • 400
  • 2
  • 13
-1
votes
2 answers

How to make visible and invisible the layout of custom adapter based on the value set-ted in the custom adapter

In my application I have two layout in which the bottom layout some value will be null based on the user details from the server i want to make invisible the which are null, I am using the custom base adapter to create and set the value to the…
-1
votes
2 answers

Custom Adapter for List with HorizontalScroll and others in Android

There is my problematic Custom Adapter with HorizontalScroll for ListView: public class CNewsAdapter extends BaseAdapter { private static ArrayList listNews; private LayoutInflater layoutInflater; Context context; public…
-1
votes
1 answer

How to update a row of a ListView adding a View to the item clicked?

I have a custom ListView adapter with some TextView inside of it. You can click on a TexView and after clicking, it starts a thread that gets some data. I'd like to add the received data exactly under the TextView that I clicked. Is it possible…
michoprogrammer
  • 1,159
  • 2
  • 18
  • 45
-1
votes
1 answer

How to create following triangle view in android dynamically?

Its been a dynamic view for each new entry a triangle is been added in list at bottom. How this can be created ? Any suggestion how to proceed ? How to create a custom layout-manager for it
Punit Sharma
  • 2,951
  • 1
  • 20
  • 35
-1
votes
1 answer

how set spinner from previous selected value using spinner object?

CustomeSpinerAdapter jobAdapter = new CustomeSpinerAdapter( getApplicationContext(), R.layout.custom_spiner_row, jobListData); spJobType.setAdapter(jobAdapter); here i want to set spiner.setseleciton(position); with…
-1
votes
2 answers

IndexOutOfBoundsException: Invalid index 1, size is 0

I want to display items selected from listview1(vertical) to listview2(horizontal). When I add items to my list i get error : 12668-12668/com.example.vdovin.restaurantmenu E/AndroidRuntime﹕ FATAL EXCEPTION: main …
-1
votes
1 answer

Android Studio, Search Activity (No data found massage)

I'm a beginner at Android development. I have a problem trying to show in a List view that the query doesn't bring any result. I just appear blank (nothing) without indications. I'm using a Search dialog with customs suggestions, and when I start…
-1
votes
3 answers

Get data from CustomAdapter, to Java class

I have a ListView, with a TextView and a Button. I want to sent data from my CustomAdapter to the .class, but i dont know how. That is my CustomAdapter. I can get a Log or a toast with the data i want, but i dont know how to send without using an…
Uat
  • 3
  • 7
-1
votes
1 answer

I've made my own ListView Adapter but no data is printed

This is what i have tried, but my ListView doesn't get filled. I use a custom adapter because i wan't to change the background color of the items that't got a boolean value = true. I am using Android Studio. Hope someone can help. i'm new to…