Created
October 10, 2016 10:53
-
-
Save janishar/805cf20b04c176feb0b90fd781510eea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends AppCompatActivity { | |
private InfinitePlaceHolderView mLoadMoreView; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
mLoadMoreView = (InfinitePlaceHolderView)findViewById(R.id.loadMoreView); | |
setupView(); | |
} | |
private void setupView(){ | |
List<InfiniteFeedInfo> feedList = Utils.loadInfiniteFeeds(this.getApplicationContext()); | |
Log.d("DEBUG", "LoadMoreView.LOAD_VIEW_SET_COUNT " + LoadMoreView.LOAD_VIEW_SET_COUNT); | |
for(int i = 0; i < LoadMoreView.LOAD_VIEW_SET_COUNT; i++){ | |
mLoadMoreView.addView(new ItemView(this.getApplicationContext(), feedList.get(i))); | |
} | |
mLoadMoreView.setLoadMoreResolver(new LoadMoreView(mLoadMoreView, feedList)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment