Updated Project
@@ -4,7 +4,7 @@ android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion "29.0.3"
|
||||
defaultConfig {
|
||||
applicationId "com.ShanMukhaInnovations.ArrestTB"
|
||||
applicationId "in.sminnovations.arrest_tb"
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 29
|
||||
versionCode 1
|
||||
@@ -17,17 +17,32 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
aaptOptions {
|
||||
noCompress "tflite"
|
||||
noCompress "lite"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'androidx.appcompat:appcompat:1.0.2'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
implementation 'com.google.firebase:firebase-auth:16.0.5'
|
||||
implementation 'com.google.firebase:firebase-database:16.0.4'
|
||||
implementation 'com.google.firebase:firebase-storage:16.0.4'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
implementation 'com.chaos.view:pinview:1.4.3'
|
||||
implementation 'com.github.bumptech.glide:glide:4.11.0'
|
||||
implementation 'com.firebaseui:firebase-ui-database:3.2.2'
|
||||
implementation 'org.tensorflow:tensorflow-lite:+'
|
||||
|
||||
|
||||
implementation 'de.hdodenhof:circleimageview:3.1.0'
|
||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.+'
|
||||
|
||||
implementation 'com.google.android.material:material:1.0.0'
|
||||
implementation 'com.hbb20:ccp:2.4.0'
|
||||
|
||||
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
||||
|
||||
48
app/google-services.json
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "903475317641",
|
||||
"firebase_url": "https://arresttb-aead0.firebaseio.com",
|
||||
"project_id": "arresttb-aead0",
|
||||
"storage_bucket": "arresttb-aead0.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:903475317641:android:444c2967176c6135eeaf58",
|
||||
"android_client_info": {
|
||||
"package_name": "in.sminnovations.arrest_tb"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "903475317641-hsfvg2fhlgt43g6tnv54fb4191hguqaa.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "in.sminnovations.arrest_tb",
|
||||
"certificate_hash": "8aeffda288dd8e59580e114a5fe8178766f53ad1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "903475317641-k1mctjrq1d9f8i23lbr4nova31g2o387.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyDD31gjK4qOIKlEgB5Nz5KO_aOH782B8WQ"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "903475317641-k1mctjrq1d9f8i23lbr4nova31g2o387.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package in.sminnovations.arresttb;
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.ShanMukhaInnovations.ArrestTB">
|
||||
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
package="in.sminnovations.arrest_tb">
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
|
||||
android:theme="@style/AppTheme">
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
@@ -23,34 +22,47 @@
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_path" />
|
||||
</provider>
|
||||
<activity android:name=".NegativeResults"></activity>
|
||||
<activity android:name=".PositiveResult" />
|
||||
<activity android:name=".TestDetails" />
|
||||
<activity android:name=".Register" />
|
||||
<activity android:name=".ForgetPassword" />
|
||||
<activity android:name=".CreatePassword" />
|
||||
<activity android:name=".Home" />
|
||||
<activity android:name=".VerifyOTP.VerifyOtp" />
|
||||
<activity android:name=".ForgetPasswordReset" />
|
||||
<activity android:name=".VerifyOTP.VerifyOtpForgetPassword" />
|
||||
<activity android:name=".SplashScreen"> <intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter></activity>
|
||||
<activity android:name=".MainActivity" />
|
||||
<activity android:name=".Report">
|
||||
|
||||
|
||||
</activity>
|
||||
<activity android:name=".NavigationTop" />
|
||||
<activity android:name=".LoginScreen" />
|
||||
|
||||
|
||||
<activity android:name=".AddImage"></activity>
|
||||
<activity android:name=".Camera_Guide"></activity>
|
||||
<activity android:name=".CameraGuide"></activity>
|
||||
<activity android:name=".About" />
|
||||
<activity android:name=".Test_details" />
|
||||
<activity android:name=".splash_screen">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<activity android:name=".PatientDetail"></activity>
|
||||
<activity android:name=".TestResult" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</activity>
|
||||
<activity android:name=".Patient_detail" >
|
||||
|
||||
|
||||
|
||||
</activity>
|
||||
<activity android:name=".home" />
|
||||
<activity android:name=".Navigation_Top" />
|
||||
<activity android:name=".Login_Screen">
|
||||
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
|
||||
android:theme="@style/Base.Theme.AppCompat" />
|
||||
|
||||
2
app/src/main/assets/labels.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
0 negative
|
||||
1 positive
|
||||
BIN
app/src/main/assets/model.tflite
Normal file
BIN
app/src/main/ic_launcher-playstore.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
@@ -1,12 +1,11 @@
|
||||
package in.sminnovations.arresttb;
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
||||
import in.sminnovations.arresttb.R;
|
||||
|
||||
public class About extends Navigation_Top {
|
||||
public class About extends NavigationTop {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
483
app/src/main/java/in/sminnovations/arrest_tb/AddImage.java
Normal file
@@ -0,0 +1,483 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.provider.MediaStore;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.google.android.gms.tasks.Continuation;
|
||||
import com.google.android.gms.tasks.OnCompleteListener;
|
||||
import com.google.android.gms.tasks.OnFailureListener;
|
||||
import com.google.android.gms.tasks.OnSuccessListener;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.firebase.database.DatabaseReference;
|
||||
import com.google.firebase.database.FirebaseDatabase;
|
||||
import com.google.firebase.storage.FirebaseStorage;
|
||||
import com.google.firebase.storage.StorageReference;
|
||||
import com.google.firebase.storage.UploadTask;
|
||||
import com.theartofdev.edmodo.cropper.CropImage;
|
||||
import com.theartofdev.edmodo.cropper.CropImageView;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import de.hdodenhof.circleimageview.CircleImageView;
|
||||
|
||||
|
||||
public class AddImage extends NavigationTop {
|
||||
|
||||
String string1,string2,string3,string4,string5,string6,string7,string8,string9,number;
|
||||
|
||||
private Button nosave;
|
||||
|
||||
|
||||
CircleImageView circle_image;
|
||||
Button report1;
|
||||
private Uri ImageUri1;
|
||||
|
||||
private String TestRandomKey, downloadImageUrl1,saveCurrentDate, saveCurrentTime;
|
||||
private StorageReference TestImagesRef;
|
||||
private DatabaseReference TestRef;
|
||||
private ProgressDialog loadingBar;
|
||||
int j=0;
|
||||
private static final int PERMISSION_FILE=23;
|
||||
|
||||
String patientid,patientdob,patientage,patientnikshayid;
|
||||
private static final String MODEL_PATH = "model.tflite";
|
||||
private static final String LABEL_PATH = "labels.txt";
|
||||
private static final int INPUT_SIZE = 224;
|
||||
String testdta;
|
||||
TextView text;
|
||||
|
||||
private Classifier classifier;
|
||||
|
||||
private Executor executor = Executors.newSingleThreadExecutor();
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
LayoutInflater inflater = (LayoutInflater) this
|
||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
View contentView = inflater.inflate(R.layout.activity_add_image, null, false);
|
||||
draw.addView(contentView, 0);
|
||||
|
||||
|
||||
SharedPreferences preferences6 = getSharedPreferences("PhoneBook_number", MODE_PRIVATE);
|
||||
|
||||
number = preferences6.getString("Phone", null);
|
||||
Log.e("main", "error "+number);
|
||||
|
||||
TestImagesRef = FirebaseStorage.getInstance().getReference().child("Test_Images");
|
||||
TestRef = FirebaseDatabase.getInstance().getReference().child("Test_Data").child(number);
|
||||
loadingBar = new ProgressDialog(this);
|
||||
|
||||
// setContentView(R.layout.activity_add_image);
|
||||
circle_image=findViewById(R.id.circle_image);
|
||||
|
||||
patientdob= getIntent().getStringExtra("dob_report");
|
||||
patientid=getIntent().getStringExtra("id_report");
|
||||
patientage=getIntent().getStringExtra("age_report");
|
||||
patientnikshayid=getIntent().getStringExtra("nikshay_report");
|
||||
report1=findViewById(R.id.report);
|
||||
text=findViewById(R.id.selection_image);
|
||||
SharedPreferences preferences=getSharedPreferences("PhoneBook",MODE_PRIVATE);
|
||||
|
||||
string1 = preferences.getString("gender", null);
|
||||
string2 = preferences.getString("patientid", null);
|
||||
string3 = preferences.getString("patientage", null);
|
||||
string4 = preferences.getString("patientnikshayid", null);
|
||||
string5 = preferences.getString("dob", null);
|
||||
if (string5== null ) {
|
||||
|
||||
|
||||
string5="-";
|
||||
}
|
||||
|
||||
SharedPreferences preferences1=getSharedPreferences("PhoneBook1",MODE_PRIVATE);
|
||||
|
||||
string6 = preferences1.getString("NIRTLabde", null);
|
||||
string7 = preferences1.getString("SPINTubeIDde", null);
|
||||
string8 = preferences1.getString("sample", null);
|
||||
string9 = preferences1.getString("validity", null);
|
||||
SharedPreferences preferences3=getSharedPreferences("PhoneBook1",MODE_PRIVATE);
|
||||
|
||||
string6 = preferences1.getString("NIRTLabde", null);
|
||||
string7 = preferences1.getString("SPINTubeIDde", null);
|
||||
string8 = preferences1.getString("sample", null);
|
||||
string9 = preferences1.getString("validity", null);
|
||||
SharedPreferences preferences4=getSharedPreferences("PhoneBook3",MODE_PRIVATE);
|
||||
|
||||
// string10 = preferences4.getString("uri", null);
|
||||
// Log.e("main", "error "+resulturiset);
|
||||
|
||||
|
||||
Log.e("main", "error "+ImageUri1);
|
||||
|
||||
Log.e("main", "string10 "+ImageUri1);
|
||||
|
||||
|
||||
|
||||
report1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ValidateProductData();
|
||||
|
||||
/* Intent intent = new Intent(AddImage.this, Report.class);
|
||||
startActivity(intent);*/
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
if(ContextCompat.checkSelfPermission(AddImage.this, Manifest.permission.WRITE_EXTERNAL_STORAGE)!= PackageManager.PERMISSION_GRANTED)
|
||||
{
|
||||
|
||||
ActivityCompat.requestPermissions(AddImage.this,new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},PERMISSION_FILE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//startCropImageActivity();
|
||||
CropImage.activity()
|
||||
.setGuidelines(CropImageView.Guidelines.ON)
|
||||
.setCropShape(CropImageView.CropShape.OVAL)
|
||||
|
||||
.start(AddImage.this);
|
||||
|
||||
}
|
||||
initTensorFlowAndLoadModel();
|
||||
|
||||
}
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
executor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
classifier.close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initTensorFlowAndLoadModel() {
|
||||
executor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
classifier = TensorFlowImageClassifier.create(
|
||||
getAssets(),
|
||||
MODEL_PATH,
|
||||
LABEL_PATH,
|
||||
INPUT_SIZE);
|
||||
} catch (final Exception e) {
|
||||
throw new RuntimeException("Error initializing TensorFlow!", e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
|
||||
if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {
|
||||
CropImage.ActivityResult result = CropImage.getActivityResult(data);
|
||||
if (resultCode == RESULT_OK) {
|
||||
|
||||
Uri resultUri = result.getUri();
|
||||
ImageUri1=resultUri;
|
||||
// String message = data.getStringExtra("message");
|
||||
// resulturiset.equals(resultUri.toString());
|
||||
data.putExtra("uri",resultUri.toString());//Put Message to pass over intent
|
||||
|
||||
SharedPreferences preferences = getSharedPreferences("PhoneBook3", MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
|
||||
// editor.putString(Name, phonenum);
|
||||
editor.putString("uri", resultUri.toString());
|
||||
|
||||
|
||||
|
||||
|
||||
editor.commit();
|
||||
Log.e("main", "error "+resultUri);
|
||||
|
||||
|
||||
try {
|
||||
Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), resultUri);
|
||||
bitmap = Bitmap.createScaledBitmap(bitmap, INPUT_SIZE, INPUT_SIZE, false);
|
||||
|
||||
circle_image.setImageBitmap(bitmap);
|
||||
|
||||
final List<Classifier.Recognition> results = classifier.recognizeImage(bitmap);
|
||||
|
||||
text.setText(results.toString());
|
||||
testdta=results.toString();
|
||||
testdta=testdta.replaceAll("[^a-zA-Z]","");
|
||||
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
// circle_image.setImageURI(resultUri);
|
||||
} else if (resultCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) {
|
||||
Exception error = result.getError();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
nosave=findViewById(R.id.report2);
|
||||
nosave.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
Intent intent = new Intent(AddImage.this, Report.class);
|
||||
loadingBar.dismiss();
|
||||
SharedPreferences preferences9=getSharedPreferences("PhoneBook_number7",MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor2=preferences9.edit();
|
||||
|
||||
// editor.putString(Name, phonenum);
|
||||
editor2.putString("result",testdta);
|
||||
|
||||
|
||||
editor2.commit();
|
||||
|
||||
startActivity(intent);
|
||||
j=1;
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void ValidateProductData()
|
||||
{
|
||||
|
||||
if (!isOnline()) {
|
||||
//Create an alertdialog
|
||||
AlertDialog.Builder Checkbuilder = new AlertDialog.Builder(AddImage.this);
|
||||
Checkbuilder.setTitle("No Internet Connection !");
|
||||
Checkbuilder.setMessage("Check Your Internet Connection.");
|
||||
//Builder Retry Button
|
||||
|
||||
Checkbuilder.setPositiveButton("Retry", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
Checkbuilder.setNegativeButton("Exit", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
AlertDialog alert = Checkbuilder.create();
|
||||
alert.show();
|
||||
|
||||
}
|
||||
else {
|
||||
StoreProductInformation();
|
||||
}
|
||||
|
||||
}
|
||||
private void StoreProductInformation()
|
||||
{
|
||||
loadingBar.setTitle("Add Test");
|
||||
loadingBar.setMessage("Please wait while we are adding the Test Details .");
|
||||
loadingBar.setCanceledOnTouchOutside(false);
|
||||
loadingBar.show();
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
SimpleDateFormat currentDate = new SimpleDateFormat("MMM dd, yyyy");
|
||||
saveCurrentDate = currentDate.format(calendar.getTime());
|
||||
|
||||
SimpleDateFormat currentTime = new SimpleDateFormat("HH:mm:ss a");
|
||||
saveCurrentTime = currentTime.format(calendar.getTime());
|
||||
|
||||
TestRandomKey = saveCurrentDate + saveCurrentTime+number;
|
||||
|
||||
|
||||
final StorageReference filePath1 =TestImagesRef.child(ImageUri1.getLastPathSegment() + TestRandomKey + ".jpg");
|
||||
|
||||
final UploadTask uploadTask1 = filePath1.putFile(ImageUri1);
|
||||
|
||||
|
||||
uploadTask1.addOnFailureListener(new OnFailureListener() {
|
||||
@Override
|
||||
public void onFailure(@NonNull Exception e)
|
||||
{
|
||||
String message = e.toString();
|
||||
Toast.makeText(AddImage.this, "Error: " + message, Toast.LENGTH_SHORT).show();
|
||||
loadingBar.dismiss();
|
||||
}
|
||||
}).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
|
||||
@Override
|
||||
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot)
|
||||
{
|
||||
// Toast.makeText(Farmer_add_new_Products.this, "Product Image uploaded Successfully...", Toast.LENGTH_SHORT).show();
|
||||
|
||||
Task<Uri> urlTask = uploadTask1.continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {
|
||||
@Override
|
||||
public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception
|
||||
{
|
||||
if (!task.isSuccessful())
|
||||
{
|
||||
throw task.getException();
|
||||
}
|
||||
|
||||
downloadImageUrl1= filePath1.getDownloadUrl().toString();
|
||||
return filePath1.getDownloadUrl();
|
||||
}
|
||||
}).addOnCompleteListener(new OnCompleteListener<Uri>() {
|
||||
@Override
|
||||
public void onComplete(@NonNull Task<Uri> task)
|
||||
{
|
||||
if (task.isSuccessful()) {
|
||||
downloadImageUrl1 = task.getResult().toString();
|
||||
if (!isOnline()) {
|
||||
//Create an alertdialog
|
||||
AlertDialog.Builder Checkbuilder = new AlertDialog.Builder(AddImage.this);
|
||||
Checkbuilder.setTitle("No Internet Connection !");
|
||||
Checkbuilder.setMessage("Check Your Internet Connection.");
|
||||
//Builder Retry Button
|
||||
|
||||
Checkbuilder.setPositiveButton("Retry", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
Checkbuilder.setNegativeButton("Exit", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
AlertDialog alert = Checkbuilder.create();
|
||||
alert.show();
|
||||
|
||||
} else {
|
||||
|
||||
SaveProductInfoToDatabase();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void SaveProductInfoToDatabase()
|
||||
{
|
||||
HashMap<String, Object> productMap = new HashMap<>();
|
||||
productMap.put("Primary_Key",TestRandomKey);
|
||||
productMap.put("Time", saveCurrentTime);
|
||||
productMap.put("Image", downloadImageUrl1);
|
||||
productMap.put("Result",testdta);
|
||||
|
||||
productMap.put("Gender", string1);
|
||||
productMap.put("Patient_Id", string2.toLowerCase());
|
||||
productMap.put("Patient_Age", string3);
|
||||
|
||||
productMap.put("Lab_Number", string6);
|
||||
productMap.put("SPIN_Tube_ID", string7);
|
||||
productMap.put("Sample_Type", string8);
|
||||
productMap.put("Tube_Validity", string9);
|
||||
|
||||
productMap.put("National_Id", string4);
|
||||
productMap.put("Dob", string5);
|
||||
productMap.put("sdate",saveCurrentDate );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
TestRef.child(TestRandomKey).updateChildren(productMap)
|
||||
.addOnCompleteListener(new OnCompleteListener<Void>() {
|
||||
@Override
|
||||
public void onComplete(@NonNull Task<Void> task)
|
||||
{
|
||||
if (task.isSuccessful()) {
|
||||
|
||||
Intent intent = new Intent(AddImage.this, Report.class);
|
||||
loadingBar.dismiss();
|
||||
Toast.makeText(AddImage.this, "Test Details is added successfully ", Toast.LENGTH_SHORT).show();
|
||||
SharedPreferences preferences9=getSharedPreferences("PhoneBook_number7",MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor2=preferences9.edit();
|
||||
|
||||
// editor.putString(Name, phonenum);
|
||||
editor2.putString("result",testdta);
|
||||
|
||||
|
||||
editor2.commit();
|
||||
|
||||
startActivity(intent);
|
||||
j=1;
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
loadingBar.dismiss();
|
||||
String message = task.getException().toString();
|
||||
Toast.makeText(AddImage.this, "Error: " + message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
|
||||
Intent intent = new Intent(AddImage.this, TestResult.class);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
public boolean isOnline() {
|
||||
ConnectivityManager connMgr = (ConnectivityManager)
|
||||
getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
|
||||
return (networkInfo != null && networkInfo.isConnected());
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
|
||||
public class CameraGuide extends AppCompatActivity {
|
||||
private Button Intro;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
|
||||
WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
|
||||
setContentView(R.layout.activity_camera__guide);
|
||||
Intro=findViewById(R.id.intro);
|
||||
|
||||
|
||||
|
||||
Intro.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
|
||||
Intent intent = new Intent(getApplicationContext(), AddImage.class );
|
||||
startActivity(intent);
|
||||
|
||||
savePrefsData();
|
||||
finish();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
private void savePrefsData() {
|
||||
|
||||
SharedPreferences pref = getApplicationContext().getSharedPreferences("myPrefs",MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = pref.edit();
|
||||
editor.putBoolean("isIntroOpnend",true);
|
||||
editor.commit();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
61
app/src/main/java/in/sminnovations/arrest_tb/Classifier.java
Normal file
@@ -0,0 +1,61 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface Classifier {
|
||||
|
||||
class Recognition {
|
||||
|
||||
private final String id;
|
||||
|
||||
|
||||
private final String title;
|
||||
|
||||
|
||||
private final Float confidence;
|
||||
|
||||
public Recognition(
|
||||
final String id, final String title, final Float confidence) {
|
||||
this.id = id;
|
||||
this.title = title;
|
||||
this.confidence = confidence;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public Float getConfidence() {
|
||||
return confidence;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String resultString = "";
|
||||
if (id != null) {
|
||||
resultString += "[" + id + "] ";
|
||||
}
|
||||
|
||||
if (title != null) {
|
||||
resultString += title + " ";
|
||||
}
|
||||
|
||||
if (confidence != null) {
|
||||
resultString += String.format("(%.1f%%) ", confidence * 100.0f);
|
||||
}
|
||||
|
||||
return resultString.trim();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
List<Recognition> recognizeImage(Bitmap bitmap);
|
||||
|
||||
void close();
|
||||
}
|
||||
109
app/src/main/java/in/sminnovations/arrest_tb/CreatePassword.java
Normal file
@@ -0,0 +1,109 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.google.firebase.database.DatabaseReference;
|
||||
import com.google.firebase.database.FirebaseDatabase;
|
||||
|
||||
import in.sminnovations.arrest_tb.Model.RegisterHelper;
|
||||
|
||||
|
||||
public class CreatePassword extends AppCompatActivity {
|
||||
private Button next;
|
||||
|
||||
String name,phonenumber,num1,num2;
|
||||
private EditText passworddata;
|
||||
private EditText ConfirmPassword;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_create__password);
|
||||
passworddata=findViewById(R.id.password);
|
||||
ConfirmPassword=findViewById(R.id.confirmpassword);
|
||||
next=findViewById(R.id.next);
|
||||
|
||||
next.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
num1 = ConfirmPassword.getText().toString();
|
||||
num2 = passworddata.getText().toString();
|
||||
if (!isOnline()) {
|
||||
//Create an alertdialog
|
||||
AlertDialog.Builder Checkbuilder = new AlertDialog.Builder(CreatePassword.this);
|
||||
Checkbuilder.setTitle("No Internet Connection !");
|
||||
Checkbuilder.setMessage("Check Your Internet Connection.");
|
||||
//Builder Retry Button
|
||||
|
||||
Checkbuilder.setPositiveButton("Retry", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
Checkbuilder.setNegativeButton("Exit", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
AlertDialog alert = Checkbuilder.create();
|
||||
alert.show();
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
if (num1.equals(num2)) {
|
||||
Intent intent = new Intent(CreatePassword.this, LoginScreen.class);
|
||||
name = getIntent().getStringExtra("username");
|
||||
|
||||
String phonenumberk = getIntent().getStringExtra("mobile");
|
||||
phonenumber = phonenumberk;
|
||||
|
||||
FirebaseDatabase rootNode = FirebaseDatabase.getInstance();
|
||||
DatabaseReference reference = rootNode.getReference("USERS");
|
||||
RegisterHelper addNewUser = new RegisterHelper(name, phonenumber, num1);
|
||||
|
||||
reference.child(phonenumber).setValue(addNewUser);
|
||||
intent.putExtra("mobile", phonenumber);
|
||||
intent.putExtra("username", name);
|
||||
|
||||
Toast.makeText(CreatePassword.this, "You are Registered Successfully ", Toast.LENGTH_SHORT).show();
|
||||
startActivity(intent);
|
||||
|
||||
|
||||
} else {
|
||||
ConfirmPassword.setError("Password does not match");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
public boolean isOnline() {
|
||||
ConnectivityManager connMgr = (ConnectivityManager)
|
||||
getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
|
||||
return (networkInfo != null && networkInfo.isConnected());
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Typeface;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
|
||||
public class FontAwesome extends AppCompatTextView {
|
||||
|
||||
|
||||
public FontAwesome(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
init();
|
||||
}
|
||||
|
||||
public FontAwesome(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init();
|
||||
}
|
||||
|
||||
public FontAwesome(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
|
||||
Typeface tf = Typeface.createFromAsset(getContext().getAssets(),
|
||||
"fa-solid-900.ttf");
|
||||
setTypeface(tf);
|
||||
}
|
||||
|
||||
}
|
||||
258
app/src/main/java/in/sminnovations/arrest_tb/ForgetPassword.java
Normal file
@@ -0,0 +1,258 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.chaos.view.PinView;
|
||||
import com.google.android.gms.tasks.OnCompleteListener;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.TaskExecutors;
|
||||
import com.google.firebase.FirebaseException;
|
||||
import com.google.firebase.auth.AuthResult;
|
||||
import com.google.firebase.auth.FirebaseAuth;
|
||||
import com.google.firebase.auth.PhoneAuthCredential;
|
||||
import com.google.firebase.auth.PhoneAuthProvider;
|
||||
import com.google.firebase.database.DataSnapshot;
|
||||
import com.google.firebase.database.DatabaseError;
|
||||
import com.google.firebase.database.FirebaseDatabase;
|
||||
import com.google.firebase.database.Query;
|
||||
import com.google.firebase.database.ValueEventListener;
|
||||
import com.hbb20.CountryCodePicker;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import in.sminnovations.arrest_tb.VerifyOTP.VerifyOtpForgetPassword;
|
||||
|
||||
|
||||
public class ForgetPassword extends AppCompatActivity {
|
||||
|
||||
private String verificationid;
|
||||
private FirebaseAuth mAuth;
|
||||
private int code = 91;
|
||||
private Button nextactivity;
|
||||
private ProgressBar progressBar;
|
||||
CountryCodePicker ccp;
|
||||
PinView pinFromUser;
|
||||
String mobile;
|
||||
|
||||
private EditText editTextnumber;
|
||||
String codeBySystem;
|
||||
boolean exists;
|
||||
String address,name, state , city ,pincode,phonenumber,password2,num1,phonenum;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_forget__password);
|
||||
editTextnumber=findViewById(R.id.editTextMobile);
|
||||
ccp=findViewById(R.id.ccp);
|
||||
ccp.registerCarrierNumberEditText(editTextnumber);
|
||||
// nextactivity = findViewById(R.id.buttonSignIn);
|
||||
|
||||
mAuth = FirebaseAuth.getInstance();
|
||||
|
||||
|
||||
findViewById(R.id.buttonSignIn).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (!isOnline()) {
|
||||
//Create an alertdialog
|
||||
AlertDialog.Builder Checkbuilder = new AlertDialog.Builder(ForgetPassword.this);
|
||||
Checkbuilder.setTitle("No Internet Connection !");
|
||||
Checkbuilder.setMessage("Check Your Internet Connection.");
|
||||
//Builder Retry Button
|
||||
|
||||
Checkbuilder.setPositiveButton("Retry", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
/* //Restart The Activity
|
||||
Intent intent = getIntent();
|
||||
finish();
|
||||
startActivity(intent);*/
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
Checkbuilder.setNegativeButton("Exit", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
AlertDialog alert = Checkbuilder.create();
|
||||
alert.show();
|
||||
|
||||
} else {
|
||||
|
||||
mobile = editTextnumber.getText().toString().trim();
|
||||
mobile = mobile.replaceAll("[^0-9]", "");
|
||||
|
||||
|
||||
phonenum = ccp.getFullNumberWithPlus();
|
||||
if(mobile.equals(""))
|
||||
{
|
||||
editTextnumber.setError("Enter the contact number");
|
||||
}
|
||||
|
||||
|
||||
Query chekuser = FirebaseDatabase.getInstance().getReference("USERS").orderByChild("number").equalTo(mobile);
|
||||
chekuser.addListenerForSingleValueEvent(new ValueEventListener() {
|
||||
@Override
|
||||
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
|
||||
if (dataSnapshot.exists()) {
|
||||
Intent intent = new Intent(ForgetPassword.this, VerifyOtpForgetPassword.class);
|
||||
Toast.makeText(ForgetPassword.this, "We Have Sent the OTP to your mentioned Number", Toast.LENGTH_SHORT).show();
|
||||
intent.putExtra("mobilecode", phonenum);
|
||||
intent.putExtra("mobile", mobile);
|
||||
|
||||
startActivity(intent);
|
||||
|
||||
|
||||
} else {
|
||||
// Toast.makeText(ForgetPassword.this,phonenum,Toast.LENGTH_SHORT).show();
|
||||
editTextnumber.setError("No Such User Exists");
|
||||
|
||||
// Toast.makeText(ForgetPassword.this,"NO such user exists",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancelled(@NonNull DatabaseError databaseError) {
|
||||
Log.e("Raman", "Received an exception check chexk " + databaseError.getMessage());
|
||||
|
||||
// Toast.makeText(ForgetPassword.this,databaseError.getMessage(),Toast.LENGTH_SHORT).show();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
private void verifyCode(String code){
|
||||
PhoneAuthCredential credential = PhoneAuthProvider.getCredential(verificationid, code);
|
||||
signInWithCredential(credential);
|
||||
}
|
||||
|
||||
private void signInWithCredential(PhoneAuthCredential credential) {
|
||||
mAuth.signInWithCredential(credential)
|
||||
.addOnCompleteListener(new OnCompleteListener<AuthResult>() {
|
||||
@Override
|
||||
public void onComplete(@NonNull Task<AuthResult> task) {
|
||||
if (task.isSuccessful()) {
|
||||
|
||||
Intent intent = new Intent(ForgetPassword.this, ForgetPasswordReset.class);
|
||||
intent.putExtra("mobile", mobile);
|
||||
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
|
||||
|
||||
startActivity(intent);
|
||||
|
||||
} else {
|
||||
Toast.makeText(ForgetPassword.this, task.getException().getMessage(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private void sendVerificationCode(String number){
|
||||
|
||||
PhoneAuthProvider.getInstance().verifyPhoneNumber(
|
||||
number,
|
||||
60,
|
||||
TimeUnit.SECONDS,
|
||||
TaskExecutors.MAIN_THREAD,
|
||||
mCallBack
|
||||
);
|
||||
}
|
||||
|
||||
private PhoneAuthProvider.OnVerificationStateChangedCallbacks
|
||||
mCallBack = new PhoneAuthProvider.OnVerificationStateChangedCallbacks() {
|
||||
|
||||
@Override
|
||||
public void onCodeSent(String s, PhoneAuthProvider.ForceResendingToken forceResendingToken) {
|
||||
super.onCodeSent(s, forceResendingToken);
|
||||
verificationid = s;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {
|
||||
String code = phoneAuthCredential.getSmsCode();
|
||||
if (code != null){
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
pinFromUser.setText(code);
|
||||
verifyCode(code);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onVerificationFailed(FirebaseException e) {
|
||||
Toast.makeText(ForgetPassword.this, e.getMessage(),Toast.LENGTH_LONG).show();
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
private void checkuserexist(String number)
|
||||
{
|
||||
Query chekuser= FirebaseDatabase.getInstance().getReference("USERS").orderByChild("number").equalTo(number);
|
||||
chekuser.addListenerForSingleValueEvent(new ValueEventListener() {
|
||||
@Override
|
||||
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
|
||||
if(dataSnapshot.exists())
|
||||
{
|
||||
exists= true;
|
||||
}
|
||||
else
|
||||
{
|
||||
exists=false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancelled(@NonNull DatabaseError databaseError) {
|
||||
Toast.makeText(ForgetPassword.this,databaseError.getMessage(),Toast.LENGTH_SHORT).show();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
public boolean isOnline() {
|
||||
ConnectivityManager connMgr = (ConnectivityManager)
|
||||
getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
|
||||
return (networkInfo != null && networkInfo.isConnected());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.google.firebase.database.DatabaseReference;
|
||||
import com.google.firebase.database.FirebaseDatabase;
|
||||
|
||||
public class ForgetPasswordReset extends AppCompatActivity {
|
||||
private Button next;
|
||||
|
||||
String phonenumber,num1,num2;
|
||||
private EditText passworddata;
|
||||
private EditText ConfirmPassword;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_create__password);
|
||||
passworddata=findViewById(R.id.password);
|
||||
ConfirmPassword=findViewById(R.id.confirmpassword);
|
||||
next=findViewById(R.id.next);
|
||||
|
||||
|
||||
|
||||
next.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
num1 = ConfirmPassword.getText().toString();
|
||||
num2=passworddata.getText().toString();
|
||||
if(num1.equals(num2)) {
|
||||
|
||||
Intent intent = new Intent(ForgetPasswordReset.this, LoginScreen.class);
|
||||
|
||||
String phonenumberk = getIntent().getStringExtra("mobile");
|
||||
phonenumber = phonenumberk;
|
||||
|
||||
FirebaseDatabase rootNode = FirebaseDatabase.getInstance();
|
||||
DatabaseReference reference = rootNode.getReference("USERS");
|
||||
|
||||
|
||||
reference.child(phonenumber).child("password").setValue(num1);
|
||||
Toast.makeText(ForgetPasswordReset.this, "Password Reset Successfully ", Toast.LENGTH_SHORT).show();
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ConfirmPassword.setError("Password does not match");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package in.sminnovations.arresttb;
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
@@ -7,7 +7,7 @@ import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
|
||||
public class Home extends Navigation_Top {
|
||||
public class Home extends NavigationTop {
|
||||
private Button add_patient,about;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -21,19 +21,18 @@ private Button add_patient,about;
|
||||
add_patient.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent (Home.this, Patient_Detail.class);
|
||||
Intent intent=new Intent (Home.this, PatientDetail.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
about.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent (Home.this,About.class);
|
||||
Intent intent=new Intent (Home.this, About.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//setContentView(R.layout.activity_home);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package in.sminnovations.arrest_tb.Interface;
|
||||
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface ItemClickListner
|
||||
{
|
||||
void onClick(View view, int position, boolean isLongClick);
|
||||
}
|
||||
245
app/src/main/java/in/sminnovations/arrest_tb/LoginScreen.java
Normal file
@@ -0,0 +1,245 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.os.Bundle;
|
||||
import android.text.method.HideReturnsTransformationMethod;
|
||||
import android.text.method.PasswordTransformationMethod;
|
||||
import android.util.Patterns;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.AppCompatCheckBox;
|
||||
|
||||
import com.google.firebase.database.DataSnapshot;
|
||||
import com.google.firebase.database.DatabaseError;
|
||||
import com.google.firebase.database.DatabaseReference;
|
||||
import com.google.firebase.database.FirebaseDatabase;
|
||||
import com.google.firebase.database.Query;
|
||||
import com.google.firebase.database.ValueEventListener;
|
||||
|
||||
|
||||
public class LoginScreen extends AppCompatActivity {
|
||||
|
||||
private TextView createaccount, forgetpassword;
|
||||
private Button login;
|
||||
private DatabaseReference databaseReference;
|
||||
private EditText phonenumber, password;
|
||||
String passworddata, phonenum, phonenumbers, name;
|
||||
private ProgressDialog loadingBar;
|
||||
public static final String Name = "nameKey";
|
||||
public static final String Phone = "phoneKey";
|
||||
private ImageButton close;
|
||||
private AppCompatCheckBox checkbox;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_login__screen);
|
||||
createaccount = findViewById(R.id.createaccount);
|
||||
phonenumber = findViewById(R.id.contactnumber);
|
||||
checkbox = (AppCompatCheckBox) findViewById(R.id.showpassword);
|
||||
|
||||
password = findViewById(R.id.password);
|
||||
checkbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) {
|
||||
if (isChecked) {
|
||||
// show password
|
||||
password.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
|
||||
} else {
|
||||
// hide password
|
||||
password.setTransformationMethod(PasswordTransformationMethod.getInstance());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Paper.init(this);
|
||||
loadingBar = new ProgressDialog(this);
|
||||
// Paper.init(this);
|
||||
|
||||
login = findViewById(R.id.login);
|
||||
forgetpassword = findViewById(R.id.forgetpassword);
|
||||
forgetpassword.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(LoginScreen.this, ForgetPassword.class);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
});
|
||||
login.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (!isOnline()) {
|
||||
//Create an alertdialog
|
||||
AlertDialog.Builder Checkbuilder = new AlertDialog.Builder(LoginScreen.this);
|
||||
Checkbuilder.setTitle("No Internet Connection !");
|
||||
Checkbuilder.setMessage("Check Your Internet Connection.");
|
||||
//Builder Retry Button
|
||||
|
||||
Checkbuilder.setPositiveButton("Retry", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
Checkbuilder.setNegativeButton("Exit", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
AlertDialog alert = Checkbuilder.create();
|
||||
alert.show();
|
||||
|
||||
} else {
|
||||
String mobile = phonenumber.getText().toString().trim();
|
||||
phonenum = mobile;
|
||||
final String passwordj = password.getText().toString().trim();
|
||||
|
||||
|
||||
if (mobile.equals("") || passwordj.equals("")) {
|
||||
Toast.makeText(LoginScreen.this, "Please enter all the required fields", Toast.LENGTH_SHORT).show();
|
||||
|
||||
} else if (!Patterns.PHONE.matcher(mobile).matches()) {
|
||||
|
||||
phonenumber.setError("Enter a valid number");
|
||||
|
||||
} else {
|
||||
loadingBar.setTitle("Login Account");
|
||||
loadingBar.setMessage("Please wait, while we are checking the credentials.");
|
||||
loadingBar.setCanceledOnTouchOutside(false);
|
||||
loadingBar.show();
|
||||
|
||||
Query chekuser = FirebaseDatabase.getInstance().getReference("USERS").orderByChild("number").equalTo(phonenum);
|
||||
chekuser.addListenerForSingleValueEvent(new ValueEventListener() {
|
||||
@Override
|
||||
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
|
||||
if (dataSnapshot.exists()) {
|
||||
String systempassword = dataSnapshot.child(phonenum).child("password").getValue(String.class);
|
||||
|
||||
if (systempassword.equals(passwordj)) {
|
||||
|
||||
Toast.makeText(LoginScreen.this, "logged in Successfully...", Toast.LENGTH_SHORT).show();
|
||||
loadingBar.dismiss();
|
||||
String name = dataSnapshot.child(phonenum).child("name").getValue(String.class);
|
||||
|
||||
|
||||
SharedPreferences preferences = getSharedPreferences("PhoneBook_number", MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
|
||||
// editor.putString(Name, phonenum);
|
||||
editor.putString("Phone", phonenum);
|
||||
editor.putString("Name", name);
|
||||
|
||||
|
||||
editor.commit();
|
||||
|
||||
|
||||
Intent intent = new Intent(LoginScreen.this, MainActivity.class);
|
||||
|
||||
|
||||
intent.putExtra("mobile", phonenum);
|
||||
|
||||
startActivity(intent);
|
||||
|
||||
} else {
|
||||
loadingBar.dismiss();
|
||||
|
||||
Toast.makeText(LoginScreen.this, "Wrong Password", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} else {
|
||||
loadingBar.dismiss();
|
||||
|
||||
Toast.makeText(LoginScreen.this, "No such user exists", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancelled(@NonNull DatabaseError databaseError) {
|
||||
Toast.makeText(LoginScreen.this, databaseError.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
createaccount.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(LoginScreen.this, Register.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void finishQuiz() {
|
||||
if (!isOnline()) {
|
||||
|
||||
AlertDialog.Builder Checkbuilder = new AlertDialog.Builder(LoginScreen.this);
|
||||
Checkbuilder.setTitle("Error!");
|
||||
Checkbuilder.setMessage("Enable your internet connection and Retry ");
|
||||
|
||||
Checkbuilder.setPositiveButton("Retry", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
dialog.cancel();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
Checkbuilder.setNegativeButton("Exit", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
AlertDialog alert = Checkbuilder.create();
|
||||
alert.show();
|
||||
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
|
||||
finishAffinity();
|
||||
finish();
|
||||
}
|
||||
|
||||
public boolean isOnline() {
|
||||
ConnectivityManager connMgr = (ConnectivityManager)
|
||||
getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
|
||||
return (networkInfo != null && networkInfo.isConnected());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
326
app/src/main/java/in/sminnovations/arrest_tb/MainActivity.java
Normal file
@@ -0,0 +1,326 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.SearchView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.firebase.ui.database.FirebaseRecyclerAdapter;
|
||||
import com.firebase.ui.database.FirebaseRecyclerOptions;
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.google.firebase.database.DatabaseReference;
|
||||
import com.google.firebase.database.FirebaseDatabase;
|
||||
import com.google.firebase.database.Query;
|
||||
|
||||
import in.sminnovations.arrest_tb.Model.Tests;
|
||||
|
||||
|
||||
public class MainActivity extends NavigationTop {
|
||||
private DatabaseReference TestRef;
|
||||
private RecyclerView recyclerView;
|
||||
|
||||
private TextView info;
|
||||
FloatingActionButton fasbs;
|
||||
|
||||
String number;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
LayoutInflater inflater = (LayoutInflater) this
|
||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
View contentView = inflater.inflate(R.layout.activity_main, null, false);
|
||||
draw.addView(contentView, 0);
|
||||
|
||||
SharedPreferences preferences6 = getSharedPreferences("PhoneBook_number", MODE_PRIVATE);
|
||||
|
||||
number = preferences6.getString("Phone", null);
|
||||
fasbs=findViewById(R.id.fab);
|
||||
info=findViewById(R.id.info);
|
||||
info.setVisibility(View.VISIBLE);
|
||||
|
||||
Log.e("main", "error "+number);
|
||||
TestRef = FirebaseDatabase.getInstance().getReference().child("Test_Data").child(number);
|
||||
recyclerView = findViewById(R.id.recycler_view);
|
||||
fasbs.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent(MainActivity.this, PatientDetail.class);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
LinearLayoutManager layoutManager1=new LinearLayoutManager(this);
|
||||
|
||||
recyclerView.setLayoutManager(new GridLayoutManager(this, 1));
|
||||
|
||||
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
|
||||
int height = displayMetrics.heightPixels / 8;
|
||||
int spaceInPixel = 4;
|
||||
recyclerView.addItemDecoration(new SpaceDecoration(spaceInPixel));
|
||||
|
||||
}
|
||||
@Override
|
||||
protected void onStart()
|
||||
{
|
||||
super.onStart();
|
||||
|
||||
FirebaseRecyclerOptions<Tests> options =
|
||||
new FirebaseRecyclerOptions.Builder<Tests>()
|
||||
.setQuery(TestRef, Tests.class)
|
||||
.build();
|
||||
|
||||
|
||||
FirebaseRecyclerAdapter<Tests, TestViewHolder> adapter =
|
||||
new FirebaseRecyclerAdapter<Tests, TestViewHolder>(options) {
|
||||
@Override
|
||||
protected void onBindViewHolder(@NonNull TestViewHolder holder, int position, @NonNull final Tests model)
|
||||
{
|
||||
if(model.getResult().contains("positive") || model.getResult().contains("negative"))
|
||||
{
|
||||
info.setVisibility(View.INVISIBLE);
|
||||
|
||||
}
|
||||
|
||||
holder.txtpatientid.setText("Patient ID :"+model.getPatient_Id());
|
||||
holder.txtsampletype.setText("Sample Type :" +model.getSample_Type());
|
||||
holder.nikshay.setText("National ID :"+model.getNational_Id());
|
||||
holder.txttimestamp.setText(model.getSdate());
|
||||
if(model.getResult().contains("positive") )
|
||||
{
|
||||
holder.iconfinder.setBackgroundResource(R.drawable.green_circle);
|
||||
holder.iconfinder.setText("P");
|
||||
|
||||
|
||||
|
||||
Log.e("main", "error id"+model.getPrimary_Key());
|
||||
|
||||
}
|
||||
|
||||
//holder.txtProductDescription.setText(model.getSample());
|
||||
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent(MainActivity.this, TestDetails.class);
|
||||
Log.e("main", "error id"+model.getPrimary_Key());
|
||||
|
||||
intent.putExtra("pid",model.getPrimary_Key());
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public TestViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType)
|
||||
{
|
||||
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.demo, parent, false);
|
||||
TestViewHolder holder = new TestViewHolder(view);
|
||||
return holder;
|
||||
}
|
||||
};
|
||||
recyclerView.setAdapter(adapter);
|
||||
adapter.startListening();
|
||||
}
|
||||
private void firebasesearch(String data)
|
||||
{
|
||||
{
|
||||
Query firebaseSearchQuery = TestRef.orderByChild("Patient_Id").startAt(data).endAt(data + "\uf8ff");
|
||||
FirebaseRecyclerOptions<Tests> options =
|
||||
new FirebaseRecyclerOptions.Builder<Tests>()
|
||||
.setQuery(firebaseSearchQuery, Tests.class)
|
||||
.build();
|
||||
|
||||
|
||||
FirebaseRecyclerAdapter<Tests, TestViewHolder> adapter =
|
||||
new FirebaseRecyclerAdapter<Tests, TestViewHolder>(options) {
|
||||
@Override
|
||||
protected void onBindViewHolder(@NonNull final TestViewHolder holder, int position, @NonNull final Tests model)
|
||||
{
|
||||
holder.txtpatientid.setText("Patient ID :"+model.getPatient_Id());
|
||||
holder.txtsampletype.setText("Sample Type :" +model.getSample_Type());
|
||||
holder.nikshay.setText("National ID :"+model.getNational_Id());
|
||||
holder.txttimestamp.setText(model.getSdate());
|
||||
if(model.getPatient_Id().isEmpty())
|
||||
{
|
||||
info.setVisibility(View.VISIBLE);
|
||||
|
||||
|
||||
}
|
||||
if(model.getResult().contains("positive"))
|
||||
{
|
||||
holder.iconfinder.setBackgroundResource(R.drawable.green_circle);
|
||||
holder.iconfinder.setText("P");
|
||||
|
||||
Log.e("main", "error vvvvv id"+model.getSdate());
|
||||
|
||||
|
||||
Log.e("main", "error id"+model.getPrimary_Key());
|
||||
|
||||
}
|
||||
|
||||
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Log.d("LOGCAT", "" + model.getPrimary_Key());
|
||||
|
||||
Intent intent=new Intent(MainActivity.this, TestDetails.class);
|
||||
intent.putExtra("pid",model.getPrimary_Key());
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public TestViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType)
|
||||
{
|
||||
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.demo, parent, false);
|
||||
TestViewHolder holder = new TestViewHolder(view);
|
||||
return holder;
|
||||
}
|
||||
};
|
||||
recyclerView.setAdapter(adapter);
|
||||
adapter.startListening();
|
||||
}
|
||||
}
|
||||
private void searchfilter(String data)
|
||||
{
|
||||
{
|
||||
Query firebaseSearchQuery = TestRef.orderByChild("sample").startAt(data).endAt(data + "\uf8ff");
|
||||
FirebaseRecyclerOptions<Tests> options =
|
||||
new FirebaseRecyclerOptions.Builder<Tests>()
|
||||
.setQuery(firebaseSearchQuery, Tests.class)
|
||||
.build();
|
||||
|
||||
|
||||
FirebaseRecyclerAdapter<Tests, TestViewHolder> adapter =
|
||||
new FirebaseRecyclerAdapter<Tests, TestViewHolder>(options) {
|
||||
@Override
|
||||
protected void onBindViewHolder(@NonNull TestViewHolder holder, int position, @NonNull final Tests model)
|
||||
{
|
||||
|
||||
holder.txtpatientid.setText("Patient ID :"+model.getPatient_Id());
|
||||
holder.txtsampletype.setText("Sample Type :" +model.getSample_Type());
|
||||
holder.nikshay.setText("National ID :"+model.getNational_Id());
|
||||
holder.txttimestamp.setText(model.getSdate());
|
||||
if(model.getResult().contains("positive"))
|
||||
{
|
||||
holder.iconfinder.setBackgroundResource(R.drawable.green_circle);
|
||||
holder.iconfinder.setText("P");
|
||||
|
||||
|
||||
|
||||
Log.e("main", "error id"+model.getPrimary_Key());
|
||||
|
||||
}
|
||||
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent(MainActivity.this, TestDetails.class);
|
||||
intent.putExtra("pid",model.getPrimary_Key());
|
||||
startActivity(intent);
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public TestViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType)
|
||||
{
|
||||
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.demo, parent, false);
|
||||
TestViewHolder holder = new TestViewHolder(view);
|
||||
return holder;
|
||||
}
|
||||
};
|
||||
recyclerView.setAdapter(adapter);
|
||||
adapter.startListening();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
MenuInflater inflater=getMenuInflater();
|
||||
inflater.inflate(R.menu.searchmenu,menu);
|
||||
MenuItem item = menu.findItem(R.id.search);
|
||||
SearchView searchView = (SearchView) item.getActionView();
|
||||
//searchView.setIconified(false);
|
||||
//searchView.setIconifiedByDefault(false);
|
||||
searchView.setQueryHint("Search Patient ID");
|
||||
|
||||
|
||||
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
||||
@Override
|
||||
public boolean onQueryTextSubmit(String query) {
|
||||
query=query.toLowerCase();
|
||||
|
||||
firebasesearch(query);
|
||||
// processsearch(query);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onQueryTextChange(String newText) {
|
||||
newText=newText.toLowerCase();
|
||||
|
||||
firebasesearch(newText);
|
||||
|
||||
// processsearch(query);
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
private BottomNavigationView.OnNavigationItemSelectedListener navListener =
|
||||
new BottomNavigationView.OnNavigationItemSelectedListener() {
|
||||
@Override
|
||||
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
|
||||
switch (item.getItemId())
|
||||
{
|
||||
case R.id.nav_home:
|
||||
Intent intent=new Intent(MainActivity.this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
|
||||
finishAffinity();
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package in.sminnovations.arrest_tb.Model;
|
||||
|
||||
public class RegisterHelper {
|
||||
|
||||
String name, number, password;
|
||||
|
||||
public RegisterHelper(String name, String number, String password) {
|
||||
this.name = name;
|
||||
this.number = number;
|
||||
this.password = password;
|
||||
}
|
||||
public RegisterHelper() {
|
||||
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(String number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
}
|
||||
151
app/src/main/java/in/sminnovations/arrest_tb/Model/Tests.java
Normal file
@@ -0,0 +1,151 @@
|
||||
package in.sminnovations.arrest_tb.Model;
|
||||
|
||||
public class Tests {
|
||||
|
||||
private String Lab_Number, SPIN_Tube_ID, Dob, Gender, Image, Patient_Age, Patient_Id, National_Id, Primary_Key, Sample_Type, Tube_Validity, date, Time, Result,sdate;
|
||||
|
||||
|
||||
|
||||
public Tests() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
public String getLab_Number() {
|
||||
return Lab_Number;
|
||||
}
|
||||
|
||||
public void setLab_Number(String lab_Number) {
|
||||
Lab_Number = lab_Number;
|
||||
}
|
||||
|
||||
public String getSPIN_Tube_ID() {
|
||||
return SPIN_Tube_ID;
|
||||
}
|
||||
|
||||
public void setSPIN_Tube_ID(String SPIN_Tube_ID) {
|
||||
this.SPIN_Tube_ID = SPIN_Tube_ID;
|
||||
}
|
||||
|
||||
public String getDob() {
|
||||
return Dob;
|
||||
}
|
||||
|
||||
public void setDob(String dob) {
|
||||
Dob = dob;
|
||||
}
|
||||
|
||||
public String getGender() {
|
||||
return Gender;
|
||||
}
|
||||
|
||||
public void setGender(String gender) {
|
||||
Gender = gender;
|
||||
}
|
||||
|
||||
public String getImage() {
|
||||
return Image;
|
||||
}
|
||||
|
||||
public void setImage(String image) {
|
||||
Image = image;
|
||||
}
|
||||
|
||||
public String getPatient_Age() {
|
||||
return Patient_Age;
|
||||
}
|
||||
|
||||
public void setPatient_Age(String patient_Age) {
|
||||
Patient_Age = patient_Age;
|
||||
}
|
||||
|
||||
public String getPatient_Id() {
|
||||
return Patient_Id;
|
||||
}
|
||||
|
||||
public void setPatient_Id(String patient_Id) {
|
||||
Patient_Id = patient_Id;
|
||||
}
|
||||
|
||||
public String getNational_Id() {
|
||||
return National_Id;
|
||||
}
|
||||
|
||||
public void setNational_Id(String national_Id) {
|
||||
National_Id = national_Id;
|
||||
}
|
||||
|
||||
public String getPrimary_Key() {
|
||||
return Primary_Key;
|
||||
}
|
||||
|
||||
public void setPrimary_Key(String primary_Key) {
|
||||
Primary_Key = primary_Key;
|
||||
}
|
||||
|
||||
public String getSample_Type() {
|
||||
return Sample_Type;
|
||||
}
|
||||
|
||||
public void setSample_Type(String sample_Type) {
|
||||
Sample_Type = sample_Type;
|
||||
}
|
||||
|
||||
public String getTube_Validity() {
|
||||
return Tube_Validity;
|
||||
}
|
||||
|
||||
public void setTube_Validity(String tube_Validity) {
|
||||
Tube_Validity = tube_Validity;
|
||||
}
|
||||
|
||||
public String getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(String date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public String getTime() {
|
||||
return Time;
|
||||
}
|
||||
|
||||
public void setTime(String time) {
|
||||
Time = time;
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
return Result;
|
||||
}
|
||||
|
||||
public void setResult(String result) {
|
||||
Result = result;
|
||||
}
|
||||
|
||||
public String getSdate() {
|
||||
return sdate;
|
||||
}
|
||||
|
||||
public void setSdate(String sdate) {
|
||||
this.sdate = sdate;
|
||||
}
|
||||
|
||||
public Tests(String lab_Number, String SPIN_Tube_ID, String dob, String gender, String image, String patient_Age, String patient_Id, String national_Id, String primary_Key, String sample_Type, String tube_Validity, String date, String time, String result, String sdate) {
|
||||
Lab_Number = lab_Number;
|
||||
this.SPIN_Tube_ID = SPIN_Tube_ID;
|
||||
Dob = dob;
|
||||
Gender = gender;
|
||||
Image = image;
|
||||
Patient_Age = patient_Age;
|
||||
Patient_Id = patient_Id;
|
||||
National_Id = national_Id;
|
||||
Primary_Key = primary_Key;
|
||||
Sample_Type = sample_Type;
|
||||
Tube_Validity = tube_Validity;
|
||||
this.date = date;
|
||||
Time = time;
|
||||
Result = result;
|
||||
this.sdate = sdate;
|
||||
}
|
||||
}
|
||||
119
app/src/main/java/in/sminnovations/arrest_tb/NavigationTop.java
Normal file
@@ -0,0 +1,119 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
|
||||
import com.google.android.material.navigation.NavigationView;
|
||||
|
||||
public class NavigationTop extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {
|
||||
|
||||
protected DrawerLayout draw;
|
||||
private LinearLayout line;
|
||||
private Toolbar tool;
|
||||
|
||||
@Override
|
||||
public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) {
|
||||
switch (menuItem.getItemId())
|
||||
{
|
||||
|
||||
case R.id.nav_contact_us:
|
||||
Intent intent1=new Intent(this, About.class);
|
||||
startActivity(intent1);
|
||||
break;
|
||||
case R.id.nav_home:
|
||||
Intent intent2=new Intent(this, MainActivity.class);
|
||||
startActivity(intent2);
|
||||
break;
|
||||
case R.id.nav_add_Test:
|
||||
Intent intent3=new Intent(this, PatientDetail.class);
|
||||
startActivity(intent3);
|
||||
break;
|
||||
case R.id.nav_results:
|
||||
Intent intent6=new Intent(this, MainActivity.class);
|
||||
startActivity(intent6);
|
||||
break;
|
||||
case R.id.nav_negative:
|
||||
Intent intent4=new Intent(this, NegativeResults.class);
|
||||
startActivity(intent4);
|
||||
break;
|
||||
case R.id.nav_positive:
|
||||
Intent intent5=new Intent(this, PositiveResult.class);
|
||||
startActivity(intent5);
|
||||
break;
|
||||
case R.id.nav_logout:
|
||||
Intent intent8=new Intent(this, LoginScreen.class);
|
||||
SharedPreferences preferences = getSharedPreferences("PhoneBook_number", MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
|
||||
// editor.putString(Name, phonenum);
|
||||
editor.putString("Phone", null);
|
||||
editor.putString("Name",null);
|
||||
|
||||
|
||||
editor.commit();
|
||||
|
||||
startActivity(intent8);
|
||||
break;
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
|
||||
setContentView(R.layout.activity_navigation__top);
|
||||
|
||||
|
||||
draw = findViewById(R.id.Drawer);
|
||||
line = findViewById(R.id.line);
|
||||
tool = findViewById(R.id.tollbar);
|
||||
NavigationView navigationView = findViewById(R.id.navigation);
|
||||
navigationView.setNavigationItemSelectedListener(this);
|
||||
|
||||
setSupportActionBar(tool);
|
||||
|
||||
Window window = getWindow();
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
|
||||
|
||||
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, draw, tool, R.string.open_navigation_drawer, R.string.close_navigation_drawer) {
|
||||
@Override
|
||||
public void onDrawerSlide(View drawerView, float slideOffset) {
|
||||
super.onDrawerSlide(drawerView, slideOffset);
|
||||
float sidebar = drawerView.getWidth() * slideOffset;
|
||||
line.setTranslationX(sidebar);
|
||||
}
|
||||
};
|
||||
|
||||
draw.addDrawerListener(toggle);
|
||||
toggle.syncState();
|
||||
View headerView = navigationView.getHeaderView(0);
|
||||
TextView textView=headerView.findViewById(R.id.text);
|
||||
TextView textView1=headerView.findViewById(R.id.not_sign_in);
|
||||
|
||||
SharedPreferences preferences=getSharedPreferences("PhoneBook_number",MODE_PRIVATE);
|
||||
|
||||
String string1 = preferences.getString("Phone", null);
|
||||
String string2 = preferences.getString("Name", null);
|
||||
textView.setText(string2);
|
||||
textView1.setText(string1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.firebase.ui.database.FirebaseRecyclerAdapter;
|
||||
import com.firebase.ui.database.FirebaseRecyclerOptions;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.google.firebase.database.DatabaseReference;
|
||||
import com.google.firebase.database.FirebaseDatabase;
|
||||
import com.google.firebase.database.Query;
|
||||
|
||||
import in.sminnovations.arrest_tb.Model.Tests;
|
||||
|
||||
|
||||
public class NegativeResults extends NavigationTop {
|
||||
private DatabaseReference TestRef;
|
||||
private RecyclerView recyclerView;
|
||||
|
||||
private TextView info;
|
||||
|
||||
FloatingActionButton fasbs;
|
||||
|
||||
String number;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
LayoutInflater inflater = (LayoutInflater) this
|
||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
View contentView = inflater.inflate(R.layout.activity_main, null, false);
|
||||
draw.addView(contentView, 0);
|
||||
|
||||
SharedPreferences preferences6 = getSharedPreferences("PhoneBook_number", MODE_PRIVATE);
|
||||
|
||||
number = preferences6.getString("Phone", null);
|
||||
fasbs=findViewById(R.id.fab);
|
||||
info=findViewById(R.id.info);
|
||||
info.setText("Negative Test Results");
|
||||
info.setVisibility(View.VISIBLE);
|
||||
|
||||
|
||||
Log.e("main", "error "+number);
|
||||
TestRef = FirebaseDatabase.getInstance().getReference().child("Test_Data").child(number);
|
||||
recyclerView = findViewById(R.id.recycler_view);
|
||||
DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference();
|
||||
|
||||
|
||||
|
||||
fasbs.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent(NegativeResults.this, PatientDetail.class);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
LinearLayoutManager layoutManager1=new LinearLayoutManager(this);
|
||||
|
||||
recyclerView.setLayoutManager(new GridLayoutManager(this, 1));
|
||||
|
||||
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
|
||||
int height = displayMetrics.heightPixels / 8;
|
||||
int spaceInPixel = 4;
|
||||
recyclerView.addItemDecoration(new SpaceDecoration(spaceInPixel));
|
||||
|
||||
}
|
||||
@Override
|
||||
protected void onStart()
|
||||
{
|
||||
super.onStart();
|
||||
|
||||
|
||||
FirebaseRecyclerOptions<Tests> options =
|
||||
new FirebaseRecyclerOptions.Builder<Tests>()
|
||||
.setQuery(TestRef.orderByChild("Result").equalTo("negative"), Tests.class)
|
||||
.build();
|
||||
|
||||
|
||||
FirebaseRecyclerAdapter<Tests, TestViewHolder> adapter =
|
||||
new FirebaseRecyclerAdapter<Tests, TestViewHolder>(options) {
|
||||
@Override
|
||||
protected void onBindViewHolder(@NonNull TestViewHolder holder, int position, @NonNull final Tests model)
|
||||
{
|
||||
// holder.txtProductName.setText(model.getPatientid());
|
||||
if(model.getResult().contains("positive") || model.getResult().contains("negative"))
|
||||
{
|
||||
info.setVisibility(View.INVISIBLE);
|
||||
|
||||
}
|
||||
|
||||
holder.txtpatientid.setText("Patient ID :"+model.getPatient_Id());
|
||||
holder.txtsampletype.setText("Sample Type :" +model.getSample_Type());
|
||||
holder.nikshay.setText("National ID :"+model.getNational_Id());
|
||||
holder.txttimestamp.setText(model.getSdate());
|
||||
|
||||
|
||||
Log.e("main", "error id"+model.getPrimary_Key());
|
||||
|
||||
|
||||
|
||||
//holder.txtProductDescription.setText(model.getSample());
|
||||
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent(NegativeResults.this, TestDetails.class);
|
||||
Log.e("main", "error id"+model.getPrimary_Key());
|
||||
|
||||
intent.putExtra("pid",model.getPrimary_Key());
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public TestViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType)
|
||||
{
|
||||
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.demo, parent, false);
|
||||
TestViewHolder holder = new TestViewHolder(view);
|
||||
return holder;
|
||||
}
|
||||
};
|
||||
recyclerView.setAdapter(adapter);
|
||||
adapter.startListening();
|
||||
}
|
||||
private void firebasesearch(String data)
|
||||
{
|
||||
{
|
||||
Query firebaseSearchQuery = TestRef.orderByChild("Patient_Id").startAt(data).endAt(data + "\uf8ff") ;
|
||||
FirebaseRecyclerOptions<Tests> options =
|
||||
new FirebaseRecyclerOptions.Builder<Tests>()
|
||||
.setQuery(firebaseSearchQuery, Tests.class)
|
||||
.build();
|
||||
|
||||
FirebaseRecyclerAdapter<Tests, TestViewHolder> adapter =
|
||||
new FirebaseRecyclerAdapter<Tests, TestViewHolder>(options) {
|
||||
@Override
|
||||
protected void onBindViewHolder(@NonNull final TestViewHolder holder, int position, @NonNull final Tests model)
|
||||
{
|
||||
holder.txtpatientid.setText("Patient ID :"+model.getPatient_Id());
|
||||
holder.txtsampletype.setText("Sample Type :" +model.getSample_Type());
|
||||
holder.nikshay.setText("National ID :"+model.getNational_Id());
|
||||
holder.txttimestamp.setText(model.getSdate());
|
||||
holder.iconfinder.setBackgroundResource(R.drawable.green_circle);
|
||||
holder.iconfinder.setText("P");
|
||||
|
||||
|
||||
|
||||
Log.e("main", "error id"+model.getPrimary_Key());
|
||||
|
||||
|
||||
|
||||
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Log.d("LOGCAT", "" + model.getPrimary_Key());
|
||||
|
||||
Intent intent=new Intent(NegativeResults.this, TestDetails.class);
|
||||
intent.putExtra("pid",model.getPrimary_Key());
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public TestViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType)
|
||||
{
|
||||
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.demo, parent, false);
|
||||
TestViewHolder holder = new TestViewHolder(view);
|
||||
return holder;
|
||||
}
|
||||
};
|
||||
recyclerView.setAdapter(adapter);
|
||||
adapter.startListening();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
170
app/src/main/java/in/sminnovations/arrest_tb/PatientDetail.java
Normal file
@@ -0,0 +1,170 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.DatePickerDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.DatePicker;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
public class PatientDetail extends NavigationTop implements AdapterView.OnItemSelectedListener {
|
||||
private Button next_act;
|
||||
private DatePickerDialog.OnDateSetListener mDateSetListener;
|
||||
String patientid,patientdob,patientage,patientnikshayid;
|
||||
String gender;
|
||||
|
||||
|
||||
private EditText mDisplayDate,patient_ID,Age,NikshayId;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
LayoutInflater inflater = (LayoutInflater) this
|
||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
View contentView = inflater.inflate(R.layout.activity_patient_detail, null, false);
|
||||
draw.addView(contentView, 0);
|
||||
Spinner Spinner_gender = findViewById(R.id.spinner_gender);
|
||||
mDisplayDate=findViewById(R.id.dob);
|
||||
patient_ID=findViewById(R.id.patientid);
|
||||
Age=findViewById(R.id.age);
|
||||
NikshayId=findViewById(R.id.NikshayID);
|
||||
|
||||
|
||||
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,
|
||||
R.array.Gender, android.R.layout.simple_spinner_item);
|
||||
mDisplayDate.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
mDisplayDate.setEnabled(true);
|
||||
|
||||
Calendar cal = Calendar.getInstance();
|
||||
int year = cal.get(Calendar.YEAR);
|
||||
int month = cal.get(Calendar.MONTH);
|
||||
int day = cal.get(Calendar.DAY_OF_MONTH);
|
||||
|
||||
DatePickerDialog dialog = new DatePickerDialog(
|
||||
PatientDetail.this,
|
||||
android.R.style.Theme_Holo_Light_Dialog_MinWidth,
|
||||
mDateSetListener,
|
||||
year,month,day);
|
||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
dialog.show();
|
||||
}
|
||||
});
|
||||
|
||||
mDateSetListener = new DatePickerDialog.OnDateSetListener() {
|
||||
@Override
|
||||
public void onDateSet(DatePicker datePicker, int year, int month, int day) {
|
||||
month = month + 1;
|
||||
|
||||
String date = month + "/" + day + "/" + year;
|
||||
mDisplayDate.setText(date);
|
||||
patientdob=date;
|
||||
}
|
||||
};
|
||||
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
Spinner_gender.setAdapter(adapter);
|
||||
Spinner_gender.setOnItemSelectedListener(this);
|
||||
|
||||
|
||||
|
||||
// setContentView(R.layout.activity_patient_detail);
|
||||
next_act=findViewById(R.id.next);
|
||||
|
||||
next_act.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
patientid = patient_ID.getText().toString();
|
||||
patientage = Age.getText().toString();
|
||||
patientnikshayid = NikshayId.getText().toString();
|
||||
if (patientid.equals("") || patientage.equals("") || patientnikshayid.equals("")) {
|
||||
Toast.makeText(PatientDetail.this, "Please fill all fields", Toast.LENGTH_SHORT).show();
|
||||
|
||||
} else {
|
||||
|
||||
SharedPreferences preferences = getSharedPreferences("PhoneBook", MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
|
||||
// editor.putString(Name, phonenum);
|
||||
editor.putString("gender", gender);
|
||||
editor.putString("patientid", patientid);
|
||||
editor.putString("patientage", patientage);
|
||||
editor.putString("patientnikshayid", patientnikshayid);
|
||||
editor.putString("dob", patientdob);
|
||||
|
||||
|
||||
editor.commit();
|
||||
|
||||
|
||||
Intent intent = new Intent(PatientDetail.this, TestResult.class);
|
||||
|
||||
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
if(parent.getId() == R.id.spinner_gender)
|
||||
{
|
||||
gender = parent.getItemAtPosition(position).toString();
|
||||
|
||||
//do this
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setCancelable(false);
|
||||
builder.setMessage("Do you want to Exit ?");
|
||||
|
||||
builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
||||
Intent intent = new Intent(PatientDetail.this, MainActivity.class);
|
||||
finish();
|
||||
startActivity(intent);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton("No", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
206
app/src/main/java/in/sminnovations/arrest_tb/PositiveResult.java
Normal file
@@ -0,0 +1,206 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.firebase.ui.database.FirebaseRecyclerAdapter;
|
||||
import com.firebase.ui.database.FirebaseRecyclerOptions;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.google.firebase.database.DatabaseReference;
|
||||
import com.google.firebase.database.FirebaseDatabase;
|
||||
import com.google.firebase.database.Query;
|
||||
|
||||
import in.sminnovations.arrest_tb.Model.Tests;
|
||||
|
||||
|
||||
public class PositiveResult extends NavigationTop {
|
||||
private DatabaseReference TestRef;
|
||||
private RecyclerView recyclerView ;
|
||||
FloatingActionButton fasbs;
|
||||
private TextView info;
|
||||
|
||||
|
||||
String number;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
LayoutInflater inflater = (LayoutInflater) this
|
||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
View contentView = inflater.inflate(R.layout.activity_main, null, false);
|
||||
draw.addView(contentView, 0);
|
||||
info=findViewById(R.id.info);
|
||||
|
||||
SharedPreferences preferences6 = getSharedPreferences("PhoneBook_number", MODE_PRIVATE);
|
||||
info.setText("Positive Test Results");
|
||||
info.setVisibility(View.VISIBLE);
|
||||
number = preferences6.getString("Phone", null);
|
||||
fasbs=findViewById(R.id.fab);
|
||||
|
||||
|
||||
Log.e("main", "error "+number);
|
||||
TestRef = FirebaseDatabase.getInstance().getReference().child("Test_Data").child(number);
|
||||
recyclerView = findViewById(R.id.recycler_view);
|
||||
|
||||
fasbs.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent(PositiveResult.this, PatientDetail.class);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
LinearLayoutManager layoutManager1=new LinearLayoutManager(this);
|
||||
/* layoutManager1.setOrientation(LinearLayoutManager.HORIZONTAL);
|
||||
cA
|
||||
layoutManager = new LinearLayoutManager(this);
|
||||
recyclerView.setLayoutManager(layoutManager);
|
||||
*/ // recyclerView.setHasFixedSize(true);
|
||||
recyclerView.setLayoutManager(new GridLayoutManager(this, 1));
|
||||
|
||||
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
|
||||
int height = displayMetrics.heightPixels / 8;
|
||||
int spaceInPixel = 4;
|
||||
recyclerView.addItemDecoration(new SpaceDecoration(spaceInPixel));
|
||||
|
||||
}
|
||||
@Override
|
||||
protected void onStart()
|
||||
{
|
||||
super.onStart();
|
||||
|
||||
FirebaseRecyclerOptions<Tests> options =
|
||||
new FirebaseRecyclerOptions.Builder<Tests>()
|
||||
.setQuery(TestRef.orderByChild("Result").equalTo("positive"), Tests.class)
|
||||
.build();
|
||||
|
||||
|
||||
FirebaseRecyclerAdapter<Tests, TestViewHolder> adapter =
|
||||
new FirebaseRecyclerAdapter<Tests, TestViewHolder>(options) {
|
||||
@Override
|
||||
protected void onBindViewHolder(@NonNull TestViewHolder holder, int position, @NonNull final Tests model)
|
||||
{
|
||||
if(model.getResult().contains("positive") || model.getResult().contains("negative"))
|
||||
{
|
||||
info.setVisibility(View.INVISIBLE);
|
||||
|
||||
}
|
||||
// holder.txtProductName.setText(model.getPatientid());
|
||||
|
||||
holder.iconfinder.setBackgroundResource(R.drawable.green_circle);
|
||||
holder.iconfinder.setText("P");
|
||||
holder.txtpatientid.setText("Patient ID :"+model.getPatient_Id());
|
||||
holder.txtsampletype.setText("Sample Type :" +model.getSample_Type());
|
||||
holder.nikshay.setText("National ID :"+model.getNational_Id());
|
||||
holder.txttimestamp.setText(model.getSdate());
|
||||
|
||||
|
||||
|
||||
|
||||
Log.e("main", "error id"+model.getPrimary_Key());
|
||||
|
||||
|
||||
|
||||
//holder.txtProductDescription.setText(model.getSample());
|
||||
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent(PositiveResult.this, TestDetails.class);
|
||||
Log.e("main", "error id"+model.getPrimary_Key());
|
||||
|
||||
intent.putExtra("pid",model.getPrimary_Key());
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public TestViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType)
|
||||
{
|
||||
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.demo, parent, false);
|
||||
TestViewHolder holder = new TestViewHolder(view);
|
||||
return holder;
|
||||
}
|
||||
};
|
||||
recyclerView.setAdapter(adapter);
|
||||
adapter.startListening();
|
||||
}
|
||||
private void firebasesearch(String data)
|
||||
{
|
||||
{
|
||||
Query firebaseSearchQuery = TestRef.orderByChild("Patient_Id").startAt(data).endAt(data + "\uf8ff") ;
|
||||
FirebaseRecyclerOptions<Tests> options =
|
||||
new FirebaseRecyclerOptions.Builder<Tests>()
|
||||
.setQuery(firebaseSearchQuery, Tests.class)
|
||||
.build();
|
||||
|
||||
FirebaseRecyclerAdapter<Tests, TestViewHolder> adapter =
|
||||
new FirebaseRecyclerAdapter<Tests, TestViewHolder>(options) {
|
||||
@Override
|
||||
protected void onBindViewHolder(@NonNull final TestViewHolder holder, int position, @NonNull final Tests model)
|
||||
{
|
||||
|
||||
holder.txtpatientid.setText("Patient ID :"+model.getPatient_Id());
|
||||
holder.txtsampletype.setText("sample Type :" +model.getSample_Type());
|
||||
holder.nikshay.setText("National ID :"+model.getNational_Id());
|
||||
holder.txttimestamp.setText(model.getSdate());
|
||||
|
||||
holder.iconfinder.setBackgroundResource(R.drawable.green_circle);
|
||||
holder.iconfinder.setText("P");
|
||||
|
||||
|
||||
|
||||
Log.e("main", "error id"+model.getPrimary_Key());
|
||||
|
||||
|
||||
|
||||
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Log.d("LOGCAT", "" + model.getPrimary_Key());
|
||||
|
||||
Intent intent=new Intent(PositiveResult.this, TestDetails.class);
|
||||
intent.putExtra("pid",model.getPrimary_Key());
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public TestViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType)
|
||||
{
|
||||
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.demo, parent, false);
|
||||
TestViewHolder holder = new TestViewHolder(view);
|
||||
return holder;
|
||||
}
|
||||
};
|
||||
recyclerView.setAdapter(adapter);
|
||||
adapter.startListening();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
186
app/src/main/java/in/sminnovations/arrest_tb/Register.java
Normal file
@@ -0,0 +1,186 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.util.Patterns;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.google.firebase.database.DataSnapshot;
|
||||
import com.google.firebase.database.DatabaseError;
|
||||
import com.google.firebase.database.FirebaseDatabase;
|
||||
import com.google.firebase.database.Query;
|
||||
import com.google.firebase.database.ValueEventListener;
|
||||
import com.hbb20.CountryCodePicker;
|
||||
|
||||
import in.sminnovations.arrest_tb.VerifyOTP.VerifyOtp;
|
||||
|
||||
|
||||
public class Register extends AppCompatActivity {
|
||||
String numberwithcode;
|
||||
private Button next;
|
||||
private EditText editTextMobile;
|
||||
private ProgressDialog loadingBar;
|
||||
|
||||
private TextView login;
|
||||
CountryCodePicker ccp;
|
||||
String mobile,name;
|
||||
|
||||
private EditText editTextname;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_register);
|
||||
next=findViewById(R.id.buttonContinue);
|
||||
editTextMobile = findViewById(R.id.editTextMobile);
|
||||
|
||||
ccp=findViewById(R.id.ccp);
|
||||
|
||||
ccp.registerCarrierNumberEditText(editTextMobile);
|
||||
loadingBar = new ProgressDialog(this);
|
||||
login=findViewById(R.id.login_account);
|
||||
login.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(Register.this, LoginScreen.class);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
editTextname=findViewById(R.id.editTextName);
|
||||
|
||||
next.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mobile = editTextMobile.getText().toString().trim();
|
||||
mobile = mobile.replaceAll("[^0-9]", "");
|
||||
name = editTextname.getText().toString().trim();
|
||||
|
||||
|
||||
if (!isOnline()) {
|
||||
//Create an alertdialog
|
||||
AlertDialog.Builder Checkbuilder = new AlertDialog.Builder(Register.this);
|
||||
Checkbuilder.setTitle("No Internet Connection !");
|
||||
Checkbuilder.setMessage("Check Your Internet Connection.");
|
||||
|
||||
Checkbuilder.setPositiveButton("Retry", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
Checkbuilder.setNegativeButton("Exit", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
AlertDialog alert = Checkbuilder.create();
|
||||
alert.show();
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
if (mobile.equals("") || name.equals("")) {
|
||||
Toast.makeText(Register.this, "please enter all the required fields", Toast.LENGTH_SHORT).show();
|
||||
|
||||
} else if (!Patterns.PHONE.matcher(mobile).matches()) {
|
||||
editTextMobile.setError("Enter a valid Phone ");
|
||||
// Toast.makeText(Consumer_register.this, "Please Enter a valid email", Toast.LENGTH_SHORT).show();
|
||||
|
||||
} else {
|
||||
|
||||
Query chekuser = FirebaseDatabase.getInstance().getReference("USERS").orderByChild("number").equalTo(mobile);
|
||||
chekuser.addListenerForSingleValueEvent(new ValueEventListener() {
|
||||
@Override
|
||||
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
|
||||
if (dataSnapshot.exists()) {
|
||||
editTextMobile.setError("User Already Exist ");
|
||||
|
||||
|
||||
} else {
|
||||
Intent intent = new Intent(Register.this, VerifyOtp.class);
|
||||
Log.e("main", "error " + mobile);
|
||||
|
||||
numberwithcode = ccp.getFullNumberWithPlus();
|
||||
Log.e("main", "error " + numberwithcode);
|
||||
|
||||
if (mobile.equals("") || name.equals("")) {
|
||||
Toast.makeText(Register.this, "please enter all the required fields", Toast.LENGTH_SHORT).show();
|
||||
|
||||
} else if (!Patterns.PHONE.matcher(mobile).matches()) {
|
||||
editTextMobile.setError("Enter a valid Phone ");
|
||||
// Toast.makeText(Consumer_register.this, "Please Enter a valid email", Toast.LENGTH_SHORT).show();
|
||||
|
||||
} else {
|
||||
loadingBar.setTitle("Create Account");
|
||||
loadingBar.setMessage("Please wait ");
|
||||
loadingBar.setCanceledOnTouchOutside(false);
|
||||
loadingBar.show();
|
||||
|
||||
|
||||
intent.putExtra("numberwithcode", numberwithcode);
|
||||
|
||||
intent.putExtra("mobile", mobile);
|
||||
intent.putExtra("username", name);
|
||||
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancelled(@NonNull DatabaseError databaseError) {
|
||||
Log.e("Raman", "Received an exception check chexk " + databaseError.getMessage());
|
||||
|
||||
// Toast.makeText(ForgetPassword.this,databaseError.getMessage(),Toast.LENGTH_SHORT).show();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
|
||||
Intent intent = new Intent(Register.this, LoginScreen.class);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
public boolean isOnline() {
|
||||
ConnectivityManager connMgr = (ConnectivityManager)
|
||||
getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
|
||||
return (networkInfo != null && networkInfo.isConnected());
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,7 @@
|
||||
package in.sminnovations.arresttb;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.content.FileProvider;
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
@@ -18,11 +14,18 @@ import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.content.FileProvider;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
@@ -31,27 +34,29 @@ import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
|
||||
public class Report extends AppCompatActivity {
|
||||
public class Report extends NavigationTop {
|
||||
TextView patient_id,patient_dob,patientnikshayid,agepatient,patientgender,patientsample,validatyd,spintubeid,nirtlab,dated,timed,resultd;
|
||||
ImageButton shared ,dowbloadd;
|
||||
String string1,string2,string3,string4,string5,string6,string7,string8,string9,date,time;
|
||||
File filePath=null;
|
||||
String resultf;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_report);
|
||||
/* super.onCreate(savedInstanceState);
|
||||
// setContentView(R.layout.activity_report);
|
||||
LayoutInflater inflater = (LayoutInflater) this
|
||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
View contentView = inflater.inflate(R.layout.activity_report, null, false);
|
||||
draw.addView(contentView, 0);
|
||||
*/
|
||||
|
||||
setContentView(R.layout.activity_report);
|
||||
|
||||
// setContentView(R.layout.activity_report);
|
||||
shared=findViewById(R.id.share);
|
||||
|
||||
|
||||
dowbloadd=findViewById(R.id.downlaod);
|
||||
patient_id=findViewById(R.id.patient_idr);
|
||||
patient_dob=findViewById(R.id.patien_dobr);
|
||||
@@ -71,7 +76,6 @@ public class Report extends AppCompatActivity {
|
||||
dated=findViewById(R.id.dater);
|
||||
dated.setText(date);
|
||||
timed.setText(time);
|
||||
resultd.setText("POSITIVE");
|
||||
resultd.setTextColor(Color.RED);
|
||||
|
||||
|
||||
@@ -82,6 +86,12 @@ public class Report extends AppCompatActivity {
|
||||
string3 = preferences.getString("patientage", null);
|
||||
string4 = preferences.getString("patientnikshayid", null);
|
||||
string5 = preferences.getString("dob", null);
|
||||
if (string5== null ) {
|
||||
|
||||
|
||||
string5="-";
|
||||
}
|
||||
|
||||
|
||||
|
||||
SharedPreferences preferences1=getSharedPreferences("PhoneBook1",MODE_PRIVATE);
|
||||
@@ -91,6 +101,12 @@ public class Report extends AppCompatActivity {
|
||||
string8 = preferences1.getString("sample", null);
|
||||
string9 = preferences1.getString("validity", null);
|
||||
|
||||
SharedPreferences preferences15=getSharedPreferences("PhoneBook_number7",MODE_PRIVATE);
|
||||
|
||||
resultf= preferences15.getString("result", null);
|
||||
|
||||
resultd.setText(resultf);
|
||||
|
||||
shared.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -106,7 +122,7 @@ public class Report extends AppCompatActivity {
|
||||
Intent intent=new Intent(Intent.ACTION_SEND);
|
||||
intent.putExtra(Intent.EXTRA_TEXT,"Report");
|
||||
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.N) {
|
||||
Uri path= FileProvider.getUriForFile(Report.this,"in.sminnovations.arresttb.fileprovider",filePath);
|
||||
Uri path= FileProvider.getUriForFile(Report.this,"in.sminnovations.arresttb_testing.fileprovider",filePath);
|
||||
intent.putExtra(Intent.EXTRA_STREAM,path);
|
||||
}
|
||||
else{
|
||||
@@ -117,15 +133,10 @@ public class Report extends AppCompatActivity {
|
||||
intent.setType("application/pdf");
|
||||
startActivity(intent);
|
||||
|
||||
//startCropImageActivity();
|
||||
// createPdf(editText.getText().toString());
|
||||
|
||||
|
||||
|
||||
}
|
||||
//now for sharing file i need to create file provider for android version greater than noughat let's do it
|
||||
|
||||
|
||||
//Everything WOrking
|
||||
|
||||
|
||||
}
|
||||
@@ -141,7 +152,6 @@ public class Report extends AppCompatActivity {
|
||||
}
|
||||
else
|
||||
{
|
||||
//startCropImageActivity();
|
||||
createPdf();
|
||||
Toast.makeText(Report.this, "File Downloaded", Toast.LENGTH_LONG).show();
|
||||
|
||||
@@ -173,18 +183,15 @@ validatyd.setText(string9);
|
||||
|
||||
}
|
||||
private void createPdf(){
|
||||
// create a new document
|
||||
PdfDocument document = new PdfDocument();
|
||||
|
||||
// crate a page description
|
||||
PdfDocument.PageInfo pageInfo = new PdfDocument.PageInfo.Builder(1000, 2000, 1).create();
|
||||
|
||||
// start a page
|
||||
PdfDocument.Page page = document.startPage(pageInfo);
|
||||
Canvas canvas = page.getCanvas();
|
||||
Paint paint = new Paint();
|
||||
paint.setTextSize(80);
|
||||
canvas.drawText("Arrest Tb",40,80,paint);
|
||||
canvas.drawText("Arrest TB",40,80,paint);
|
||||
paint.setTextSize(30);
|
||||
canvas.drawText("ShanMukha Innovations Pvt Ltd",30,120,paint);
|
||||
paint.setTextAlign(Paint.Align.RIGHT);
|
||||
@@ -197,7 +204,7 @@ validatyd.setText(string9);
|
||||
canvas.drawText("Result",50,285,paint);
|
||||
// canvas.drawText("name 2",450,435,paint);
|
||||
paint.setTextAlign(Paint.Align.RIGHT);
|
||||
canvas.drawText("POSITIVE",canvas.getWidth()-40,285,paint);
|
||||
canvas.drawText(resultf,canvas.getWidth()-40,285,paint);
|
||||
paint.setTextAlign(Paint.Align.LEFT);
|
||||
|
||||
|
||||
@@ -264,18 +271,7 @@ validatyd.setText(string9);
|
||||
|
||||
// finish the page
|
||||
document.finishPage(page);
|
||||
/* File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS),"Raman.pdf");
|
||||
|
||||
|
||||
// write the document content
|
||||
*//*String directory_path = Environment.getExternalStorageDirectory().getPath() + "/ArrestTb/";
|
||||
File file = new File(directory_path);
|
||||
if (!file.exists()) {
|
||||
file.mkdirs();
|
||||
}*//*
|
||||
// String targetPdf = directory_path+"Report_"+string2+".pdf";
|
||||
filePath = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS),"Report_"+string2+".pdf");
|
||||
*/
|
||||
String directory_path = Environment.getExternalStorageDirectory().getPath() + "/ArrestTb/";
|
||||
File file = new File(directory_path);
|
||||
if (!file.exists()) {
|
||||
@@ -289,13 +285,86 @@ validatyd.setText(string9);
|
||||
} catch (IOException e) {
|
||||
Log.e("main", "error "+e.toString());
|
||||
}
|
||||
// filePath= new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS),"Report_"+string2+".pdf");
|
||||
|
||||
|
||||
// close the document
|
||||
document.close();
|
||||
|
||||
}
|
||||
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
MenuInflater inflater=getMenuInflater();
|
||||
inflater.inflate(R.menu.download,menu);
|
||||
MenuItem item = menu.findItem(R.id.share);
|
||||
MenuItem item1=menu.findItem(R.id.download1);
|
||||
item1.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem item) {
|
||||
if(ContextCompat.checkSelfPermission(Report.this, Manifest.permission.WRITE_EXTERNAL_STORAGE)!= PackageManager.PERMISSION_GRANTED)
|
||||
{
|
||||
|
||||
ActivityCompat.requestPermissions(Report.this,new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},23);
|
||||
}
|
||||
else
|
||||
{
|
||||
//startCropImageActivity();
|
||||
createPdf();
|
||||
Toast.makeText(Report.this, "File Downloaded", Toast.LENGTH_LONG).show();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
});
|
||||
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem item) {
|
||||
if(ContextCompat.checkSelfPermission(Report.this, Manifest.permission.WRITE_EXTERNAL_STORAGE)!= PackageManager.PERMISSION_GRANTED)
|
||||
{
|
||||
|
||||
ActivityCompat.requestPermissions(Report.this,new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},23);
|
||||
}
|
||||
else
|
||||
{
|
||||
createPdf();
|
||||
|
||||
Intent intent=new Intent(Intent.ACTION_SEND);
|
||||
intent.putExtra(Intent.EXTRA_TEXT,"Report");
|
||||
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.N) {
|
||||
Uri path= FileProvider.getUriForFile(Report.this,"in.sminnovations.arrest_tb.fileprovider",filePath);
|
||||
intent.putExtra(Intent.EXTRA_STREAM,path);
|
||||
}
|
||||
else{
|
||||
|
||||
intent.putExtra(Intent.EXTRA_STREAM,Uri.fromFile(filePath));
|
||||
}
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
intent.setType("application/pdf");
|
||||
startActivity(intent);
|
||||
|
||||
//startCropImageActivity();
|
||||
// createPdf(editText.getText().toString());
|
||||
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
|
||||
Intent intent = new Intent(Report.this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.graphics.Rect;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
public class SpaceDecoration extends RecyclerView.ItemDecoration {
|
||||
private int space;
|
||||
|
||||
public SpaceDecoration(int space) {
|
||||
this.space = space;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
|
||||
outRect.left=outRect.bottom=outRect.right=outRect.top=space;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
|
||||
public class SplashScreen extends AppCompatActivity {
|
||||
|
||||
private static int SPLASH_TIME_OUT=3000;
|
||||
String number;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_splash_screen);
|
||||
SharedPreferences preferences6 = getSharedPreferences("PhoneBook_number", MODE_PRIVATE);
|
||||
|
||||
number = preferences6.getString("Phone", null);
|
||||
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (number == null ) {
|
||||
|
||||
|
||||
Intent home = new Intent(SplashScreen.this, LoginScreen.class);
|
||||
startActivity(home);
|
||||
finish();
|
||||
}
|
||||
else
|
||||
{
|
||||
Intent home1 = new Intent(SplashScreen.this, MainActivity.class);
|
||||
startActivity(home1);
|
||||
finish();
|
||||
}
|
||||
|
||||
}
|
||||
}, SPLASH_TIME_OUT);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.res.AssetFileDescriptor;
|
||||
import android.content.res.AssetManager;
|
||||
import android.graphics.Bitmap;
|
||||
|
||||
import org.tensorflow.lite.Interpreter;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.nio.MappedByteBuffer;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.PriorityQueue;
|
||||
|
||||
|
||||
public class TensorFlowImageClassifier implements Classifier {
|
||||
|
||||
private static final int MAX_RESULTS = 1;
|
||||
private static final int BATCH_SIZE = 1;
|
||||
private static final int PIXEL_SIZE = 3;
|
||||
private static final float THRESHOLD = 0.1f;
|
||||
|
||||
private Interpreter interpreter;
|
||||
private int inputSize;
|
||||
private List<String> labelList;
|
||||
|
||||
private TensorFlowImageClassifier() {
|
||||
|
||||
}
|
||||
|
||||
static Classifier create(AssetManager assetManager,
|
||||
String modelPath,
|
||||
String labelPath,
|
||||
int inputSize) throws IOException {
|
||||
|
||||
TensorFlowImageClassifier classifier = new TensorFlowImageClassifier();
|
||||
classifier.interpreter = new Interpreter(classifier.loadModelFile(assetManager, modelPath));
|
||||
classifier.labelList = classifier.loadLabelList(assetManager, labelPath);
|
||||
classifier.inputSize = inputSize;
|
||||
|
||||
return classifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Recognition> recognizeImage(Bitmap bitmap) {
|
||||
ByteBuffer byteBuffer = convertBitmapToByteBuffer(bitmap);
|
||||
byte[][] result = new byte[1][labelList.size()];
|
||||
interpreter.run(byteBuffer, result);
|
||||
return getSortedResult(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
interpreter.close();
|
||||
interpreter = null;
|
||||
}
|
||||
|
||||
private MappedByteBuffer loadModelFile(AssetManager assetManager, String modelPath) throws IOException {
|
||||
AssetFileDescriptor fileDescriptor = assetManager.openFd(modelPath);
|
||||
FileInputStream inputStream = new FileInputStream(fileDescriptor.getFileDescriptor());
|
||||
FileChannel fileChannel = inputStream.getChannel();
|
||||
long startOffset = fileDescriptor.getStartOffset();
|
||||
long declaredLength = fileDescriptor.getDeclaredLength();
|
||||
return fileChannel.map(FileChannel.MapMode.READ_ONLY, startOffset, declaredLength);
|
||||
}
|
||||
|
||||
private List<String> loadLabelList(AssetManager assetManager, String labelPath) throws IOException {
|
||||
List<String> labelList = new ArrayList<>();
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(assetManager.open(labelPath)));
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
labelList.add(line);
|
||||
}
|
||||
reader.close();
|
||||
return labelList;
|
||||
}
|
||||
|
||||
private ByteBuffer convertBitmapToByteBuffer(Bitmap bitmap) {
|
||||
ByteBuffer byteBuffer = ByteBuffer.allocateDirect(BATCH_SIZE * inputSize * inputSize * PIXEL_SIZE);
|
||||
byteBuffer.order(ByteOrder.nativeOrder());
|
||||
int[] intValues = new int[inputSize * inputSize];
|
||||
bitmap.getPixels(intValues, 0, bitmap.getWidth(), 0, 0, bitmap.getWidth(), bitmap.getHeight());
|
||||
int pixel = 0;
|
||||
for (int i = 0; i < inputSize; ++i) {
|
||||
for (int j = 0; j < inputSize; ++j) {
|
||||
final int val = intValues[pixel++];
|
||||
byteBuffer.put((byte) ((val >> 16) & 0xFF));
|
||||
byteBuffer.put((byte) ((val >> 8) & 0xFF));
|
||||
byteBuffer.put((byte) (val & 0xFF));
|
||||
}
|
||||
}
|
||||
return byteBuffer;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
private List<Recognition> getSortedResult(byte[][] labelProbArray) {
|
||||
|
||||
PriorityQueue<Recognition> pq =
|
||||
new PriorityQueue<>(
|
||||
MAX_RESULTS,
|
||||
new Comparator<Recognition>() {
|
||||
@Override
|
||||
public int compare(Recognition lhs, Recognition rhs) {
|
||||
return Float.compare(rhs.getConfidence(), lhs.getConfidence());
|
||||
}
|
||||
});
|
||||
|
||||
for (int i = 0; i < labelList.size(); ++i) {
|
||||
float confidence = (labelProbArray[0][i] & 0xff) / 255.0f;
|
||||
if (confidence > THRESHOLD) {
|
||||
pq.add(new Recognition("" + i,
|
||||
labelList.size() > i ? labelList.get(i) : "unknown",
|
||||
confidence));
|
||||
}
|
||||
}
|
||||
|
||||
final ArrayList<Recognition> recognitions = new ArrayList<>();
|
||||
int recognitionsSize = Math.min(pq.size(), MAX_RESULTS);
|
||||
for (int i = 0; i < recognitionsSize; ++i) {
|
||||
recognitions.add(pq.poll());
|
||||
}
|
||||
|
||||
return recognitions;
|
||||
}
|
||||
|
||||
}
|
||||
115
app/src/main/java/in/sminnovations/arrest_tb/TestDetails.java
Normal file
@@ -0,0 +1,115 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.google.firebase.database.DataSnapshot;
|
||||
import com.google.firebase.database.DatabaseError;
|
||||
import com.google.firebase.database.DatabaseReference;
|
||||
import com.google.firebase.database.FirebaseDatabase;
|
||||
import com.google.firebase.database.ValueEventListener;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
|
||||
import in.sminnovations.arrest_tb.Model.Tests;
|
||||
|
||||
public class TestDetails extends NavigationTop {
|
||||
private ImageView Imageview1;
|
||||
TextView patient_id,patient_dob,patientnikshayid,agepatient,patientgender,patientsample,validatyd,spintubeid,nirtlab,dated,timed,resultd;
|
||||
|
||||
String date,time,number;
|
||||
|
||||
private String TestID = "";
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
LayoutInflater inflater = (LayoutInflater) this
|
||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
View contentView = inflater.inflate(R.layout.activity_spin__test, null, false);
|
||||
draw.addView(contentView, 0);
|
||||
|
||||
patient_id=findViewById(R.id.patient_idr);
|
||||
patient_dob=findViewById(R.id.patien_dobr);
|
||||
patientnikshayid=findViewById(R.id.patient_nikshayidr);
|
||||
SharedPreferences preferences6 = getSharedPreferences("PhoneBook_number", MODE_PRIVATE);
|
||||
|
||||
number = preferences6.getString("Phone", null);
|
||||
|
||||
agepatient=findViewById(R.id.patient_ager);
|
||||
date = String.valueOf(android.text.format.DateFormat.format("dd-MM-yyyy", new java.util.Date()));
|
||||
DateFormat df = new SimpleDateFormat("h:mm a");
|
||||
time = df.format(Calendar.getInstance().getTime());
|
||||
|
||||
patientgender=findViewById(R.id.patient_genderr);
|
||||
patientsample=findViewById(R.id.patient_typesampler);
|
||||
validatyd=findViewById(R.id.patient_tubevisibler);
|
||||
spintubeid=findViewById(R.id.patient_spintuber);
|
||||
nirtlab=findViewById(R.id.patient_nirtr);
|
||||
timed=findViewById(R.id.timer);
|
||||
resultd=findViewById(R.id.patient_resultr);
|
||||
dated=findViewById(R.id.dater);
|
||||
Imageview1=findViewById(R.id.circle_image);
|
||||
|
||||
|
||||
|
||||
|
||||
TestID = getIntent().getStringExtra("pid");
|
||||
|
||||
Log.e("main", "error id "+TestID);
|
||||
|
||||
|
||||
getTestDetails(TestID);
|
||||
}
|
||||
private void getTestDetails(String TestID)
|
||||
{
|
||||
DatabaseReference productsRef = FirebaseDatabase.getInstance().getReference().child("Test_Data").child(number);
|
||||
|
||||
productsRef.child(TestID).addValueEventListener(new ValueEventListener() {
|
||||
@Override
|
||||
public void onDataChange(DataSnapshot dataSnapshot)
|
||||
{
|
||||
if (dataSnapshot.exists())
|
||||
{
|
||||
Tests products = dataSnapshot.getValue(Tests.class);
|
||||
Glide.with(TestDetails.this).load(products.getImage()).into(Imageview1);
|
||||
patient_id.setText(products.getPatient_Id());
|
||||
patient_dob.setText(products.getDob());
|
||||
patientnikshayid.setText(products.getNational_Id());
|
||||
validatyd.setText(products.getTube_Validity());
|
||||
|
||||
agepatient.setText(products.getPatient_Age());
|
||||
dated.setText(products.getSdate());
|
||||
spintubeid.setText(products.getSPIN_Tube_ID());
|
||||
nirtlab.setText(products.getLab_Number());
|
||||
timed.setText(products.getTime());
|
||||
patientgender.setText(products.getGender());
|
||||
resultd.setText(products.getResult());
|
||||
agepatient.setText(products.getPatient_Age());
|
||||
|
||||
patientsample.setText(products.getSample_Type());
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancelled(DatabaseError databaseError) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
155
app/src/main/java/in/sminnovations/arrest_tb/TestResult.java
Normal file
@@ -0,0 +1,155 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
|
||||
public class TestResult extends NavigationTop implements AdapterView.OnItemSelectedListener {
|
||||
Button btnTest;
|
||||
EditText NIRTLabd,SPINTubeIDd;
|
||||
String NIRTLabde,SPINTubeIDde,validatyd,sampled;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
LayoutInflater inflater = (LayoutInflater) this
|
||||
.getSystemService(LAYOUT_INFLATER_SERVICE);
|
||||
View contentView = inflater.inflate(R.layout.activity_test_details, null, false);
|
||||
draw.addView(contentView, 0);
|
||||
Spinner Spinner_sample = findViewById(R.id.spinner_sample);
|
||||
|
||||
|
||||
NIRTLabd=findViewById(R.id.NIRTLab);
|
||||
SPINTubeIDd=findViewById(R.id.SPINTubeID);
|
||||
|
||||
|
||||
|
||||
|
||||
btnTest=findViewById(R.id.startTest);
|
||||
btnTest.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
NIRTLabde = NIRTLabd.getText().toString();
|
||||
SPINTubeIDde = SPINTubeIDd.getText().toString();
|
||||
if (NIRTLabde.equals("") || SPINTubeIDde.equals("") || sampled.equals("")) {
|
||||
Toast.makeText(TestResult.this, "Please fill all fields", Toast.LENGTH_SHORT).show();
|
||||
|
||||
} else {
|
||||
if(ContextCompat.checkSelfPermission(TestResult.this, Manifest.permission.WRITE_EXTERNAL_STORAGE)!= PackageManager.PERMISSION_GRANTED)
|
||||
{
|
||||
|
||||
ActivityCompat.requestPermissions(TestResult.this,new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},23);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
SharedPreferences preferences = getSharedPreferences("PhoneBook1", MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
|
||||
editor.putString("NIRTLabde", NIRTLabde);
|
||||
editor.putString("SPINTubeIDde", SPINTubeIDde);
|
||||
editor.putString("sample", sampled);
|
||||
editor.putString("validity", validatyd);
|
||||
|
||||
|
||||
|
||||
editor.commit();
|
||||
|
||||
if (restorePrefData()) {
|
||||
|
||||
|
||||
|
||||
Intent intent = new Intent(getApplicationContext(), AddImage.class);
|
||||
|
||||
|
||||
startActivity(intent);
|
||||
finish();
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
Intent intent = new Intent(getApplicationContext(), CameraGuide.class);
|
||||
|
||||
startActivity(intent);
|
||||
finish();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
ArrayAdapter<CharSequence> sample_adapter = ArrayAdapter.createFromResource(this,
|
||||
R.array.Type_Of_Sample, android.R.layout.simple_spinner_item);
|
||||
|
||||
sample_adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
Spinner_sample.setAdapter(sample_adapter);
|
||||
Spinner_sample.setOnItemSelectedListener(this);
|
||||
|
||||
|
||||
|
||||
Spinner Spinner_validity = findViewById(R.id.spinner_validity);
|
||||
|
||||
ArrayAdapter<CharSequence> Validity_adapter = ArrayAdapter.createFromResource(this,
|
||||
R.array.Validity, android.R.layout.simple_spinner_item);
|
||||
|
||||
Validity_adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
Spinner_validity.setAdapter(Validity_adapter);
|
||||
Spinner_validity.setOnItemSelectedListener(this);
|
||||
|
||||
|
||||
|
||||
}
|
||||
private boolean restorePrefData() {
|
||||
|
||||
|
||||
SharedPreferences pref = getApplicationContext().getSharedPreferences("myPrefs",MODE_PRIVATE);
|
||||
Boolean isIntroActivityOpnendBefore = pref.getBoolean("isIntroOpnend",false);
|
||||
return isIntroActivityOpnendBefore;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
if(parent.getId() == R.id.spinner_sample)
|
||||
{
|
||||
sampled = parent.getItemAtPosition(position).toString();
|
||||
|
||||
//do this
|
||||
}
|
||||
if(parent.getId() == R.id.spinner_validity)
|
||||
{
|
||||
validatyd = parent.getItemAtPosition(position).toString();
|
||||
|
||||
//do this
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import in.sminnovations.arrest_tb.Interface.ItemClickListner;
|
||||
|
||||
|
||||
public class TestViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener
|
||||
{
|
||||
public TextView txtpatientid, txttimestamp,nikshay,iconfinder,txtsampletype;
|
||||
public ImageView imageView;
|
||||
public ItemClickListner listner;
|
||||
|
||||
|
||||
public TestViewHolder(View itemView)
|
||||
{
|
||||
super(itemView);
|
||||
|
||||
|
||||
|
||||
|
||||
imageView = (ImageView) itemView.findViewById(R.id.icon_profile);
|
||||
iconfinder=(TextView) itemView.findViewById(R.id.icon_text);
|
||||
|
||||
txtpatientid = (TextView) itemView.findViewById(R.id.patient_Id);
|
||||
txtsampletype = (TextView) itemView.findViewById(R.id.sample_type);
|
||||
txttimestamp=itemView.findViewById(R.id.timestamp);
|
||||
nikshay=itemView.findViewById(R.id.nikshayid);
|
||||
|
||||
//txtProductDescription= (TextView) itemView.findViewById(R.id.switch_toggle);
|
||||
}
|
||||
|
||||
public void setItemClickListner(ItemClickListner listner)
|
||||
{
|
||||
this.listner = listner;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view)
|
||||
{
|
||||
listner.onClick(view, getAdapterPosition(), false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
package in.sminnovations.arrest_tb.VerifyOTP;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.chaos.view.PinView;
|
||||
import com.google.android.gms.tasks.OnCompleteListener;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.TaskExecutors;
|
||||
import com.google.firebase.FirebaseException;
|
||||
import com.google.firebase.auth.AuthResult;
|
||||
import com.google.firebase.auth.FirebaseAuth;
|
||||
import com.google.firebase.auth.PhoneAuthCredential;
|
||||
import com.google.firebase.auth.PhoneAuthProvider;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import in.sminnovations.arrest_tb.CreatePassword;
|
||||
import in.sminnovations.arrest_tb.R;
|
||||
import in.sminnovations.arrest_tb.Register;
|
||||
|
||||
|
||||
public class VerifyOtp extends AppCompatActivity {
|
||||
|
||||
private String verificationid;
|
||||
private FirebaseAuth mAuth;
|
||||
private Button nextactivity;
|
||||
|
||||
PinView pinFromUser;
|
||||
private EditText editText;
|
||||
String codeBySystem;
|
||||
String address,name, state , city ,pincode,phonenumber,password2,num1,phonenumberke;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_verify__o_t_p);
|
||||
pinFromUser = findViewById(R.id.firstPinView);
|
||||
nextactivity = findViewById(R.id.buttonSignIn);
|
||||
|
||||
mAuth = FirebaseAuth.getInstance();
|
||||
|
||||
|
||||
String phonenumberk = getIntent().getStringExtra("numberwithcode");
|
||||
phonenumberke = getIntent().getStringExtra("mobile");
|
||||
|
||||
phonenumber = phonenumberk;
|
||||
|
||||
name = getIntent().getStringExtra("username");
|
||||
|
||||
|
||||
|
||||
sendVerificationCode(phonenumber);
|
||||
findViewById(R.id.buttonSignIn).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
String code = pinFromUser.getText().toString().trim();
|
||||
|
||||
if ((code.isEmpty() || code.length() < 6)) {
|
||||
|
||||
editText.setError("Enter code...");
|
||||
editText.requestFocus();
|
||||
return;
|
||||
}
|
||||
verifyCode(code);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
private void verifyCode(String code){
|
||||
PhoneAuthCredential credential = PhoneAuthProvider.getCredential(verificationid, code);
|
||||
signInWithCredential(credential);
|
||||
}
|
||||
|
||||
private void signInWithCredential(PhoneAuthCredential credential) {
|
||||
mAuth.signInWithCredential(credential)
|
||||
.addOnCompleteListener(new OnCompleteListener<AuthResult>() {
|
||||
@Override
|
||||
public void onComplete(@NonNull Task<AuthResult> task) {
|
||||
if (task.isSuccessful()) {
|
||||
|
||||
Intent intent = new Intent(VerifyOtp.this, CreatePassword.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
intent.putExtra("mobile", phonenumberke);
|
||||
intent.putExtra("username", name);
|
||||
|
||||
|
||||
startActivity(intent);
|
||||
|
||||
} else {
|
||||
Log.e("main", "error " + task.getException().getMessage());
|
||||
|
||||
// Toast.makeText(VerifyOtp.this, task.getException().getMessage(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private void sendVerificationCode(String number){
|
||||
|
||||
PhoneAuthProvider.getInstance().verifyPhoneNumber(
|
||||
number,
|
||||
60,
|
||||
TimeUnit.SECONDS,
|
||||
TaskExecutors.MAIN_THREAD,
|
||||
mCallBack
|
||||
);
|
||||
}
|
||||
|
||||
private PhoneAuthProvider.OnVerificationStateChangedCallbacks
|
||||
mCallBack = new PhoneAuthProvider.OnVerificationStateChangedCallbacks() {
|
||||
|
||||
@Override
|
||||
public void onCodeSent(String s, PhoneAuthProvider.ForceResendingToken forceResendingToken) {
|
||||
super.onCodeSent(s, forceResendingToken);
|
||||
verificationid = s;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {
|
||||
String code = phoneAuthCredential.getSmsCode();
|
||||
if (code != null){
|
||||
// progressBar.setVisibility(View.VISIBLE);
|
||||
pinFromUser.setText(code);
|
||||
verifyCode(code);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onVerificationFailed(FirebaseException e) {
|
||||
Toast.makeText(VerifyOtp.this, e.getMessage(),Toast.LENGTH_LONG).show();
|
||||
Log.e("main", "error " + e.getMessage());
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
|
||||
Intent intent = new Intent(VerifyOtp.this, Register.class);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
package in.sminnovations.arrest_tb.VerifyOTP;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.chaos.view.PinView;
|
||||
import com.google.android.gms.tasks.OnCompleteListener;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.TaskExecutors;
|
||||
import com.google.firebase.FirebaseException;
|
||||
import com.google.firebase.auth.AuthResult;
|
||||
import com.google.firebase.auth.FirebaseAuth;
|
||||
import com.google.firebase.auth.PhoneAuthCredential;
|
||||
import com.google.firebase.auth.PhoneAuthProvider;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import in.sminnovations.arrest_tb.ForgetPassword;
|
||||
import in.sminnovations.arrest_tb.ForgetPasswordReset;
|
||||
import in.sminnovations.arrest_tb.R;
|
||||
|
||||
|
||||
public class VerifyOtpForgetPassword extends AppCompatActivity {
|
||||
|
||||
private String verificationid;
|
||||
private FirebaseAuth mAuth;
|
||||
private Button nextactivity;
|
||||
private ProgressBar progressBar;
|
||||
PinView pinFromUser;
|
||||
private EditText editText;
|
||||
String codeBySystem;
|
||||
String address,name, state , city ,pincode,phonenumber,password2,num1,mobile;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_verify__o_t_p);
|
||||
pinFromUser = findViewById(R.id.firstPinView);
|
||||
nextactivity = findViewById(R.id.buttonSignIn);
|
||||
|
||||
mAuth = FirebaseAuth.getInstance();
|
||||
|
||||
|
||||
String phonenumberk = getIntent().getStringExtra("mobilecode");
|
||||
phonenumber = phonenumberk;
|
||||
mobile= getIntent().getStringExtra("mobile");
|
||||
|
||||
|
||||
|
||||
|
||||
sendVerificationCode(phonenumber);
|
||||
findViewById(R.id.buttonSignIn).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
String code = pinFromUser.getText().toString().trim();
|
||||
|
||||
if ((code.isEmpty() || code.length() < 6)) {
|
||||
|
||||
editText.setError("Enter code...");
|
||||
editText.requestFocus();
|
||||
return;
|
||||
}
|
||||
verifyCode(code);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
private void verifyCode(String code){
|
||||
PhoneAuthCredential credential = PhoneAuthProvider.getCredential(verificationid, code);
|
||||
signInWithCredential(credential);
|
||||
}
|
||||
|
||||
private void signInWithCredential(PhoneAuthCredential credential) {
|
||||
mAuth.signInWithCredential(credential)
|
||||
.addOnCompleteListener(new OnCompleteListener<AuthResult>() {
|
||||
@Override
|
||||
public void onComplete(@NonNull Task<AuthResult> task) {
|
||||
if (task.isSuccessful()) {
|
||||
|
||||
Intent intent = new Intent(VerifyOtpForgetPassword.this, ForgetPasswordReset.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
intent.putExtra("mobile", mobile);
|
||||
|
||||
|
||||
startActivity(intent);
|
||||
|
||||
} else {
|
||||
Toast.makeText(VerifyOtpForgetPassword.this, task.getException().getMessage(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private void sendVerificationCode(String number){
|
||||
|
||||
PhoneAuthProvider.getInstance().verifyPhoneNumber(
|
||||
number,
|
||||
60,
|
||||
TimeUnit.SECONDS,
|
||||
TaskExecutors.MAIN_THREAD,
|
||||
mCallBack
|
||||
);
|
||||
}
|
||||
|
||||
private PhoneAuthProvider.OnVerificationStateChangedCallbacks
|
||||
mCallBack = new PhoneAuthProvider.OnVerificationStateChangedCallbacks() {
|
||||
|
||||
@Override
|
||||
public void onCodeSent(String s, PhoneAuthProvider.ForceResendingToken forceResendingToken) {
|
||||
super.onCodeSent(s, forceResendingToken);
|
||||
verificationid = s;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {
|
||||
String code = phoneAuthCredential.getSmsCode();
|
||||
if (code != null){
|
||||
// progressBar.setVisibility(View.VISIBLE);
|
||||
pinFromUser.setText(code);
|
||||
verifyCode(code);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onVerificationFailed(FirebaseException e) {
|
||||
// Toast.makeText(VerifyOtpForgetPassword.this, e.getMessage(),Toast.LENGTH_LONG).show();
|
||||
|
||||
}
|
||||
};
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
|
||||
Intent intent = new Intent(VerifyOtpForgetPassword.this, ForgetPassword.class);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
BIN
app/src/main/res/drawable-hdpi/icon.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
app/src/main/res/drawable-mdpi/icon.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
app/src/main/res/drawable-xhdpi/icon.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/icon.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
12
app/src/main/res/drawable/bg1.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
|
||||
<solid
|
||||
android:color="@android:color/holo_green_dark"/>
|
||||
|
||||
<size
|
||||
android:width="120dp"
|
||||
android:height="120dp"/>
|
||||
</shape>
|
||||
12
app/src/main/res/drawable/bg_circle.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
|
||||
<solid
|
||||
android:color="@android:color/holo_red_dark"/>
|
||||
|
||||
<size
|
||||
android:width="120dp"
|
||||
android:height="120dp"/>
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/bg_list_row.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@color/row_activated" android:state_activated="true" />
|
||||
<item android:drawable="@android:color/transparent" />
|
||||
</selector>
|
||||
12
app/src/main/res/drawable/green_circle.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
|
||||
<solid
|
||||
android:color="@android:color/holo_green_dark"/>
|
||||
|
||||
<size
|
||||
android:width="120dp"
|
||||
android:height="120dp"/>
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/ic_baseline_add_24.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#fff" android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#fff" android:pathData="M20,12l-1.41,-1.41L13,16.17V4h-2v12.17l-5.58,-5.59L4,12l8,8 8,-8z"/>
|
||||
</vector>
|
||||
5
app/src/main/res/drawable/ic_baseline_search_24.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#fff" android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/>
|
||||
</vector>
|
||||
5
app/src/main/res/drawable/ic_baseline_share_24.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#fff" android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z"/>
|
||||
</vector>
|
||||
@@ -44,6 +44,33 @@
|
||||
android:textStyle="bold">
|
||||
|
||||
</TextView>
|
||||
<View
|
||||
android:layout_margin="20dp"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="#EEE" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:padding="20dp"
|
||||
android:textStyle="bold"
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:lineSpacingExtra="2sp"
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:fontFamily="@font/fontstyle"
|
||||
android:text="The ARREST-TB project aims to develop a suite of technologies to rapidly, accurately and economically detect, report and monitor TB and MDR TB, and monitor response to anti-TB treatments."
|
||||
android:gravity="left" />
|
||||
<View
|
||||
android:layout_margin="20dp"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="#EEE" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:padding="20dp"
|
||||
android:textStyle="bold"
|
||||
@@ -56,10 +83,11 @@
|
||||
|
||||
android:fontFamily="@font/fontstyle"
|
||||
android:text="At Shanmukha Innovations
|
||||
we are striving to develop affordable point-of-care diagnostic solutions. We undertake custom instrumentation development to support bespoke needs of our Research and Industrial customers.The ARREST-TB project aims to develop a suite of technologies to rapidly, accurately and economically detect, report and monitor TB and MDR TB, and monitor response to anti-TB treatments."
|
||||
we are striving to develop affordable point-of-care diagnostic solutions. We undertake custom instrumentation development to support bespoke needs of our Research and Industrial customers."
|
||||
android:gravity="left" />
|
||||
|
||||
|
||||
|
||||
<View
|
||||
android:layout_margin="20dp"
|
||||
android:layout_width="fill_parent"
|
||||
@@ -72,7 +100,6 @@ we are striving to develop affordable point-of-care diagnostic solutions. We und
|
||||
android:layout_width="wrap_content"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:textStyle="bold"
|
||||
|
||||
android:fontFamily="@font/fontstyle"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Tel: +91 9742255674"
|
||||
@@ -88,6 +115,8 @@ we are striving to develop affordable point-of-care diagnostic solutions. We und
|
||||
android:layout_width="wrap_content"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="30dp"
|
||||
|
||||
android:fontFamily="@font/fontstyle"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Email : info@sminnovations.in"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
|
||||
android:text=" Test Result: Positive"
|
||||
android:text=" Test Result:"
|
||||
android:textSize="@dimen/heading_size" />
|
||||
|
||||
<Button
|
||||
@@ -50,10 +50,32 @@
|
||||
android:layout_marginStart="100dp"
|
||||
|
||||
|
||||
android:layout_marginEnd="100dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:text="Get Report "
|
||||
android:layout_marginBottom="20dp"
|
||||
|
||||
|
||||
android:textAllCaps="false"
|
||||
|
||||
android:textSize="20sp" />
|
||||
<Button
|
||||
android:id="@+id/report2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:visibility="gone"
|
||||
|
||||
|
||||
android:background="@drawable/buttonshape"
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="100dp"
|
||||
|
||||
|
||||
android:layout_marginEnd="100dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:text="Get Report"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
|
||||
|
||||
android:textAllCaps="false"
|
||||
@@ -61,6 +83,7 @@
|
||||
android:textSize="20sp" />
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
186
app/src/main/res/layout/activity_create__password.xml
Normal file
@@ -0,0 +1,186 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/layout"
|
||||
android:layout_width="match_parent"
|
||||
android:background="#fff"
|
||||
|
||||
|
||||
android:layout_height="match_parent"
|
||||
|
||||
>
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="@android:dimen/app_icon_size"
|
||||
android:background="#fff"
|
||||
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="180dp"
|
||||
android:gravity="center"
|
||||
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center"
|
||||
android:textSize="28sp"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
android:textStyle="bold"
|
||||
|
||||
android:textAlignment="center"
|
||||
android:textColor="#131313"
|
||||
|
||||
android:text="Create Password "
|
||||
>
|
||||
|
||||
</TextView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="-23dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:orientation="vertical">
|
||||
//second linear
|
||||
//third linear
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:background="#fff"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/password"
|
||||
android:background="@drawable/text_back"
|
||||
android:padding="12dp"
|
||||
|
||||
|
||||
android:layout_width="match_parent"
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:hint="Password *"
|
||||
android:inputType="textPassword"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:singleLine="true" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/confirmpassword"
|
||||
android:padding="12dp"
|
||||
android:inputType="textPassword"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/text_back"
|
||||
|
||||
android:hint="Confirm Password *"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:singleLine="true" />
|
||||
|
||||
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/Email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:hint="Email"
|
||||
|
||||
android:maxLines="1"
|
||||
android:paddingStart="5dp"
|
||||
|
||||
android:paddingLeft="5dp"
|
||||
android:singleLine="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/next"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="50dp"
|
||||
|
||||
|
||||
android:background="@drawable/buttonshape"
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="100dp"
|
||||
android:layout_marginBottom="200dp"
|
||||
|
||||
|
||||
android:layout_marginEnd="100dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:text="Next"
|
||||
|
||||
|
||||
android:textAllCaps="false"
|
||||
|
||||
android:textSize="20sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
206
app/src/main/res/layout/activity_forget__password.xml
Normal file
@@ -0,0 +1,206 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/layout"
|
||||
android:layout_width="match_parent"
|
||||
android:background="#fff"
|
||||
|
||||
|
||||
android:layout_height="match_parent"
|
||||
|
||||
>
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="@android:dimen/app_icon_size"
|
||||
android:background="#fff"
|
||||
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="180dp"
|
||||
android:gravity="center"
|
||||
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center"
|
||||
android:textSize="28sp"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
android:textStyle="bold"
|
||||
|
||||
android:textAlignment="center"
|
||||
|
||||
android:text="Reset Password "
|
||||
android:textColor="#131313"
|
||||
>
|
||||
|
||||
</TextView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="-23dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:orientation="vertical">
|
||||
//second linear
|
||||
//third linear
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:background="#fff"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<com.hbb20.CountryCodePicker
|
||||
android:id="@+id/ccp"
|
||||
app:ccp_showFlag="false"
|
||||
android:layout_marginStart="20sp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:background="@drawable/text_back"
|
||||
app:ccpDialog_showFlag="false"
|
||||
android:padding="3.5dp" android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextMobile"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20sp"
|
||||
android:layout_marginTop="18dp"
|
||||
|
||||
android:background="@drawable/text_back"
|
||||
android:layout_marginEnd="20sp"
|
||||
android:ems="10"
|
||||
android:hint=" Contact Number :"
|
||||
android:padding="12dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
<EditText
|
||||
android:id="@id/editTextMobile"
|
||||
|
||||
android:padding="12dp"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/text_back"
|
||||
|
||||
android:hint="Contact Number "
|
||||
android:maxLines="1"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:singleLine="true" />
|
||||
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/Email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:hint="Email"
|
||||
|
||||
android:maxLines="1"
|
||||
android:paddingStart="5dp"
|
||||
|
||||
android:paddingLeft="5dp"
|
||||
android:singleLine="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonSignIn"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="50dp"
|
||||
|
||||
|
||||
android:background="@drawable/buttonshape"
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="100dp"
|
||||
android:layout_marginBottom="200dp"
|
||||
|
||||
|
||||
android:layout_marginEnd="100dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:text="Next"
|
||||
|
||||
|
||||
android:textAllCaps="false"
|
||||
|
||||
android:textSize="20sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<com.ShanMukhaInnovations.ArrestTB.FontAwesome
|
||||
<in.sminnovations.arrest_tb.FontAwesome
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
@@ -81,7 +81,7 @@
|
||||
android:textStyle="normal"
|
||||
android:fontFamily="sans-serif"
|
||||
|
||||
></com.ShanMukhaInnovations.ArrestTB.FontAwesome>
|
||||
></in.sminnovations.arrest_tb.FontAwesome>
|
||||
|
||||
|
||||
<TextView
|
||||
@@ -119,7 +119,7 @@ android:fontFamily="@font/fontstyle"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<com.ShanMukhaInnovations.ArrestTB.FontAwesome
|
||||
<in.sminnovations.arrest_tb.FontAwesome
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
@@ -130,7 +130,7 @@ android:fontFamily="@font/fontstyle"
|
||||
android:id="@+id/patient_details"
|
||||
|
||||
|
||||
></com.ShanMukhaInnovations.ArrestTB.FontAwesome>
|
||||
></in.sminnovations.arrest_tb.FontAwesome>
|
||||
<TextView
|
||||
android:textSize="14sp"
|
||||
|
||||
@@ -173,7 +173,7 @@ android:fontFamily="@font/fontstyle"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<com.ShanMukhaInnovations.ArrestTB.FontAwesome
|
||||
<in.sminnovations.arrest_tb.FontAwesome
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
@@ -184,7 +184,7 @@ android:fontFamily="@font/fontstyle"
|
||||
android:textSize="40dp"
|
||||
|
||||
|
||||
></com.ShanMukhaInnovations.ArrestTB.FontAwesome>
|
||||
></in.sminnovations.arrest_tb.FontAwesome>
|
||||
<TextView
|
||||
android:textSize="14sp"
|
||||
|
||||
@@ -219,7 +219,7 @@ android:fontFamily="@font/fontstyle"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<com.ShanMukhaInnovations.ArrestTB.FontAwesome
|
||||
<in.sminnovations.arrest_tb.FontAwesome
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
@@ -230,7 +230,7 @@ android:fontFamily="@font/fontstyle"
|
||||
android:text=""
|
||||
|
||||
|
||||
></com.ShanMukhaInnovations.ArrestTB.FontAwesome>
|
||||
></in.sminnovations.arrest_tb.FontAwesome>
|
||||
|
||||
<TextView
|
||||
android:textSize="14sp"
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
android:layout_height="@android:dimen/app_icon_size"
|
||||
android:contentDescription="TODO"
|
||||
android:layout_marginTop="15dp"
|
||||
android:textSize="@dimen/heading_size"
|
||||
android:textSize="28sp"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
android:textStyle="bold"
|
||||
|
||||
@@ -58,11 +58,13 @@
|
||||
android:paddingLeft="10dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:id="@+id/sign_in_text"
|
||||
android:textSize="@dimen/heading_size"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/username"
|
||||
|
||||
android:id="@+id/contactnumber"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="40dp"
|
||||
android:background="@drawable/text_back"
|
||||
@@ -70,7 +72,7 @@
|
||||
android:layout_marginStart="20sp"
|
||||
android:layout_marginEnd="20sp"
|
||||
android:ems="10"
|
||||
android:hint="User Name :"
|
||||
android:hint="Contact Number :"
|
||||
android:inputType="textEmailAddress"
|
||||
android:padding="12dp"
|
||||
/>
|
||||
@@ -103,7 +105,7 @@
|
||||
android:padding="20dp"
|
||||
android:textColor="#131313"
|
||||
android:textColorHint="#ffffff"
|
||||
android:text="Show password"
|
||||
android:text="Show Password"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -120,7 +122,7 @@
|
||||
android:layout_marginStart="10dp"
|
||||
android:padding="10dp"
|
||||
android:text="Forgot Password?"
|
||||
android:textColor="#4285f4"
|
||||
android:textColor="@android:color/holo_blue_dark"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginLeft="10dp" />
|
||||
|
||||
@@ -132,7 +134,7 @@
|
||||
|
||||
android:layout_marginHorizontal="25dp"
|
||||
|
||||
android:background="#4285f4" />
|
||||
android:background="@android:color/holo_blue_dark" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/createaccount"
|
||||
@@ -140,11 +142,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:textColor="@android:color/holo_blue_dark"
|
||||
|
||||
android:layout_marginTop="1dp"
|
||||
android:padding="10dp"
|
||||
android:text="Register here"
|
||||
android:textColor="#4285f4"
|
||||
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
58
app/src/main/res/layout/activity_main.xml
Normal file
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
>
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
/>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
<TextView
|
||||
android:id="@+id/info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:textSize="@dimen/heading_size"
|
||||
android:layout_gravity="center"
|
||||
android:text="Tap on Plus Button to take a new test."
|
||||
/>
|
||||
|
||||
<include layout="@layout/content_main" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginBottom="120dp"
|
||||
android:layout_marginRight="30dp"
|
||||
|
||||
android:backgroundTint="@android:color/holo_blue_dark"
|
||||
|
||||
app:srcCompat="@drawable/ic_baseline_add_24"
|
||||
tools:ignore="VectorDrawableCompat" />
|
||||
<!-- <com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:id="@+id/bottom_Navigation"
|
||||
app:menu="@menu/bottom"
|
||||
android:layout_marginBottom="40dp"
|
||||
></com.google.android.material.bottomnavigation.BottomNavigationView>
|
||||
|
||||
-->
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
@@ -30,6 +30,7 @@
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" >
|
||||
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -101,12 +101,13 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
|
||||
android:layout_marginLeft="10dp"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:id="@+id/gender"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:textSize="@dimen/default_text_size"
|
||||
|
||||
|
||||
android:text="Patient Gender *"
|
||||
@@ -175,7 +176,7 @@
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
android:hint="Nikshay ID *"
|
||||
android:hint="National ID [Eg: Nikshay ID] *"
|
||||
android:inputType="number"
|
||||
|
||||
android:maxLines="1"
|
||||
|
||||
202
app/src/main/res/layout/activity_register.xml
Normal file
@@ -0,0 +1,202 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentLeft="true">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:contentDescription="TODO"
|
||||
android:layout_marginTop="15dp"
|
||||
android:src="@drawable/logo_app"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleapp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@android:dimen/app_icon_size"
|
||||
android:contentDescription="TODO"
|
||||
android:layout_marginTop="15dp"
|
||||
android:textSize="28sp"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
android:textStyle="bold"
|
||||
|
||||
android:textAlignment="center"
|
||||
android:textColor="#131313"
|
||||
android:text="Spin Tube App"
|
||||
android:gravity="center_horizontal" />
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Register"
|
||||
android:textColor="#131313"
|
||||
|
||||
android:fontFamily="@font/fontstyle"
|
||||
android:paddingLeft="10dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:id="@+id/sign_in_text"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/editTextName"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="40dp"
|
||||
android:background="@drawable/text_back"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20sp"
|
||||
android:layout_marginEnd="20sp"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
|
||||
android:ems="10"
|
||||
android:hint="User Name :"
|
||||
android:padding="12dp"
|
||||
/>
|
||||
|
||||
<!-- <EditText
|
||||
android:id="@+id/editTextMobile"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20sp"
|
||||
android:layout_marginTop="18dp"
|
||||
|
||||
android:background="@drawable/text_back"
|
||||
android:layout_marginEnd="20sp"
|
||||
android:ems="10"
|
||||
android:hint="Contact Number :"
|
||||
android:padding="12dp"/>
|
||||
|
||||
-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<com.hbb20.CountryCodePicker
|
||||
android:id="@+id/ccp"
|
||||
app:ccp_showFlag="false"
|
||||
android:layout_marginStart="20sp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:background="@drawable/text_back"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
|
||||
app:ccpDialog_showFlag="false"
|
||||
android:padding="3.5dp" android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextMobile"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20sp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
|
||||
android:background="@drawable/text_back"
|
||||
android:layout_marginEnd="20sp"
|
||||
android:ems="10"
|
||||
android:hint="Contact Number :"
|
||||
android:padding="12dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="40dp"
|
||||
|
||||
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/login_account"
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:textSize="16sp"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
|
||||
android:text="Do you have a Account ?"
|
||||
android:textColor="@android:color/holo_blue_dark"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:layout_marginTop="50dp"
|
||||
android:id="@+id/buttonContinue"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAllCaps="false"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
android:text="Sign UP"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
|
||||
android:background="@android:color/holo_blue_dark"
|
||||
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="20sp"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
android:layout_column="1"
|
||||
android:layout_weight="5"
|
||||
android:lines="2"
|
||||
android:text="Nikshay ID :"
|
||||
android:text="National ID :"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
/>
|
||||
|
||||
@@ -428,7 +428,7 @@
|
||||
android:layout_column="1"
|
||||
android:layout_weight="5"
|
||||
android:lines="2"
|
||||
android:text="NIRT Lab Number :"
|
||||
android:text="Lab Number :"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
/>
|
||||
|
||||
|
||||
567
app/src/main/res/layout/activity_spin__test.xml
Normal file
@@ -0,0 +1,567 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:gravity="center"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- <TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center"
|
||||
android:text="Test Report"
|
||||
android:textColor="#131313"
|
||||
android:textSize="@dimen/heading_size"
|
||||
android:textStyle="bold">
|
||||
|
||||
</TextView>
|
||||
-->
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true">
|
||||
|
||||
|
||||
<TableLayout
|
||||
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
|
||||
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:id="@+id/circle_image"
|
||||
android:layout_width="300dp"
|
||||
|
||||
android:layout_height="300dp"
|
||||
app:civ_border_width="3dp"
|
||||
|
||||
android:src="@android:drawable/ic_menu_gallery"
|
||||
/>
|
||||
|
||||
|
||||
<TableLayout
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TableRow
|
||||
android:padding="15dp"
|
||||
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:text="Date : "
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:lines="2"
|
||||
|
||||
android:layout_weight="5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:id="@+id/dater"
|
||||
android:layout_weight="5"
|
||||
android:layout_height="wrap_content" />
|
||||
</TableRow>
|
||||
<View
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
android:layout_height="2dp"
|
||||
android:background="#eee" />
|
||||
|
||||
</TableLayout>
|
||||
<TableLayout
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TableRow
|
||||
android:padding="15dp"
|
||||
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:text="Time : "
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:lines="2"
|
||||
|
||||
android:layout_weight="5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:id="@+id/timer"
|
||||
android:layout_weight="5"
|
||||
android:layout_height="wrap_content" />
|
||||
</TableRow>
|
||||
<View
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
android:layout_height="2dp"
|
||||
android:background="#eee" />
|
||||
|
||||
</TableLayout>
|
||||
<TableLayout
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TableRow
|
||||
android:padding="15dp"
|
||||
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:text="Patient ID : "
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:lines="2"
|
||||
|
||||
android:layout_weight="5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:id="@+id/patient_idr"
|
||||
android:layout_weight="5"
|
||||
android:layout_height="wrap_content" />
|
||||
</TableRow>
|
||||
<View
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
android:layout_height="2dp"
|
||||
android:background="#eee" />
|
||||
|
||||
</TableLayout>
|
||||
|
||||
|
||||
<TableLayout
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TableRow
|
||||
android:padding="15dp"
|
||||
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_weight="5"
|
||||
android:lines="2"
|
||||
android:text="Patient Gender :"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:id="@+id/patient_genderr"
|
||||
|
||||
android:layout_weight="5"
|
||||
android:layout_height="wrap_content" />
|
||||
</TableRow>
|
||||
<View
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
android:layout_height="2dp"
|
||||
android:background="#eee" />
|
||||
|
||||
</TableLayout>
|
||||
<TableLayout
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TableRow
|
||||
android:padding="15dp"
|
||||
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_weight="5"
|
||||
android:lines="2"
|
||||
android:text="Date of Birth :"
|
||||
android:textSize="@dimen/small_text_size" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:id="@+id/patien_dobr"
|
||||
|
||||
android:layout_weight="5"
|
||||
android:layout_height="wrap_content" />
|
||||
</TableRow>
|
||||
<View
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
android:layout_height="2dp"
|
||||
android:background="#eee" />
|
||||
|
||||
</TableLayout>
|
||||
<TableLayout
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TableRow
|
||||
android:padding="15dp"
|
||||
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_weight="5"
|
||||
android:lines="2"
|
||||
android:text="Age :"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:id="@+id/patient_ager"
|
||||
|
||||
android:layout_weight="5"
|
||||
android:layout_height="wrap_content" />
|
||||
</TableRow>
|
||||
<View
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
android:layout_height="2dp"
|
||||
android:background="#eee" />
|
||||
|
||||
</TableLayout>
|
||||
<TableLayout
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TableRow
|
||||
android:padding="15dp"
|
||||
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_weight="5"
|
||||
android:lines="2"
|
||||
android:text="Result :"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:id="@+id/patient_resultr"
|
||||
|
||||
android:layout_weight="5"
|
||||
android:layout_height="wrap_content" />
|
||||
</TableRow>
|
||||
<View
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
android:layout_height="2dp"
|
||||
android:background="#eee" />
|
||||
|
||||
</TableLayout>
|
||||
<TableLayout
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TableRow
|
||||
android:padding="15dp"
|
||||
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_weight="5"
|
||||
android:lines="2"
|
||||
android:text="National ID :"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:id="@+id/patient_nikshayidr"
|
||||
|
||||
android:layout_weight="5"
|
||||
android:layout_height="wrap_content" />
|
||||
</TableRow>
|
||||
<View
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
android:layout_height="2dp"
|
||||
android:background="#eee" />
|
||||
|
||||
</TableLayout>
|
||||
<TableLayout
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TableRow
|
||||
android:padding="15dp"
|
||||
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1"
|
||||
android:layout_weight="5"
|
||||
android:lines="2"
|
||||
android:text="Lab Number :"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:id="@+id/patient_nirtr"
|
||||
|
||||
android:layout_weight="5"
|
||||
android:layout_height="wrap_content" />
|
||||
</TableRow>
|
||||
<View
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
android:layout_height="2dp"
|
||||
android:background="#eee" />
|
||||
|
||||
</TableLayout>
|
||||
<TableLayout
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TableRow
|
||||
android:padding="15dp"
|
||||
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:text="SPIN Tube ID :"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:lines="2"
|
||||
android:layout_weight="5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:id="@+id/patient_spintuber"
|
||||
|
||||
android:layout_weight="5"
|
||||
android:layout_height="wrap_content" />
|
||||
</TableRow>
|
||||
<View
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
android:layout_height="2dp"
|
||||
android:background="#eee" />
|
||||
|
||||
</TableLayout>
|
||||
|
||||
|
||||
|
||||
<TableLayout
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TableRow
|
||||
android:padding="15dp"
|
||||
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:text="Type of Sample :"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:lines="2"
|
||||
|
||||
android:layout_weight="5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:id="@+id/patient_typesampler"
|
||||
|
||||
|
||||
|
||||
android:layout_weight="5"
|
||||
android:layout_height="wrap_content" />
|
||||
</TableRow>
|
||||
<View
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
android:layout_height="2dp"
|
||||
android:background="#eee" />
|
||||
|
||||
</TableLayout>
|
||||
<TableLayout
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TableRow
|
||||
android:padding="15dp"
|
||||
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:text="Tube Validity :"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:lines="2"
|
||||
android:layout_weight="5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:id="@+id/patient_tubevisibler"
|
||||
|
||||
|
||||
android:layout_weight="5"
|
||||
android:layout_height="wrap_content" />
|
||||
</TableRow>
|
||||
<View
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
android:layout_height="2dp"
|
||||
android:background="#eee" />
|
||||
|
||||
</TableLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</TableLayout>
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -79,7 +79,7 @@
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
|
||||
android:hint="NIRT Lab Number *"
|
||||
android:hint="Lab Number [Eg: NIRT Lab No] *"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
@@ -118,7 +118,7 @@
|
||||
android:paddingStart="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:text="Type of Sample *"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:textSize="@dimen/default_text_size"
|
||||
android:textColor="@android:color/darker_gray"
|
||||
/>
|
||||
|
||||
@@ -150,7 +150,7 @@ android:textSize="@dimen/small_text_size"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:textSize="@dimen/default_text_size"
|
||||
|
||||
|
||||
android:text="Tube Validity * "
|
||||
|
||||
204
app/src/main/res/layout/activity_verify__o_t_p.xml
Normal file
@@ -0,0 +1,204 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical" >
|
||||
<RelativeLayout
|
||||
android:id="@+id/wvHelp1"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="10dp"
|
||||
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.1" >
|
||||
<!-- <ImageView
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/logo"
|
||||
|
||||
></ImageView>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/wvHelp3"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.2" >
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginTop="10dp"
|
||||
|
||||
android:textAlignment="center"
|
||||
android:text="Verify OTP "
|
||||
android:textSize="30sp"
|
||||
android:gravity="center_horizontal" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/wvHelp"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:textAlignment="center"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.6"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
|
||||
<!-- <EditText
|
||||
android:id="@+id/editTextCode"
|
||||
android:layout_width="280dp"
|
||||
android:textAlignment="center"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:paddingLeft="2dp"
|
||||
android:drawablePadding="5dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
|
||||
android:layout_centerHorizontal="true"
|
||||
|
||||
android:background="#ffffff"
|
||||
android:textColorHint="@color/colorPrimary"
|
||||
android:hint="Enter OTP"/>
|
||||
-->
|
||||
<com.chaos.view.PinView
|
||||
android:id="@+id/firstPinView"
|
||||
style="@style/PinWidget.PinView"
|
||||
android:layout_width="wrap_content"
|
||||
android:textColor="@android:color/holo_blue_dark"
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="30dp"
|
||||
android:cursorVisible="true"
|
||||
android:hint="1"
|
||||
android:inputType="text"
|
||||
android:padding="14dp"
|
||||
android:textAlignment="center"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:cursorColor="@color/colorAccent"
|
||||
app:cursorWidth="2dp"
|
||||
app:hideLineWhenFilled="true"
|
||||
app:itemCount="6"
|
||||
app:itemHeight="50dp"
|
||||
app:itemRadius="4dp"
|
||||
app:itemWidth="50dp"
|
||||
app:lineWidth="6dp"
|
||||
app:viewType="rectangle" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressbar"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonSignIn"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="206dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@drawable/buttonshape"
|
||||
|
||||
android:layout_below="@id/firstPinView"
|
||||
android:layout_marginTop="20dp"
|
||||
android:textColor="#ffffff"
|
||||
android:text="Verify"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/wvHelpj"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.2" >
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
20
app/src/main/res/layout/content_main.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
|
||||
tools:showIn="@layout/activity_main">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_marginBottom="30dp"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
139
app/src/main/res/layout/demo.xml
Normal file
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="@drawable/bg_list_row"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/padding_list_row"
|
||||
android:paddingLeft="?listPreferredItemPaddingLeft"
|
||||
android:paddingRight="?listPreferredItemPaddingRight"
|
||||
android:paddingTop="@dimen/padding_list_row">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/message_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="72dp"
|
||||
android:paddingRight="@dimen/padding_list_row">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/patient_Id"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
|
||||
android:lines="1"
|
||||
|
||||
android:textColor="@color/from"
|
||||
android:textSize="@dimen/msg_text_primary"
|
||||
android:textStyle="bold"
|
||||
tools:text="Sender name"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sample_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
android:textColor="@color/subject"
|
||||
android:textSize="@dimen/msg_text_secondary"
|
||||
android:textStyle="bold"
|
||||
tools:text="This is the subject of the email"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nikshayid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
|
||||
android:lines="1"
|
||||
android:layout_marginBottom="23dp"
|
||||
android:textColor="@color/message"
|
||||
android:textSize="@dimen/msg_text_secondary"
|
||||
tools:text="This is the body of the email"/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/icon_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/icon_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/icon_front"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_profile"
|
||||
android:layout_width="@dimen/icon_width_height"
|
||||
|
||||
android:layout_height="@dimen/icon_width_height" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/icon_text"
|
||||
android:text="N"
|
||||
android:gravity="center"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:background="@drawable/bg_circle"
|
||||
android:layout_centerInParent="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/icon_text" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timestamp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
|
||||
android:textColor="@color/timestamp"
|
||||
android:textSize="@dimen/timestamp"
|
||||
android:textStyle="bold"
|
||||
tools:text="9:00 AM"/>
|
||||
|
||||
<!-- <ImageView
|
||||
android:id="@+id/icon_star"
|
||||
android:background="@android:drawable/ic_menu_share"
|
||||
android:layout_width="@dimen/icon_star"
|
||||
android:layout_height="@dimen/icon_star"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
app:tint="@color/icon_tint_normal" />-->
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dp"
|
||||
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="#EEE" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -2,8 +2,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="180dp"
|
||||
|
||||
android:layout_height="230dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
|
||||
|
||||
@@ -18,7 +17,7 @@
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<com.ShanMukhaInnovations.ArrestTB.FontAwesome
|
||||
<in.sminnovations.arrest_tb.FontAwesome
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="50dp"
|
||||
@@ -27,18 +26,72 @@
|
||||
android:layout_marginTop="30dp"
|
||||
android:id="@+id/image"
|
||||
android:textColor="@android:color/white"
|
||||
></com.ShanMukhaInnovations.ArrestTB.FontAwesome>
|
||||
></in.sminnovations.arrest_tb.FontAwesome>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Not Signed In"
|
||||
android:layout_below="@id/image"
|
||||
android:padding="10dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:id="@+id/not_sign_in"></TextView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="User Name"
|
||||
android:layout_below="@id/image"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_below="@id/not_sign_in"
|
||||
android:padding="10dp"
|
||||
android:textColor="@android:color/white"
|
||||
|
||||
android:id="@+id/text"></TextView>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="180dp"
|
||||
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
|
||||
|
||||
android:id="@+id/head">
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="matrix"
|
||||
|
||||
android:src="@color/colorPrimary"
|
||||
></ImageView>
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<com.shanmukhainnovations.spintubetest.Font_Awesome
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="50dp"
|
||||
android:text=""
|
||||
android:padding="20dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:id="@+id/image"
|
||||
android:textColor="@android:color/white"
|
||||
></com.shanmukhainnovations.spintubetest.Font_Awesome>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="User Name"
|
||||
android:layout_below="@id/image"
|
||||
android:textColor="@android:color/white"
|
||||
android:padding="10dp"
|
||||
android:id="@+id/text"></TextView>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
127
app/src/main/res/layout/item.xml
Normal file
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="@drawable/bg_list_row"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/padding_list_row"
|
||||
android:paddingLeft="?listPreferredItemPaddingLeft"
|
||||
android:paddingRight="?listPreferredItemPaddingRight"
|
||||
android:paddingTop="@dimen/padding_list_row">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/message_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="72dp"
|
||||
android:paddingRight="@dimen/padding_list_row">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/patient_Id"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
|
||||
android:lines="1"
|
||||
|
||||
android:textColor="@color/from"
|
||||
android:textSize="@dimen/msg_text_primary"
|
||||
android:textStyle="bold"
|
||||
tools:text="Patinet ID"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sample_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:lines="1"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
android:textColor="@color/subject"
|
||||
android:textSize="@dimen/msg_text_secondary"
|
||||
android:textStyle="bold"
|
||||
tools:text="Sample type"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nikshayid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
|
||||
android:lines="1"
|
||||
android:paddingBottom="5dp"
|
||||
android:textColor="@color/message"
|
||||
android:textSize="@dimen/msg_text_secondary"
|
||||
tools:text="Nikshay ID"/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/icon_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/icon_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/icon_front"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_profile"
|
||||
android:layout_width="@dimen/icon_width_height"
|
||||
|
||||
android:layout_height="@dimen/icon_width_height" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/icon_text"
|
||||
android:text="N"
|
||||
android:gravity="center"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:background="@drawable/bg_circle"
|
||||
android:layout_centerInParent="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/icon_text" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timestamp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:fontFamily="@font/fontstyle"
|
||||
|
||||
android:textColor="@color/timestamp"
|
||||
android:textSize="@dimen/timestamp"
|
||||
android:textStyle="bold"
|
||||
tools:text="Date"/>
|
||||
|
||||
<!-- <ImageView
|
||||
android:id="@+id/icon_star"
|
||||
android:background="@android:drawable/ic_menu_share"
|
||||
android:layout_width="@dimen/icon_star"
|
||||
android:layout_height="@dimen/icon_star"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
app:tint="@color/icon_tint_normal" />-->
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
19
app/src/main/res/menu/download.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item android:id="@+id/download1"
|
||||
android:icon="@drawable/ic_baseline_arrow_downward_24"
|
||||
android:title="Download Data"
|
||||
|
||||
app:showAsAction="always"
|
||||
/>
|
||||
|
||||
<item android:id="@+id/share"
|
||||
android:icon="@drawable/ic_baseline_share_24"
|
||||
android:title="Share Data"
|
||||
|
||||
app:showAsAction="always"
|
||||
/>
|
||||
|
||||
</menu>
|
||||
@@ -4,26 +4,33 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:showIn="navigation">
|
||||
|
||||
<group android:checkableBehavior="single">
|
||||
<item
|
||||
android:id="@+id/nav_profile"
|
||||
|
||||
|
||||
android:title="Your Profile" />
|
||||
<group android:checkableBehavior="single">
|
||||
<item
|
||||
android:id="@+id/nav_details"
|
||||
android:title="Patient Details" />
|
||||
android:id="@+id/nav_home"
|
||||
|
||||
|
||||
android:title="Home" />
|
||||
<item
|
||||
android:id="@+id/nav_add_Test"
|
||||
android:title="Add Test" />
|
||||
<item
|
||||
android:id="@+id/nav_results"
|
||||
android:title="Results" />
|
||||
<item
|
||||
android:id="@+id/nav_positive"
|
||||
android:title="Positive Results" />
|
||||
<item
|
||||
android:id="@+id/nav_negative"
|
||||
android:title="Negative Results " />
|
||||
|
||||
<item
|
||||
android:id="@+id/nav_contact_us"
|
||||
android:title="About" />
|
||||
|
||||
<item
|
||||
android:id="@+id/logout"
|
||||
android:title="Logout" />
|
||||
<item
|
||||
android:id="@+id/nav_contact_us"
|
||||
android:title="About" />
|
||||
<item
|
||||
android:id="@+id/nav_logout"
|
||||
android:title="Logout" />
|
||||
|
||||
|
||||
|
||||
</group>
|
||||
|
||||
12
app/src/main/res/menu/searchmenu.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item android:id="@+id/search"
|
||||
android:icon="@drawable/ic_baseline_search_24"
|
||||
android:title="Search Data"
|
||||
|
||||
app:showAsAction="always"
|
||||
app:actionViewClass="android.widget.SearchView" />
|
||||
|
||||
</menu>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.1 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 3.0 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 4.7 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 6.7 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 13 KiB |
@@ -1,5 +1,16 @@
|
||||
<resources>
|
||||
<dimen name="small_text_size">9.7sp</dimen>
|
||||
<dimen name="heading_size">12.7sp</dimen>
|
||||
<dimen name="heading_size">10.7sp</dimen>
|
||||
<dimen name="default_text_size">11.7sp</dimen>
|
||||
<dimen name="activity_vertical_margin">10.7dp</dimen>
|
||||
<dimen name="padding_list_row">10.7dp</dimen>
|
||||
<dimen name="activity_horizontal_margin">10.7dp</dimen>
|
||||
<dimen name="fab_margin">10.7dp</dimen>
|
||||
<dimen name="icon_star">16.7dp</dimen>
|
||||
<dimen name="messages_padding_left">48dp</dimen>
|
||||
<dimen name="icon_width_height">26.7dp</dimen>
|
||||
<dimen name="icon_text">14.7dp</dimen>
|
||||
<dimen name="timestamp">8dp</dimen>
|
||||
<dimen name="msg_text_primary">9.3sp</dimen>
|
||||
<dimen name="msg_text_secondary">9.3sp</dimen>
|
||||
</resources>
|
||||
@@ -1,5 +1,16 @@
|
||||
<resources>
|
||||
<dimen name="small_text_size">9.7sp</dimen>
|
||||
<dimen name="heading_size">12.7sp</dimen>
|
||||
<dimen name="heading_size">10.7sp</dimen>
|
||||
<dimen name="default_text_size">11.7sp</dimen>
|
||||
<dimen name="activity_vertical_margin">10.7dp</dimen>
|
||||
<dimen name="padding_list_row">10.7dp</dimen>
|
||||
<dimen name="activity_horizontal_margin">10.7dp</dimen>
|
||||
<dimen name="fab_margin">10.7dp</dimen>
|
||||
<dimen name="icon_star">16.7dp</dimen>
|
||||
<dimen name="messages_padding_left">48dp</dimen>
|
||||
<dimen name="icon_width_height">26.7dp</dimen>
|
||||
<dimen name="icon_text">14.7dp</dimen>
|
||||
<dimen name="timestamp">8dp</dimen>
|
||||
<dimen name="msg_text_primary">9.3sp</dimen>
|
||||
<dimen name="msg_text_secondary">9.3sp</dimen>
|
||||
</resources>
|
||||
@@ -1,6 +1,16 @@
|
||||
<resources>
|
||||
<dimen name="heading_size">19sp</dimen>
|
||||
<dimen name="heading_size">16sp</dimen>
|
||||
<dimen name="default_text_size">17.5sp</dimen>
|
||||
<dimen name="small_text_size">14.5sp</dimen>
|
||||
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
<dimen name="padding_list_row">16dp</dimen>
|
||||
<dimen name="messages_padding_left">72dp</dimen>
|
||||
<dimen name="icon_width_height">40dp</dimen>
|
||||
<dimen name="msg_text_primary">14sp</dimen>
|
||||
<dimen name="msg_text_secondary">13.9sp</dimen>
|
||||
<dimen name="icon_star">25dp</dimen>
|
||||
<dimen name="icon_text">22dp</dimen>
|
||||
<dimen name="timestamp">12dp</dimen>
|
||||
</resources>
|
||||
@@ -1,5 +1,16 @@
|
||||
<resources>
|
||||
<dimen name="small_text_size">19.3sp</dimen>
|
||||
<dimen name="heading_size">25.3sp</dimen>
|
||||
<dimen name="heading_size">21.3sp</dimen>
|
||||
<dimen name="default_text_size">23.3sp</dimen>
|
||||
<dimen name="activity_vertical_margin">21.3dp</dimen>
|
||||
<dimen name="padding_list_row">21.3dp</dimen>
|
||||
<dimen name="activity_horizontal_margin">21.3dp</dimen>
|
||||
<dimen name="fab_margin">21.3dp</dimen>
|
||||
<dimen name="icon_star">33.3dp</dimen>
|
||||
<dimen name="messages_padding_left">96dp</dimen>
|
||||
<dimen name="icon_width_height">53.3dp</dimen>
|
||||
<dimen name="icon_text">29.3dp</dimen>
|
||||
<dimen name="timestamp">16dp</dimen>
|
||||
<dimen name="msg_text_primary">18.7sp</dimen>
|
||||
<dimen name="msg_text_secondary">18.5sp</dimen>
|
||||
</resources>
|
||||
@@ -1,5 +1,16 @@
|
||||
<resources>
|
||||
<dimen name="small_text_size">24.2sp</dimen>
|
||||
<dimen name="heading_size">31.7sp</dimen>
|
||||
<dimen name="heading_size">26.7sp</dimen>
|
||||
<dimen name="default_text_size">29.2sp</dimen>
|
||||
<dimen name="activity_vertical_margin">26.7dp</dimen>
|
||||
<dimen name="padding_list_row">26.7dp</dimen>
|
||||
<dimen name="activity_horizontal_margin">26.7dp</dimen>
|
||||
<dimen name="fab_margin">26.7dp</dimen>
|
||||
<dimen name="icon_star">41.7dp</dimen>
|
||||
<dimen name="messages_padding_left">120dp</dimen>
|
||||
<dimen name="icon_width_height">66.7dp</dimen>
|
||||
<dimen name="icon_text">36.7dp</dimen>
|
||||
<dimen name="timestamp">20dp</dimen>
|
||||
<dimen name="msg_text_primary">23.3sp</dimen>
|
||||
<dimen name="msg_text_secondary">23.2sp</dimen>
|
||||
</resources>
|
||||
@@ -1,6 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">@android:color/holo_blue_dark</color>
|
||||
<color name="colorPrimaryDark">#00574B</color>
|
||||
<color name="colorPrimaryDark">@android:color/holo_blue_dark</color>
|
||||
<color name="colorAccent">#696969</color>
|
||||
<color name="from">#000000</color>
|
||||
<color name="subject">#111111</color>
|
||||
<color name="timestamp">#4285f4</color>
|
||||
<color name="message">#7a7a7a</color>
|
||||
<color name="icon_tint_normal">#7a7a7a</color>
|
||||
<color name="icon_tint_selected">#fed776</color>
|
||||
<color name="row_activated">#e0e0e0</color>
|
||||
<color name="bg_action_mode">#757575</color>
|
||||
<color name="bg_circle_default">#666666</color>
|
||||
</resources>
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
<resources>
|
||||
<dimen name="heading_size">10.6sp</dimen>
|
||||
<dimen name="heading_size">8.9sp</dimen>
|
||||
<dimen name="default_text_size">9.7sp</dimen>
|
||||
<dimen name="small_text_size">8.1sp</dimen>
|
||||
<dimen name="activity_vertical_margin">8.9dp</dimen>
|
||||
<dimen name="padding_list_row">8.9dp</dimen>
|
||||
<dimen name="activity_horizontal_margin">8.9dp</dimen>
|
||||
<dimen name="fab_margin">8.9dp</dimen>
|
||||
<dimen name="icon_star">13.9dp</dimen>
|
||||
<dimen name="messages_padding_left">40dp</dimen>
|
||||
<dimen name="icon_width_height">22.2dp</dimen>
|
||||
<dimen name="icon_text">12.2dp</dimen>
|
||||
<dimen name="timestamp">6.7dp</dimen>
|
||||
<dimen name="msg_text_primary">7.8sp</dimen>
|
||||
<dimen name="msg_text_secondary">7.7sp</dimen>
|
||||
</resources>
|
||||
4
app/src/main/res/values/ic_launcher_background.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#FFFFFF</color>
|
||||
</resources>
|
||||
@@ -1,5 +1,5 @@
|
||||
<resources>
|
||||
<string name="app_name">Spin Tube App</string>
|
||||
<string name="app_name">Arrest TB</string>
|
||||
<string name="open_navigation_drawer">Open navigation drawer</string>
|
||||
<string name="close_navigation_drawer">Close navigation drawer</string>
|
||||
<string name="asteriskred"><font color='#cc0029'>*</font></string>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package in.sminnovations.arresttb;
|
||||
package in.sminnovations.arrest_tb;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -8,7 +8,6 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.1'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
|
||||