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 EventsPresenterTest { | |
private static List<Event> EVENTS = new ArrayList<>(); | |
@Mock | |
EventsRepository eventsRepository; | |
@Mock | |
EventsContract.View eventsView; | |
private EventsPresenter eventsPresenter; |
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 EventsPresenter implements EventsContract.Presenter { | |
private EventsRepository repository; | |
private EventsContract.View view; | |
.... | |
public EventsPresenter(EventsRepository repository, EventsContract.View view) { | |
this.view = view; | |
this.repository = repository; |
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); |
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 interface EventsContract { | |
interface View { | |
void showEvents(List<Event> events); | |
void setPizzaCount(int count); | |
void setTacoCount(int count); | |
void setBeerCount(int count); | |
void setTotalCount(int count); | |
void showFilteringPopUpMenu(); |
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
interface Presenter { | |
void loadEvents(); | |
void loadYummyCounts(); | |
void searchEvents(String searchTerm); | |
void openEventDetails(Event clickedEvent); |
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
interface View { | |
void showEvents(List<Event> events); | |
void setPizzaCount(int count); | |
void setTacoCount(int count); | |
void setBeerCount(int count); |
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
version: 2 | |
jobs: | |
build: | |
working_directory: ~/code | |
docker: | |
- image: circleci/android:api-27-alpha | |
environment: | |
JVM_OPTS: -Xmx3200m | |
steps: | |
- checkout |
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
import android.app.Presentation; | |
import android.content.Context; | |
import android.location.Location; | |
import android.provider.CalendarContract; | |
import android.widget.Toast; | |
import java.util.ArrayList; | |
/** | |
* Created by mgarner on 12/11/2015. |