Last active
November 16, 2016 20:17
-
-
Save dazza5000/9d0b582bd0db6b81504cdd3337a055eb to your computer and use it in GitHub Desktop.
Events View Implementation
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 EventsActivity extends AppCompatActivity | |
implements EventsContract.View { | |
private EventsContract.Presenter eventsPresenter; | |
.... | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_events); | |
eventsPresenter = new EventsPresenter(repository, this); | |
eventsPresenter.loadEvents(); | |
} | |
.... | |
@Override // This is an implemention of a View Contract Method | |
public void showEvents(List<Event> events) { | |
eventListAdapter.replaceData(events); | |
mRecyclerView.setVisibility(View.VISIBLE); | |
mNoEventsView.setVisibility(View.GONE); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment