Code Monkey home page Code Monkey logo

base-adapter-helper's People

Contributors

days avatar hloong avatar jiegec avatar joanzapata avatar liyujiang-gzu avatar naixx avatar xiazdong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

base-adapter-helper's Issues

how to extend this frame for more type of items

hey, dear JoanZapata :
I really like your Base-adapter-helper,it`s easy to use ~~
But if the type of items is more than 2 , I have to write many code myself .
Then I think how to extend this frame to apply this condition ,
Will you update it ,man ??

CRUD methods on QuickAdapter

It could be helpful to add set() and remove() methods on QuickAdapter.

Signatures should be :

  • set(int id, T newObject)
  • set(T oldObject, T newObject)
  • remove(int id)
  • sremovet(T object)

Is that possible to support RecycleView?

the library is awsome, but I'm using RecycleView right now, since it's so awsome. is that possible that the library could be revised to support RecycleView? thank you!

Allow additional operations on Views

User should not be limited to the set of feature offered by base-adapter-helper.
It should provide a getter for any view to allow specific operations not covered by the lib.

StackOverflow on BaseAdapterHelper.get(...)

When calling BaseAdapterHelper.get(Context, View, ViewGroup, int) base-adapter-helper will throw a StackOverflowException because the method calls himself instead of BaseAdapterHelper.get(Context, View, ViewGroup, int, int).

So, this method

public static BaseAdapterHelper get(Context context, View convertView, ViewGroup parent, int layoutId) {
    return get(context, convertView, parent, -1);
}

should become :

public static BaseAdapterHelper get(Context context, View convertView, ViewGroup parent, int layoutId) {
    return get(context, convertView, parent, layoutId, -1);
}

Create a QuickAdapter

QuickAdapter would be an implementation of BaseAdapter which provides default implementation of all methods, so that the user only provides the minimum code.

Add replace() in BaseQuickAdapter

Currently if I want to replace all items in a list I have to write this :

adapter.clear();
adapter.addAll(myItems);

Which is not very efficient as it triggers the notifyDataSetChanged() method twice.

It would be great to add a replace() method to make a clear and andAll in a single batch :)

notifyDataSetChanged can not work

public BaseQuickAdapter(Context context, int layoutResId, List<T> data) {
    this.data = data == null ? new ArrayList<T>() : new ArrayList<T>(data);
    this.context = context;
    this.layoutResId = layoutResId;
}

The data is always new. So we cannot use notifyDataSetChanged. I think it shoud be
this.data = data == null ? new ArrayList() : data;

Picasso needs updating

I am already using Picasso in my project but version 2.1.1.

base-adapter-helper currently uses version 1.0.2 and so the two versions clash.

Do you have any plans to update this and push to Maven Central?

horizontal

can you implement something for page view or make an horizontal scroll pagination?

Add a callback on view inflating

I have to apply custom font on my items.
Currently we have no easy way to do this only once after inflating the view. It would be great to have a view inflated callback on the BaseAdapterHelper.
I'll provide a PR soon for this

can we have filters

Hi, Thanks for the library. it'll be great to have filter implementation also.

Make a sample app

A twitter client illustrating the usage of the BaseAdapterHelper and the QuickAdapter in #7.

Not support setOnCheckedChangeListener?

Custom as follow:

    public BaseAdapterHelper setOnCheckedChangeListener(int viewId, CompoundButton.OnCheckedChangeListener listener) {
        CompoundButton view = retrieveView(viewId);
        view.setOnCheckedChangeListener(listener);
        return this;
    }

could you change private to protected for BaseAdapterHelper?

I use base-adapter-helper in projects for while since it really make list simple than before. But when I'd like to new some methods for this class, I note that major class members and constuctor as private only, so I can;t just extend class from baseAdapterHelper, I would like to make propose: just make them as "protected" in new version,is it possible?

thanks

Use a custom BaseAdapterHelper

It may be great to allow using a custom BaseAdapterHelper from QuickAdapter. That way we'll be able to easily add every missing method in the helper without waiting a new version ;)

I could make a PR very quickly if you need.

update picasso

please update picasso i get this error

Process: com.paybay.quipromotionapi, PID: 17261
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/squareup/okhttp/HttpResponseCache;
at com.squareup.picasso.OkHttpDownloader.(OkHttpDownloader.java:74)
at com.squareup.picasso.OkHttpDownloader.(OkHttpDownloader.java:51)
at com.squareup.picasso.OkHttpDownloader.(OkHttpDownloader.java:41)
at com.squareup.picasso.Utils$OkHttpLoaderCreator.create(Utils.java:231)
at com.squareup.picasso.Utils.createDefaultDownloader(Utils.java:146)
at com.squareup.picasso.Picasso$Builder.build(Picasso.java:490)
at com.squareup.picasso.Picasso.with(Picasso.java:390)
at com.joanzapata.android.BaseAdapterHelper.setImageUrl(BaseAdapterHelper.java:200)
at com.paybay.quipromotionapi.PromotionListActivity$1.convert(PromotionListActivity.java:25)
at com.paybay.quipromotionapi.PromotionListActivity$1.convert(PromotionListActivity.java:22)
at com.joanzapata.android.BaseQuickAdapter.getView(BaseQuickAdapter.java:102)
at android.widget.AbsListView.obtainView(AbsListView.java:2344)
at android.widget.ListView.makeAndAddView(ListView.java:1864)
at android.widget.ListView.fillDown(ListView.java:698)
at android.widget.ListView.fillFromTop(ListView.java:759)
at android.widget.ListView.layoutChildren(ListView.java:1659)
at android.widget.AbsListView.onLayout(AbsListView.java:2148)
at android.view.View.layout(View.java:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1076)
at android.view.View.layout(View.java:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
at android.view.View.layout(View.java:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
at android.support.v7.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:502)
at android.view.View.layout(View.java:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
at android.view.View.layout(View.java:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1466)
at android.view.View.layout(View.java:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
at android.view.View.layout(View.java:15596)
at android.view.ViewGroup.layout(ViewGroup.java:4966)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2072)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1829)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1054)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5779)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:550)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:117)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.squareup.okhttp.HttpResponseC

I'm my grade i've

compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
compile 'com.squareup.okhttp:okhttp:2.0.0'

but app crash

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.