mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-22 04:29:22 +01:00
Merge branch 'bugfix/deprecatedCall' into develop
This commit is contained in:
commit
61a55714d0
4 changed files with 32 additions and 12 deletions
|
@ -59,14 +59,13 @@ dependencies {
|
|||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.3.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
implementation 'com.google.android.material:material:1.3.0'
|
||||
implementation 'com.google.android.material:material:1.4.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
|
||||
implementation 'com.journeyapps:zxing-android-embedded:4.1.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.3.0'
|
||||
implementation 'androidx.core:core:1.5.0'
|
||||
implementation 'androidx.core:core:1.6.0'
|
||||
|
||||
// debugImplementation 'com.amitshekhar.android:debug-db:1.0.6'
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
package net.foucry.pilldroid;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import com.google.android.material.appbar.CollapsingToolbarLayout;
|
||||
import android.os.Bundle;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.google.android.material.appbar.CollapsingToolbarLayout;
|
||||
|
||||
/**
|
||||
* A fragment representing a single Drug detail screen.
|
||||
* This fragment is either contained in a {@link DrugListActivity}
|
||||
|
@ -70,7 +70,7 @@ public class DrugDetailFragment extends Fragment {
|
|||
|
||||
// Show the dummy content as text in a TextView.
|
||||
if (drug != null) {
|
||||
// Find each conponment of rootView
|
||||
// Find each component of rootView
|
||||
nameView = detailView.findViewById(R.id.name_cell);
|
||||
TextView nameLabel = nameView.findViewById(R.id.label);
|
||||
TextView nameValue = nameView.findViewById(R.id.value);
|
||||
|
|
|
@ -36,8 +36,6 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import io.sentry.Sentry;
|
||||
|
||||
import static net.foucry.pilldroid.UtilDate.date2String;
|
||||
import static net.foucry.pilldroid.Utils.intRandomExclusive;
|
||||
|
||||
|
@ -377,9 +375,31 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
Intent intent = new Intent(context, DrugDetailActivity.class);
|
||||
intent.putExtra("drug", aDrug);
|
||||
startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE); // todo deprecated
|
||||
//openActivityForResult(intent);
|
||||
overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left);
|
||||
}
|
||||
|
||||
/* void openActivityForResult(Intent intent) {
|
||||
// Intent intent = new Intent(this,DrugDetailActivity.class);
|
||||
DrugDetailActivityLaucher.launch(intent);
|
||||
}
|
||||
|
||||
ActivityResultLauncher<Intent> DrugDetailActivityLaucher = registerForActivityResult(
|
||||
new ActivityResultContracts.StartActivityForResult(),
|
||||
new ActivityResultCallback<ActivityResult>() {
|
||||
@Override
|
||||
public void onActivityResult(ActivityResult result) {
|
||||
if (result.getResultCode() == Activity.RESULT_OK) {
|
||||
// Here, no request code
|
||||
try {
|
||||
result.getData();
|
||||
Intent data = result.getData();
|
||||
Log.d(TAG, "Result data = " +data.getDataString());
|
||||
}
|
||||
catch (Exception ignored){};
|
||||
}
|
||||
}
|
||||
});*/
|
||||
/**
|
||||
* setupRecyclerView (list of drugs
|
||||
* @param recyclerView RecyclerView
|
||||
|
@ -474,6 +494,7 @@ public class DrugListActivity extends AppCompatActivity {
|
|||
Intent intent = new Intent(context, DrugDetailActivity.class);
|
||||
intent.putExtra("drug", drugCourant);
|
||||
startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE); // todo: deprecated
|
||||
//openActivityForResult(intent);
|
||||
overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -9,7 +9,7 @@ buildscript {
|
|||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.2.1'
|
||||
classpath 'com.android.tools.build:gradle:4.2.2'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
|
Loading…
Reference in a new issue