Skip to content

Instantly share code, notes, and snippets.

dazza5000

Block or report user

Report or block dazza5000

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:5748927f3181a22f6578176250c5e088
public class EventsPresenterTest {
private static List<Event> EVENTS = new ArrayList<>();
@Mock
EventsRepository eventsRepository;
@Mock
EventsContract.View eventsView;
private EventsPresenter eventsPresenter;
@dazza5000
dazza5000 / gist:14d78ed1c8de8339ee24e7d23d919447
Last active Nov 16, 2016
Events Presenter Implementation
View gist:14d78ed1c8de8339ee24e7d23d919447
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;
View gist:9d0b582bd0db6b81504cdd3337a055eb
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);
View gist:590d4d5a157d97cc799831c88abd26b3
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();
View gist:1d12b2f775b389f2c8c16ec320a2326f
interface Presenter {
void loadEvents();
void loadYummyCounts();
void searchEvents(String searchTerm);
void openEventDetails(Event clickedEvent);
View gist:3953a8982864c3b0d78b01f8acf71a89
interface View {
void showEvents(List<Event> events);
void setPizzaCount(int count);
void setTacoCount(int count);
void setBeerCount(int count);
@dazza5000
dazza5000 / circle.yml
Last active Jun 23, 2018
CircleCI Android Configuration Template - circle.yml
View circle.yml
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-27-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
View JanuaryMeetup
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.
You can’t perform that action at this time.