Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make class/method abstract #108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
* adapters (e.g., SectionedAdapter) that might have an
* arbitrary number of rows, so it all appears seamless.
*/
public class SackOfViewsAdapter extends BaseAdapter {
public abstract class SackOfViewsAdapter extends BaseAdapter {
private List<View> views = null;

/**
Expand Down Expand Up @@ -81,7 +81,7 @@ public SackOfViewsAdapter(List<View> views) {
*
* @param position Position of the item whose data we want
*/
public Object getItem(int position) {
public View getItem(int position) {
return (views.get(position));
}

Expand Down Expand Up @@ -169,7 +169,5 @@ public long getItemId(int position) {
* @param position Position of the item whose data we want
* @param parent ViewGroup containing the returned View
*/
protected View newView(int position, ViewGroup parent) {
throw new RuntimeException("You must override newView()!");
}
}
protected abstract View newView(int position, ViewGroup parent) ;
}