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

Clipboardmanager Within Custom List Adapter

Want to implement an onClickListener within a custom list adapter that will copy from a textView of the listView using Clipboard. I have tried the code shown below but I always get a null when I tried to click on the textView in the listView. The…
1
vote
0 answers

android - Lock print orientation with custom PrintDocumentAdapter

I want to print a tableLayout with my custom PrintDocumentAdapter. The problem is that you can choose between horizontal and landscape print mode when the android print preview window pops up. I would like to lock the print orientation to horizontal…
1
vote
2 answers

Access and edit child view of custom adapter

I have a ListView populated by a custom ArrayAdapter. The structure of each row is composed by ImageView TextView NumberPicker ImageButton Clicking on the ImageButton should show a popup window which contains a color slider and a "ACCEPT"…
Aaron Ullal
  • 4,855
  • 8
  • 35
  • 63
1
vote
1 answer

custom arrayadapter get data from asynctask

i trying to connect with themoviedb.orgbut there's some issues MainActivityFragment.java public class MainActivityFragment extends Fragment { public Item[] dataAdapter ; public MainActivityFragment() { this.updateData(); } @Override public…
1
vote
2 answers

Getting text from Textview in listview with custom adapter

I have a Listview with 3 Textviews, and I want to retrieve the specific data from these textviews on the clicked Item. For now I'm trying to get the data from the first textview. The problem is, it doesn't matter if I click on Item 1, 2, 3 or etc…
1
vote
1 answer

Android: CustomListView with CustomAdapter, Call Button is not working

In my app I have 3 views ImagiveView TextView Button ImagView displays image accordingly, TextView and Button display names and number accordingly. But the problem is when I click on the button it does not call to the number which is displaying…
bizimunda
  • 819
  • 2
  • 9
  • 26
1
vote
2 answers

How can I add item to data base from my customAdapter class?

Okay so I want to add an item to my db after I click a row in my listview. I can only get my onclickListener to work from my customAdapter class and brings up the dialogbox okay but after I add item I am getting an error from my db onCreate method…
JamieUser
  • 21
  • 1
1
vote
1 answer

How to save arraylist inside customadapter to SharedPreference

I have written code that displays list of installed apps along with checkbox. However, when I close the app, checkbox value resets. I learned that by using Shared Preference I can save state of checkbox. However I am not able to implement it in my…
Anonymous
  • 336
  • 3
  • 23
1
vote
1 answer

refresh listview with timer without scroling?

This is the timer to refresh the listview to check for any new entry in sqlite. and whenever timer goes over, it refreshes the listview again and again. In that case, I want that the timer should have no effect on the listview. It should add the new…
DEEPAK MITTAL
  • 141
  • 1
  • 1
  • 10
1
vote
2 answers

How to add images in spinner? (array type expected, found int)

I am trying to add images in my spinner, i am getting some errors in customView here is my code: s1.setAdapter(new MyAdapter(this, R.layout.customspinner, R.array.weapicos)); public class MyAdapter extends ArrayAdapter { public…
VaibhaV Deshmukh
  • 109
  • 1
  • 11
1
vote
2 answers

My custom list filter is not working

I have tried several code and many solution from stackOverflow but none was work for me :( . I don't know why this happen. I have posted another question but my bad luck that before anyone answer it marked as duplicate just depend on my description.…
Firefog
  • 3,094
  • 7
  • 48
  • 86
1
vote
1 answer

Android - ListView not updating after data reordering

I successfully implemented my ListActivity with a ContextMenu with two MenuItems: "Move up" and "Move down". When clicked the code swaps column order_id between two objects. MainActivity.java @Override public boolean onContextItemSelected(MenuItem…
SchwarzeHuhn
  • 638
  • 5
  • 17
1
vote
2 answers

custom adapter for listview in fragment Android

hi i m learning android listview , anyone give idea on How to set CustomAdapter into fragment activity? Below is simple listview for fragment. For customListview in Fragment Activity not other how to proceed... public class CallFragment extends…
User Learning
  • 3,165
  • 5
  • 30
  • 51
1
vote
1 answer

How to handle selected item event of multiple spinners?

I have created three spinners programatically. I want only one spinner item value should be selected and other spinners will be set default value as "select". Example: If user selects item from spinner1 then spinner2 and spinner3 will have default…
1
vote
3 answers

CustomAdapter getView() is called every time while scrolling

The getView() method in my CustomAdapter is called every time I scroll up or down. @Override public View getView(int position, View convertView, ViewGroup parent) { View vi = convertView; ViewHolder holder; if (convertView == null) { …
korunos
  • 768
  • 3
  • 11
  • 31