Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release 1.0.0 #50

Merged
merged 2 commits into from
Sep 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "org.dhis2"
applicationId "com.dhis2"
minSdkVersion 19
targetSdkVersion 27
versionCode 27
versionName "1.0.0-BETA12"
versionCode 30
versionName "1.0.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
Expand Down Expand Up @@ -218,7 +218,7 @@ dependencies {

//CRASHLYTICS
implementation('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
transitive = true;
transitive = true
}

//Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.dhis2.utils.DateUtils;
import org.dhis2.utils.Constants;

import org.junit.Test;
import org.junit.runner.RunWith;

import java.text.ParseException;
import java.util.Calendar;
import java.util.Date;

import static org.junit.Assert.*;

/**
Expand All @@ -27,7 +23,7 @@ public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();

assertEquals("org.dhis2", appContext.getPackageName());
assertEquals(Constants.SHARE_PREFS, appContext.getPackageName());
}


Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
android:name="io.fabric.ApiKey"
android:value="a5caa46009119f5e584e4964c30a922095b1075c" />

<receiver android:name=".debug.DhisCustomLauncher">
<receiver android:name=".widgets.DhisCustomLauncher">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/dhis2/AppModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import dagger.Provides;

/**
* Created by ppajuelo on 10/10/2017.
* QUADRAM. Created by ppajuelo on 10/10/2017.
*/
@Module
final class AppModule {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/dhis2/Bindings/Bindings.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
import timber.log.Timber;

/**
* Created by ppajuelo on 28/09/2017.
* QUADRAM. Created by ppajuelo on 28/09/2017.
*/

public class Bindings {
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/org/dhis2/data/database/DbModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import dagger.Module;
import dagger.Provides;
import io.reactivex.schedulers.Schedulers;

@Module
public class DbModule {
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/org/dhis2/data/forms/FormModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.support.annotation.NonNull;

import org.dhis2.data.schedulers.SchedulerProvider;
import org.dhis2.usescases.general.AbstractActivityContracts;
import org.dhis2.utils.CodeGenerator;
import com.squareup.sqlbrite2.BriteDatabase;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
import io.reactivex.BackpressureStrategy;
import io.reactivex.Flowable;

import static hu.akarnokd.rxjava.interop.RxJavaInterop.toV2Flowable;

public final class EnrollmentRuleEngineRepository implements RuleEngineRepository {
private static final String QUERY_ENROLLMENT = "SELECT\n" +
" Enrollment.uid,\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import java.util.List;

/**
* Created by ppajuelo on 07/11/2017.
* QUADRAM. Created by ppajuelo on 07/11/2017.
*/

public class OptionAdapter extends ArrayAdapter<OptionModel> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import android.view.View;

/**
* Created by Administrador on 15/06/2018.
* QUADRAM. Created by Administrador on 15/06/2018.
*/

public abstract class FieldViewHolder extends RecyclerView.ViewHolder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import android.support.v7.widget.RecyclerView;

/**
* Created by ppajuelo on 06/11/2017.
* QUADRAM. Created by ppajuelo on 06/11/2017.
*/

public abstract class FormViewHolder extends RecyclerView.ViewHolder {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
package org.dhis2.data.forms.dataentry.fields.age;

import android.support.annotation.NonNull;

import org.dhis2.data.forms.dataentry.fields.FormViewHolder;
import org.dhis2.data.forms.dataentry.fields.RowAction;
import org.dhis2.databinding.FormAgeCustomBinding;
import org.dhis2.utils.DateUtils;

import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.processors.BehaviorProcessor;
import io.reactivex.processors.FlowableProcessor;
import timber.log.Timber;

import static android.text.TextUtils.isEmpty;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import io.reactivex.processors.FlowableProcessor;

/**
* Created by frodriguez on 20/03/2018.
* QUADRAM. Created by frodriguez on 20/03/2018.
*/

public class AgeRow implements Row<AgeHolder, AgeViewModel> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import io.reactivex.processors.FlowableProcessor;

/**
* Created by frodriguez on 1/24/2018.
* QUADRAM. Created by frodriguez on 1/24/2018.
*/

public class CoordinateRow implements Row<CoordinateHolder, CoordinateViewModel> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.dhis2.data.forms.dataentry.fields.datetime;

import android.databinding.ViewDataBinding;
import android.support.annotation.NonNull;

import org.dhis2.BR;
import org.dhis2.data.forms.dataentry.fields.FormViewHolder;
Expand All @@ -10,29 +9,26 @@
import org.dhis2.databinding.FormDateTimeTextBinding;
import org.dhis2.databinding.FormTimeTextBinding;
import org.dhis2.utils.DateUtils;

import org.hisp.dhis.android.core.common.ValueType;

import java.util.Date;

import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.processors.BehaviorProcessor;
import io.reactivex.processors.FlowableProcessor;
import timber.log.Timber;

import static android.text.TextUtils.isEmpty;


/**
* Created by frodriguez on 16/01/2018.
* QUADRAM. Created by frodriguez on 16/01/2018.
*/

public class DateTimeHolder extends FormViewHolder implements OnDateSelected {

private final CompositeDisposable disposable;
private final FlowableProcessor<RowAction> processor;
/* @NonNull
private BehaviorProcessor<DateTimeViewModel> model;*/
/* @NonNull
private BehaviorProcessor<DateTimeViewModel> model;*/
private DateTimeViewModel dateTimeViewModel;

DateTimeHolder(ViewDataBinding binding, FlowableProcessor<RowAction> processor) {
Expand Down Expand Up @@ -170,13 +166,13 @@ public void update(DateTimeViewModel viewModel) {
@Override
public void onDateSelected(Date date) {
String dateFormatted = "";
if(date != null) //Always stores a DATE in database format
if(dateTimeViewModel.valueType() == ValueType.DATE)
dateFormatted = DateUtils.databaseDateFormat().format(date);
else if(dateTimeViewModel.valueType() == ValueType.TIME)
dateFormatted = DateUtils.databaseDateFormat().format(date);
if (date != null)
if (dateTimeViewModel.valueType() == ValueType.DATE)
dateFormatted = DateUtils.uiDateFormat().format(date);
else if (dateTimeViewModel.valueType() == ValueType.TIME)
dateFormatted = DateUtils.timeFormat().format(date);
else {
dateFormatted = DateUtils.databaseDateFormat().format(date);
dateFormatted = DateUtils.databaseDateFormatNoMillis().format(date);
}
processor.onNext(
RowAction.create(dateTimeViewModel.uid(), date != null ? dateFormatted : null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import io.reactivex.processors.FlowableProcessor;

/**
* Created by frodriguez on 1/24/2018.
* QUADRAM. Created by frodriguez on 1/24/2018.
*/

public class DateTimeRow implements Row<DateTimeHolder, DateTimeViewModel> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.hisp.dhis.android.core.common.ValueType;

/**
* Created by frodriguez on 1/24/2018.
* QUADRAM. Created by frodriguez on 1/24/2018.
*/

@AutoValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import io.reactivex.processors.FlowableProcessor;

/**
* Created by frodriguez on 1/24/2018.
* QUADRAM. Created by frodriguez on 1/24/2018.
*/

public class EditTextRow implements Row<EditTextCustomHolder, EditTextModel> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
import android.databinding.ViewDataBinding;

import org.dhis2.data.forms.dataentry.fields.FormViewHolder;
import org.dhis2.usescases.searchTrackEntity.SearchTEContractsModule;

import org.hisp.dhis.android.core.trackedentity.TrackedEntityAttributeModel;

/**
* Created by ppajuelo on 19/03/2018.
* QUADRAM. Created by ppajuelo on 19/03/2018.
*/

public class FileHolder extends FormViewHolder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import io.reactivex.processors.FlowableProcessor;

/**
* Created by ppajuelo on 19/03/2018.
* QUADRAM. Created by ppajuelo on 19/03/2018.
*/

public class FileRow implements Row<FileHolder, FileViewModel> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.google.auto.value.AutoValue;

/**
* Created by ppajuelo on 19/03/2018.
* QUADRAM. Created by ppajuelo on 19/03/2018.
*/

@AutoValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import org.hisp.dhis.android.core.organisationunit.OrganisationUnitModel;

import java.util.HashMap;
import java.util.List;

import io.reactivex.Observable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import io.reactivex.processors.FlowableProcessor;

/**
* Created by ppajuelo on 19/03/2018.
* QUADRAM. Created by ppajuelo on 19/03/2018.
*/

public class OrgUnitRow implements Row<OrgUnitHolder, OrgUnitViewModel> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.google.auto.value.AutoValue;

/**
* Created by ppajuelo on 19/03/2018.
* QUADRAM. Created by ppajuelo on 19/03/2018.
*/
@AutoValue
public abstract class OrgUnitViewModel extends FieldViewModel {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,23 +121,20 @@ else if (checkBoxViewModel.value() != null)
radioGroup.getChildAt(i).setEnabled(checkBoxViewModel.editable());
}

radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
RowAction rowAction;
switch (checkedId) {
case R.id.yes:
rowAction = RowAction.create(viewModel.uid(), String.valueOf(true));
break;
case R.id.no:
rowAction = RowAction.create(viewModel.uid(), String.valueOf(false));
break;
default:
rowAction = RowAction.create(viewModel.uid(), null);
break;
}
processor.onNext(rowAction);
radioGroup.setOnCheckedChangeListener((group, checkedId) -> {
RowAction rowAction;
switch (checkedId) {
case R.id.yes:
rowAction = RowAction.create(viewModel.uid(), String.valueOf(true));
break;
case R.id.no:
rowAction = RowAction.create(viewModel.uid(), String.valueOf(false));
break;
default:
rowAction = RowAction.create(viewModel.uid(), null);
break;
}
processor.onNext(rowAction);
});


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import io.reactivex.processors.FlowableProcessor;

/**
* Created by frodriguez on 1/24/2018.
* QUADRAM. Created by frodriguez on 1/24/2018.
*/

public class RadioButtonRow implements Row<RadioButtonHolder, RadioButtonViewModel> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import java.util.Locale;

/**
* Created by frodriguez on 1/24/2018.
* QUADRAM. Created by frodriguez on 1/24/2018.
*/
@AutoValue
public abstract class RadioButtonViewModel extends FieldViewModel {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import static android.text.TextUtils.isEmpty;

/**
* Created by ppajuelo on 07/11/2017.
* QUADRAM. Created by ppajuelo on 07/11/2017.
*/

public class SpinnerHolder extends RecyclerView.ViewHolder implements View.OnClickListener, PopupMenu.OnMenuItemClickListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import io.reactivex.processors.FlowableProcessor;

/**
* Created by frodriguez on 1/24/2018.
* QUADRAM. Created by frodriguez on 1/24/2018.
*/

public class SpinnerRow implements Row<SpinnerHolder, SpinnerViewModel> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.google.auto.value.AutoValue;

/**
* Created by frodriguez on 1/24/2018.
* QUADRAM. Created by frodriguez on 1/24/2018.
*/

@AutoValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import android.databinding.DataBindingUtil;
import android.support.annotation.NonNull;
import android.support.v4.content.ContextCompat;
import android.view.LayoutInflater;
import android.view.ViewGroup;

Expand Down
Loading