You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 22, 2019. It is now read-only.
Hi,
thanks for the awesome lib. I've tried to reproduce your code, and just noticed that getLayoutInflater() is not a method from BaseAdapter nor CardStackAdapter.
Instead, I had to obtain the LayoutInflater from the Context, so another parameter of type Context is needed in the constructor.
If you want, I can provide you a pull request updating the documentation, and also the code if you're interested.
Keep up the good work!
The text was updated successfully, but these errors were encountered:
Have found the exact problem that you are writing about but I've not been able to solve it. I would, therefore, appreciate if you could describe your solution a bit more. Thanks in before!
Then found that compiler marked me getLayoutInflater() in red. This method does not exist in my CardStackAdapter class. I solved it by passing a Context argument:
class CardStackAdapter(val context: Context, val otherArgs : SomeOtherArguments....) : BaseAdapter() {
and obtain the LayoutInflater like this
val inflater = context.getSystemService(LAYOUT_INFLATER_SERVICE) as LayoutInflater
So my issue was that there is no way of obtaining the LayoutInflater in the example code
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
thanks for the awesome lib. I've tried to reproduce your code, and just noticed that
getLayoutInflater()
is not a method fromBaseAdapter
norCardStackAdapter
.Instead, I had to obtain the
LayoutInflater
from theContext
, so another parameter of typeContext
is needed in the constructor.If you want, I can provide you a pull request updating the documentation, and also the code if you're interested.
Keep up the good work!
The text was updated successfully, but these errors were encountered: