Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
Merged release-0.6 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmigloz committed Jan 11, 2017
2 parents f6b09e1 + cf8ee48 commit 8dc27b7
Show file tree
Hide file tree
Showing 158 changed files with 5,307 additions and 172 deletions.
674 changes: 674 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,17 @@
[![Code Climate](https://codeclimate.com/github/davidmigloz/go-bees/badges/gpa.svg)](https://codeclimate.com/github/davidmigloz/go-bees)
[![Dependency Status](https://www.versioneye.com/user/projects/57f7b19e823b88004e06ad33/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/57f7b19e823b88004e06ad33)
[![Documentation Status](https://readthedocs.org/projects/go-bees/badge/?version=develop)](http://go-bees.readthedocs.io/es/develop/?badge=develop)

## License

Copyright (c) 2016 - 2017 David Miguel Lozano

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
22 changes: 20 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* GoBees
* Copyright (c) 2016 - 2017 David Miguel Lozano
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
*/

apply plugin: 'com.android.application'
apply plugin: 'jacoco-android'
apply plugin: 'realm-android'
Expand All @@ -10,8 +28,8 @@ android {
applicationId "com.davidmiguel.gobees"
minSdkVersion 19
targetSdkVersion 25
versionCode 5
versionName "v0.5"
versionCode 6
versionName "v0.6"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* GoBees
* Copyright (c) 2016 - 2017 David Miguel Lozano
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

package com.davidmiguel.gobees.apiaries;

import android.support.test.rule.ActivityTestRule;
Expand Down
18 changes: 18 additions & 0 deletions app/src/main/java/com/davidmiguel/gobees/GoBeesApp.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* GoBees
* Copyright (c) 2016 - 2017 David Miguel Lozano
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
*/

package com.davidmiguel.gobees;

import android.app.Application;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* GoBees
* Copyright (c) 2016 - 2017 David Miguel Lozano
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
*/

package com.davidmiguel.gobees.addeditapiary;

import android.os.Bundle;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* GoBees
* Copyright (c) 2016 - 2017 David Miguel Lozano
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
*/

package com.davidmiguel.gobees.addeditapiary;

import android.content.Context;
Expand Down Expand Up @@ -72,6 +90,11 @@ interface View extends BaseView<Presenter> {
* @return if the permission is granted.
*/
boolean checkLocationPermission();

/**
* Closes / hides soft Android keyboard.
*/
void closeKeyboard();
}

interface Presenter extends BasePresenter {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* GoBees
* Copyright (c) 2016 - 2017 David Miguel Lozano
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
*/

package com.davidmiguel.gobees.addeditapiary;

import android.app.Activity;
Expand All @@ -19,6 +37,7 @@
import android.widget.Toast;

import com.davidmiguel.gobees.R;
import com.davidmiguel.gobees.utils.AndroidUtils;

import rebus.permissionutils.AskagainCallback;
import rebus.permissionutils.PermissionEnum;
Expand Down Expand Up @@ -208,6 +227,11 @@ public void result(boolean allPermissionsGranted) {
return false;
}

@Override
public void closeKeyboard() {
AndroidUtils.closeKeyboard(getActivity());
}

@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
@NonNull int[] grantResults) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* GoBees
* Copyright (c) 2016 - 2017 David Miguel Lozano
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
*/

package com.davidmiguel.gobees.addeditapiary;

import android.content.Context;
Expand Down Expand Up @@ -125,12 +143,16 @@ public void onDataNotAvailable() {

@Override
public void onSuccess() {
// Close keyboard
view.closeKeyboard();
// Apiary saved successfully -> go back to apiaries activity
view.showApiariesList();
}

@Override
public void onFailure() {
// Close keyboard
view.closeKeyboard();
// Error saving apiaries
view.showSaveApiaryError();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* GoBees
* Copyright (c) 2016 - 2017 David Miguel Lozano
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
*/

package com.davidmiguel.gobees.addeditapiary;

import android.content.Context;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* GoBees
* Copyright (c) 2016 - 2017 David Miguel Lozano
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
*/

package com.davidmiguel.gobees.addedithive;

import android.os.Bundle;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* GoBees
* Copyright (c) 2016 - 2017 David Miguel Lozano
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
*/

package com.davidmiguel.gobees.addedithive;

import com.davidmiguel.gobees.utils.BasePresenter;
Expand Down Expand Up @@ -38,6 +56,11 @@ interface View extends BaseView<AddEditHiveContract.Presenter> {
* @param notes hive notes.
*/
void setNotes(String notes);

/**
* Closes / hides soft Android keyboard.
*/
void closeKeyboard();
}

interface Presenter extends BasePresenter {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* GoBees
* Copyright (c) 2016 - 2017 David Miguel Lozano
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
*/

package com.davidmiguel.gobees.addedithive;

import android.app.Activity;
Expand All @@ -10,9 +28,11 @@
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.TextView;

import com.davidmiguel.gobees.R;
import com.davidmiguel.gobees.utils.AndroidUtils;

import static com.google.common.base.Preconditions.checkNotNull;

Expand Down Expand Up @@ -99,6 +119,11 @@ public void setNotes(String notes) {
notesTextView.setText(notes);
}

@Override
public void closeKeyboard() {
AndroidUtils.closeKeyboard(getActivity());
}

@Override
public void setPresenter(@NonNull AddEditHiveContract.Presenter presenter) {
this.presenter = checkNotNull(presenter);
Expand Down
Loading

0 comments on commit 8dc27b7

Please sign in to comment.