Basic use of Android viewpager (with title)

Invalid Sign

@Override public int getCount() { return list.size(); }

@Override public boolean isViewFromObject(@NonNull View view, @NonNull Object o) { return view==o; }

@Nonnull @ override public object instantiateitem (@ nonnull ViewGroup container, int position) {/ / this is initialization. You can make a judgment and optimize the performance by adding the view to the container. As for how to optimize the performance, I'll add view = list. Get (position); / / add it to the view container. Addview (view); return view;}

@Override public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) { container.removeView(list.get(position)); }

Invalid Sign

} ```

The above is it. If you have any questions, please leave a message. Thank you!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>