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 { productFlavors {
} }
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6 sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8
} }
/*dexOptions { /*dexOptions {
incremental false incremental false
}*/ }*/
buildToolsVersion = '29.0.2' buildToolsVersion = buildToolsVersion1
} }
repositories { repositories {
@ -37,7 +37,7 @@ repositories {
dependencies { dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') 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:appcompat-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1' implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:design:27.1.1' implementation 'com.android.support:design:27.1.1'

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) Snackbar.make(view, "Will be use to save changes in a drug", Snackbar.LENGTH_LONG)
.setAction("Action", null).show(); .setAction("Action", null).show();
setResult(1); setResult(1);
finish(); finish();
} }
}); });

View file

@ -5,6 +5,7 @@ import android.content.Context;
import android.support.design.widget.CollapsingToolbarLayout; import android.support.design.widget.CollapsingToolbarLayout;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -24,6 +25,7 @@ public class MedicamentDetailFragment extends Fragment {
* represents. * represents.
*/ */
public static final String ARG_ITEM_ID = "medicament"; public static final String ARG_ITEM_ID = "medicament";
private static final String TAG = MedicamentListActivity.class.getName();
/** /**
* The dummy content this fragment is presenting. * The dummy content this fragment is presenting.
@ -56,8 +58,7 @@ public class MedicamentDetailFragment extends Fragment {
} }
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
Bundle savedInstanceState) {
View detailView = inflater.inflate(R.layout.medicament_detail, container, false); View detailView = inflater.inflate(R.layout.medicament_detail, container, false);
View nameView; View nameView;
View adminModeView; View adminModeView;
@ -120,12 +121,7 @@ public class MedicamentDetailFragment extends Fragment {
{ {
Context context = getContext(); Context context = getContext();
Toast.makeText(context, "***PROUT***", Toast.LENGTH_SHORT).show(); Toast.makeText(context, "***PROUT***", Toast.LENGTH_SHORT).show();
View currentView = getView();
super.onStop();
}
private void grabNewMedicamentValues()
{
View nameView; View nameView;
View adminModeView; View adminModeView;
View presentationView; View presentationView;
@ -134,8 +130,14 @@ public class MedicamentDetailFragment extends Fragment {
View warningView; View warningView;
View alertView; View alertView;
nameView detailView.findViewById(R.id.name_cell); stockView = currentView.findViewById(R.id.alert_cell);
medicament.setNom(nameView.getText()); 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() google()
} }
dependencies { 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 // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
@ -19,6 +19,7 @@ ext {
compileSdkVersion = '27' compileSdkVersion = '27'
buildToolsVersion = '27.0.1' buildToolsVersion = '27.0.1'
var = '3.4.2' var = '3.4.2'
buildToolsVersion1 = '29.0.3'
} }
allprojects { 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 distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists 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