Merge branch 'feature/saveDrugs' of ssh://git.exodus-privacy.eu.org:2225/foucry.net/PillDroid into feature/saveDrugs

This commit is contained in:
Jacques Foucry 2020-04-21 21:39:05 +02:00
commit d134e2e037
6 changed files with 21 additions and 17 deletions

View file

@ -19,13 +19,13 @@ android {
productFlavors {
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
/*dexOptions {
incremental false
}*/
buildToolsVersion = '29.0.2'
buildToolsVersion = buildToolsVersion1
}
repositories {
@ -37,7 +37,7 @@ repositories {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
testImplementation 'junit:junit:4.13'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'

View file

@ -20,7 +20,7 @@ class DBHelper extends SQLiteOpenHelper {
private static final int DATABASE_VERSION = 1;
private static String DATABASE_NAME = "ordonnance.db";
private static final String TABLE_DRUG = "drug";
private static final String TABLE_DRUG = "drug";
private static final String KEY_ID = "id";
private static final String KEY_CIS = "cis";
private static final String KEY_CIP13 = "cip13";

View file

@ -36,6 +36,7 @@ public class MedicamentDetailActivity extends AppCompatActivity {
Snackbar.make(view, "Will be use to save changes in a drug", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
setResult(1);
finish();
}
});

View file

@ -5,6 +5,7 @@ import android.content.Context;
import android.support.design.widget.CollapsingToolbarLayout;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -24,6 +25,7 @@ public class MedicamentDetailFragment extends Fragment {
* represents.
*/
public static final String ARG_ITEM_ID = "medicament";
private static final String TAG = MedicamentListActivity.class.getName();
/**
* The dummy content this fragment is presenting.
@ -56,8 +58,7 @@ public class MedicamentDetailFragment extends Fragment {
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View detailView = inflater.inflate(R.layout.medicament_detail, container, false);
View nameView;
View adminModeView;
@ -120,12 +121,7 @@ public class MedicamentDetailFragment extends Fragment {
{
Context context = getContext();
Toast.makeText(context, "***PROUT***", Toast.LENGTH_SHORT).show();
super.onStop();
}
private void grabNewMedicamentValues()
{
View currentView = getView();
View nameView;
View adminModeView;
View presentationView;
@ -134,8 +130,14 @@ public class MedicamentDetailFragment extends Fragment {
View warningView;
View alertView;
nameView detailView.findViewById(R.id.name_cell);
medicament.setNom(nameView.getText());
stockView = currentView.findViewById(R.id.alert_cell);
TextView stockTextView = stockView.findViewById(R.id.valeur);
String stockValue = stockTextView.getText().toString();
Log.d(TAG, "StockValue == "+ stockValue);
Log.d(TAG, "medicamentID "+ medicament.getId());
Toast.makeText(context,"stock value "+ stockValue, Toast.LENGTH_SHORT).show();
super.onStop();
}
}

View file

@ -9,7 +9,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
classpath 'com.android.tools.build:gradle:3.6.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@ -19,6 +19,7 @@ ext {
compileSdkVersion = '27'
buildToolsVersion = '27.0.1'
var = '3.4.2'
buildToolsVersion1 = '29.0.3'
}
allprojects {

View file

@ -1,6 +1,6 @@
#Thu Jul 11 18:46:50 CEST 2019
#Sun Apr 12 14:00:20 UTC 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip