Questions tagged [adaptor]

The adapter pattern is a software design pattern that allows the interface of an existing class to be used as another interface.

77 questions
30
votes
11 answers

ListView items are not clickable. why?

I have a ListView that uses a customized adapter, but I can't click on the ListView Item .. Activity for list view .. package com.adhamenaya.projects; import java.util.ArrayList; import android.app.Activity; import android.content.Context; import…
Adham
  • 58,520
  • 96
  • 215
  • 339
26
votes
4 answers

How to load Youtube thumbnails in a RecyclerView using Youtube API

I'm trying to load Youtube video thumbnails in a RecyclerView. I'm facing some issues. Here is what I'm doing in my adapter: public static class ItemViewHolder extends RecyclerView.ViewHolder { private YouTubeThumbnailView thumb; public …
Stranger B.
  • 7,456
  • 21
  • 60
  • 101
24
votes
4 answers

Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter convertView

I got this error just after converted the adapter code to Kotlin: java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter convertView at…
MiguelSlv
  • 9,553
  • 7
  • 72
  • 127
5
votes
2 answers

Gridview with layout (imageview + imagebutton) for every value

Is it possible to make a gridview that has instead of a grid of pictures, a grid of pictures with a small imagebutton below every one of them?
rosu alin
  • 5,130
  • 9
  • 56
  • 133
3
votes
2 answers

What is the simplest way to interact between a SAP OMS and Websphere Commerce?

Would it be using a Websphere Adaptor for SAP or webmethods or something else?? Does something else need to be considered while opting for one of these??? The final system needs to be synchronous between SAP and the WCS front end.No ques..no…
sarego
  • 2,868
  • 6
  • 26
  • 38
3
votes
1 answer

STL: calling bind2nd with ptr_fun for "const T &" types

Calling std::count_if(vec.begin(), vec.end(), std::bind2nd(std::ptr_fun(foo), 17)) works fine with bool foo(int, int), but I can't make it work with bool foo(const int &, const int &) Is there a way to make that work or do I have to write my…
Michael
  • 1,302
  • 1
  • 14
  • 36
3
votes
4 answers

Is it really an Adaptor pattern?

On a project I have seen some code which was written by a former employee. The person has named it as an implementation of Adaptor pattern but I am not sure. Here is the code: public class RowSetAdaptor implements java.io.Serializable { private…
srh
  • 1,427
  • 3
  • 22
  • 45
3
votes
1 answer

Zend_Auth: why authenticate object named adapter and not strategy?

$Zend_auth->authenticate($adapter); Why is it called an adapter and not a strategy?
koen
  • 12,287
  • 9
  • 43
  • 49
2
votes
1 answer

What is the equivalent of BOOST_FUSION_ADAPT_ASSOC in Boost.Hana?

In the good old days we used to adapt a struct into a Boost.Fusion container or an associative container with #include #include struct Person{ …
alfC
  • 10,293
  • 4
  • 42
  • 88
2
votes
1 answer

Pytest/Allure - How to generate testcase description?

I'm still fairly new to Allure, and I'm trying to generate a test description in my reports. Looking at other SO questions and pytest-allure-adaptor documentation, there doesn't seem to be an option to do this. The closest I've gotten was writing…
Alex Osheter
  • 475
  • 4
  • 16
2
votes
2 answers

Sort adapter ArrayList by reverse date

I don't know How to sort my ArrayList adapter by date in reverse order I think my code is fine but my list don't show my array in reversed sort. I tried every way and see many question but I didn't managed to achieve my goal. Here's my code: …
2
votes
0 answers

std::scoped_allocator_adaptor and std::pair

Why do std::pair and std::tuple behave differently when using std::scoped_allocator_adaptor'ed allocators for the containers? std::pair fails: std::vector, …
dorel bosu
  • 21
  • 2
2
votes
1 answer

C++: boost range iterator pointing to wrong element

I ran into a strange problem. I have a vector> from which I need to read (and possibly write) only the vector elements for which the boolean value of the pair is true. I am using boost range filter and reverse adaptors to do that.…
linuxfever
  • 3,162
  • 1
  • 13
  • 34
2
votes
1 answer

c++ How to implement compose2

#include #include #include #include #include #include #include #include #include #include template
Ashot
  • 9,891
  • 12
  • 56
  • 100
2
votes
1 answer

How to put in 3 sets of data into asp.net

I am having trouble trying to put in data for this project I'm working on. I have three GridViews that I want to fill with three sets of data from a query. The code below only generates the three grids; all of them are duplicating the third set.…
Cloud
  • 213
  • 1
  • 6
  • 14
1
2 3 4 5 6