Smart Lab App

This commit is contained in:
Ramandeep
2022-01-29 02:26:38 +05:30
commit d9df4e5dd1
83 changed files with 3467 additions and 0 deletions

1
app/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

91
app/build.gradle Normal file
View File

@@ -0,0 +1,91 @@
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.smi.smartlab"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
multiDexEnabled true
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
aaptOptions {
noCompress "tflite"
noCompress "lite"
}
}
dependencies {
implementation 'com.chaos.view:pinview:1.4.3'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.firebaseui:firebase-ui-database:7.1.1'
implementation 'androidx.browser:browser:1.2.0'
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'
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.firebase:firebase-config:20.0.0'
implementation 'com.google.firebase:firebase-auth:20.0.1'
implementation 'com.google.firebase:firebase-database:19.5.1'
implementation 'com.google.firebase:firebase-storage:19.2.0'
testImplementation 'junit:junit:4.12'
implementation 'com.google.android.gms:play-services-location:17.0.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.google.firebase:firebase-crashlytics:17.1.1'
implementation 'com.google.firebase:firebase-perf:19.0.11'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.karumi:dexter:6.2.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.3.0'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation ('com.mapbox.mapboxsdk:mapbox-android-sdk:9.7.0'){
exclude group: 'group_name', module: 'module_name'
}
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.9.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-markerview-v9:0.4.0'
}

40
app/google-services.json Normal file
View File

@@ -0,0 +1,40 @@
{
"project_info": {
"project_number": "1042792090548",
"firebase_url": "https://smartlab-9b83e-default-rtdb.firebaseio.com",
"project_id": "smartlab-9b83e",
"storage_bucket": "smartlab-9b83e.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:1042792090548:android:4f095c661cb392df4480e1",
"android_client_info": {
"package_name": "com.smi.smartlab"
}
},
"oauth_client": [
{
"client_id": "1042792090548-682fmspc4hchou6thilamja1of4aqsd6.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCiO5owTmUgosDyjL0_SqpxRoAwgKtn5-o"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "1042792090548-682fmspc4hchou6thilamja1of4aqsd6.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}

21
app/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@@ -0,0 +1,26 @@
package in.testright.smartlab_app23;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("in.testright.smartlab_app23", appContext.getPackageName());
}
}

View File

@@ -0,0 +1,40 @@
{
"project_info": {
"project_number": "1042792090548",
"firebase_url": "https://smartlab-9b83e-default-rtdb.firebaseio.com",
"project_id": "smartlab-9b83e",
"storage_bucket": "smartlab-9b83e.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:1042792090548:android:4f095c661cb392df4480e1",
"android_client_info": {
"package_name": "com.smi.smartlab"
}
},
"oauth_client": [
{
"client_id": "1042792090548-682fmspc4hchou6thilamja1of4aqsd6.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCiO5owTmUgosDyjL0_SqpxRoAwgKtn5-o"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "1042792090548-682fmspc4hchou6thilamja1of4aqsd6.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}

View File

@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.smi.smartlab" >
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
</queries>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:forceDarkAllowed="true"
android:theme="@style/AppTheme"
android:icon="@drawable/shanmukha_logo_small"
android:label="@string/app_name"
android:preserveLegacyExternalStorage="true"
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:usesCleartextTraffic="true" >
<activity
android:name=".Lab_Metrics"
android:screenOrientation="portrait" />
<activity
android:name=".GPS_Location"
android:screenOrientation="portrait" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true" >
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_path" />
</provider>
<activity
android:name=".Home"
android:screenOrientation="portrait" />
<activity
android:name=".SplashScreen"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".NavigationTop"
android:screenOrientation="portrait" />
<activity
android:name=".LoginScreen"
android:screenOrientation="portrait" />
<activity
android:name=".About"
android:screenOrientation="portrait" />
<activity
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:theme="@style/Base.Theme.AppCompat" />
</application>
</manifest>

Binary file not shown.

View File

@@ -0,0 +1,22 @@
package com.smi.smartlab;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
public class About extends NavigationTop {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LayoutInflater inflater = (LayoutInflater) this
.getSystemService(LAYOUT_INFLATER_SERVICE);
View contentView = inflater.inflate(R.layout.activity_about, null, false);
draw.addView(contentView, 0);
//setContentView(R.layout.activity_about);
}
}

View File

@@ -0,0 +1,35 @@
package com.smi.smartlab;
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);
}
}

View File

@@ -0,0 +1,218 @@
package com.smi.smartlab;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import com.mapbox.mapboxsdk.Mapbox;
import com.mapbox.mapboxsdk.annotations.Icon;
import com.mapbox.mapboxsdk.annotations.IconFactory;
import com.mapbox.mapboxsdk.annotations.MarkerOptions;
import com.mapbox.mapboxsdk.camera.CameraPosition;
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.maps.MapView;
import com.mapbox.mapboxsdk.maps.MapboxMap;
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
import com.mapbox.mapboxsdk.maps.Style;
import com.mapbox.mapboxsdk.plugins.markerview.MarkerView;
import org.json.JSONArray;
import org.json.JSONObject;
public class GPS_Location extends AppCompatActivity {
private MapView mapView;
RequestQueue queue;
TextView text1, text2;
String lat, lag;
String URL = "http://13.127.144.213/webservice?token=getLiveData&user=shanmukha&pass=123456&format=json";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Mapbox.getInstance(this, getString(R.string.mapbox_access_token));
setContentView(R.layout.activity_gps_location);
queue = Volley.newRequestQueue(this);
text1 = findViewById(R.id.text1);
text2 = findViewById(R.id.text2);
mapView = (MapView) findViewById(R.id.mapView);
mapView.onCreate(savedInstanceState);
Thread t = new Thread() {
@Override
public void run() {
while (!isInterrupted()) {
try {
Thread.sleep(10); //1000ms = 1 sec
runOnUiThread(new Runnable() {
@Override
public void run() {
loc();
}
});
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
};
t.start();
}
@Override
protected void onStart() {
super.onStart();
mapView.onStart();
}
@Override
protected void onResume() {
super.onResume();
mapView.onResume();
}
@Override
protected void onPause() {
super.onPause();
mapView.onPause();
}
@Override
protected void onStop() {
super.onStop();
mapView.onStop();
}
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
mapView.onSaveInstanceState(outState);
}
@Override
public void onLowMemory() {
super.onLowMemory();
mapView.onLowMemory();
}
@Override
protected void onDestroy() {
super.onDestroy();
mapView.onDestroy();
}
public void loc() {
StringRequest request = new StringRequest(Request.Method.GET, URL, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
// textView.setText(response.toString());
try {
JSONObject jObject = new JSONObject(response).getJSONObject("root");
JSONArray jsonarray = jObject.getJSONArray("VehicleData");
for (int i = 0; i < jsonarray.length(); i++) {
JSONObject jsonobject = jsonarray.getJSONObject(i);
String lat = jsonobject.getString("Latitude");
String lag = jsonobject.getString("Longitude");
String tex = jsonobject.getString("Location");
String speed = jsonobject.getString("Speed");
text1.setText(tex);
text2.setText("Speed :" + speed + "Km/h");
Log.e("lat,long", lat);
Log.e("long", lag);
mapx(lat, lag);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Log.d("error", error.toString());
}
});
queue.add(request);
}
public void mapx(String lat, String lag) {
mapView.getMapAsync(new OnMapReadyCallback() {
@Override
public void onMapReady(@NonNull MapboxMap mapboxMap) {
mapboxMap.setStyle(Style.MAPBOX_STREETS, new Style.OnStyleLoaded() {
@Override
public void onStyleLoaded(@NonNull Style style) {
mapboxMap.clear();
IconFactory iconFactory = IconFactory.getInstance(GPS_Location.this);
Icon icons = iconFactory.fromResource(R.drawable.mapbox_marker_icon_default);
@SuppressLint("Range") CameraPosition position = new CameraPosition.Builder()
.target(new LatLng(Double.parseDouble(lat), Double.parseDouble(lag)))
.zoom(12)
.tilt(15)
.build();
// Add the marker to the map
MarkerView marker_inter;
mapboxMap.animateCamera(CameraUpdateFactory.newCameraPosition(position), 500);
mapboxMap.addMarker(new MarkerOptions()
.getThis()
.position(new LatLng(Double.parseDouble(lat), Double.parseDouble(lag)))
.icon(icons));
}
});
}
});
}
}

View File

@@ -0,0 +1,38 @@
package com.smi.smartlab;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
public class Home extends NavigationTop {
private Button add_gps,add_sensors;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LayoutInflater inflater = (LayoutInflater) this
.getSystemService(LAYOUT_INFLATER_SERVICE);
View contentView = inflater.inflate(R.layout.activity_home, null, false);
draw.addView(contentView, 0);
add_gps=findViewById(R.id.add_gps);
add_sensors=findViewById(R.id.add_sensors);
add_gps.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent (Home.this, GPS_Location.class);
startActivity(intent);
}
});
add_sensors.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent (Home.this, Lab_Metrics.class);
startActivity(intent);
}
});
}
}

View File

@@ -0,0 +1,93 @@
package com.smi.smartlab;
import android.os.Bundle;
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.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
public class Lab_Metrics extends AppCompatActivity {
FirebaseDatabase firebaseDatabase;
DatabaseReference databaseReference;
DatabaseReference databaseReference2;
private TextView retrieveTemp;
private TextView retrieveHum;
private TextView adc;
private TextView retrieveTemp2;
private TextView retrieveHum2;
private TextView adc2;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_lab);
firebaseDatabase = FirebaseDatabase.getInstance();
databaseReference = firebaseDatabase.getReference("Data").child("smi").child("van1").child("compartment_1").child("sensor_data");
databaseReference2 = firebaseDatabase.getReference("Data").child("smi").child("van1").child("compartment_2").child("sensor_data");
// initializing our object class variable.
retrieveTemp = findViewById(R.id.temp1);
retrieveHum = findViewById(R.id.humidity1);
adc = findViewById(R.id.gas1);
retrieveTemp2 = findViewById(R.id.temp2);
retrieveHum2 = findViewById(R.id.humidity2);
adc2 = findViewById(R.id.gas2);
// calling method
// for getting data.
getdata(databaseReference, retrieveTemp, retrieveHum, adc, "Zone 1 : ");
getdata(databaseReference2, retrieveTemp2, retrieveHum2, adc2, "Zone 2: ");
}
private void getdata(DatabaseReference d, TextView t1, TextView t2, TextView t3, String zone) {
// calling add value event listener method
// for getting the values from database.
d.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot snapshot) {
Double temp1 = snapshot.child("temperature").getValue(Double.class);
Double ppm1 = snapshot.child("ppm").getValue(Double.class);
Double humidity1 = snapshot.child("humidity").getValue(Double.class);
String d1 = String.format("%.2f", temp1);
String d2 = String.format("%.2f", ppm1);
String d3 = String.format("%.2f", humidity1);
t1.setText(zone + d1 + "°C");
t2.setText(zone + d3 + "%");
t3.setText(zone + d2);
}
@Override
public void onCancelled(@NonNull DatabaseError error) {
Toast.makeText(Lab_Metrics.this, "Fail to get data.", Toast.LENGTH_SHORT).show();
}
});
}
}

View File

@@ -0,0 +1,271 @@
package com.smi.smartlab;
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.Log;
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) {
open();
}
});
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 {
loadingBar.setTitle("Login Account");
loadingBar.setMessage("Please wait, while we are checking the credentials.");
loadingBar.setCanceledOnTouchOutside(false);
loadingBar.show();
Query chekuser = FirebaseDatabase.getInstance().getReference("Companies").orderByChild("company_id").equalTo(phonenum);
chekuser.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
if (dataSnapshot.exists()) {
String systempassword = dataSnapshot.child(phonenum).child("passkay").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("company_name").getValue(String.class);
String nid = dataSnapshot.child(phonenum).child("company_name").getValue(String.class);
Log.e("name", name);
SharedPreferences preferences = getSharedPreferences("PhoneBook_number", MODE_PRIVATE);
SharedPreferences.Editor editor = preferences.edit();
// editor.putString(Name, phonenum);
editor.putString("Phone", phonenum);
editor.commit();
Intent intent = new Intent(LoginScreen.this, Home.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) {
open();
}
});
}
private void net_check() {
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());
}
public void open() {
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
alertDialogBuilder.setMessage("Contact Us :ShanMukha Innovations Pvt Ltd\n" +
"No. 25, 2nd floor, Ram Thulasi Chambers\n" +
"MS Ramaiah Road , Mathikere\n" +
"Bangalore, Karnataka 560054.\n" +
"\n" +
"Tel: +91 9742255674\n" +
"Email : info@sminnovations.in");
alertDialogBuilder.setPositiveButton("Okay",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface arg0, int arg1) {
finish();
}
});
alertDialogBuilder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(LoginScreen.this, LoginScreen.class);
startActivity(intent);
}
});
AlertDialog alertDialog = alertDialogBuilder.create();
alertDialog.show();
}
}

View File

@@ -0,0 +1,129 @@
package com.smi.smartlab;
import android.app.AlertDialog;
import android.content.DialogInterface;
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 intent3=new Intent(this, About.class);
startActivity(intent3);
break;
// open();
case R.id.nav_home:
Intent intent2=new Intent(this, Home.class);
startActivity(intent2);
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);
}
public void open(){
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
alertDialogBuilder.setMessage("Contact Us :ShanMukha Innovations Pvt Ltd\n" +
"No. 25, 2nd floor, Ram Thulasi Chambers\n" +
"MS Ramaiah Road , Mathikere\n" +
"Bangalore, Karnataka 560054.\n" +
"\n" +
"Tel: +91 9742255674\n" +
"Email : info@sminnovations.in");
alertDialogBuilder.setPositiveButton("Okay",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface arg0, int arg1) {
Intent intent = new Intent(NavigationTop.this, Home.class);
startActivity(intent);
}
});
AlertDialog alertDialog = alertDialogBuilder.create();
alertDialog.show();
}
}

View File

@@ -0,0 +1,44 @@
package com.smi.smartlab;
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, Home.class);
startActivity(home1);
finish();
}
}
}, SPLASH_TIME_OUT);
}
}

View File

@@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

View 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>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="1dp"
android:color="@android:color/holo_blue_light"/>
<corners
android:radius="16dp" />
<padding
android:left="1dp"
android:right="1dp"
android:top="1dp"
android:bottom="1dp"/>
<solid android:color="@android:color/holo_blue_dark"/>
</shape>

View 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>

View 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>

View 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>

View File

@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>

View File

@@ -0,0 +1,34 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeWidth="1"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/cardview_light_background"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View File

@@ -0,0 +1,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="#ffffff" />
<stroke android:width="1dp" android:color="@android:color/darker_gray"/>
<corners
android:radius="5dp" />
</shape>

Binary file not shown.

View File

@@ -0,0 +1,139 @@
<?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:layout_centerHorizontal="true"
android:textSize="34sp"
android:text="MITR LABSAGE"
android:gravity="center"
android:textStyle="bold"
android:fontFamily="@font/fontstyle"
android:layout_width="match_parent"
android:layout_marginTop="80dp"
android:layout_height="100dp"
android:src="@drawable/shanmukha_logo_small"
></ImageView>
<TextView
android:layout_centerHorizontal="true"
android:textSize="25sp"
android:text="MITR LABSAGE"
android:gravity="center"
android:textStyle="bold"
android:fontFamily="@font/fontstyle"
android:layout_width="match_parent"
android:layout_height="70dp"
android:src="@drawable/shanmukha_logo_small"
></TextView>
<!-- <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/shanmukha_logo_small"
android:text="About"
android:textColor="#131313"
android:textSize="@dimen/heading_size"
android:textStyle="bold">
</TextView>-->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/shanmukha_logo_small"
android:text="Smart Lab App"
android:textSize="@dimen/heading_size"
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:text="MITR LabSage is a modern solution developed by ShanMukha Innovations that helps keep your critical lab infrastructure compliant and your lab members safe."
android:layout_width="wrap_content"
android:textSize="@dimen/small_text_size"
android:lineSpacingExtra="2sp"
android:layout_height="wrap_content"
android:fontFamily="@font/fontstyle"
android:gravity="left" />
<TextView
android:padding="20dp"
android:textStyle="bold"
android:text="ShanMukha Innovations Pvt Ltd is a spin-off from Indian Institute of Science, Bangalore that is developing unique solutions for customers across mobile laboratories, portable instruments and novel kits."
android:layout_width="wrap_content"
android:textSize="@dimen/small_text_size"
android:lineSpacingExtra="2sp"
android:layout_height="wrap_content"
android:fontFamily="@font/fontstyle"
android:gravity="left" />
<TextView
android:padding="20dp"
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="For more details visit https://sminnovations.in/ or contact us at info@sminnovations.in"
/>
<!-- <View
android:layout_width="fill_parent"
android:layout_height="2dp"
android:background="#EEE" />
-->
</LinearLayout>
</ScrollView>
</LinearLayout>

View File

@@ -0,0 +1,97 @@
<?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"
android:id="@+id/linear"
android:weightSum="10"
>
<LinearLayout
android:id="@+id/LinearLayoutTop"
android:layout_width="fill_parent"
android:layout_height="72dp"
android:layout_weight="2"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:id="@+id/loc"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cardUseCompatPadding="true">
<!--
In the above cardview widget
cardelevation property will give elevation to your card view
card corner radius will provide radius to your card view
card background color will give background color to your card view
card max elevation will give the cardview maximum elevation
card prevent corner overlap will add padding to CardView on v20 and before to prevent intersections between the Card content and rounded corners.
card use compact padding will add padding in API v21+ as well to have the same measurements with previous versions.
below are the two widgets imageview and text view we are displaying inside our card view.
-->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/text1"
android:layout_gravity="bottom|center_horizontal"
android:textSize="16sp"
android:textStyle="bold" />
</androidx.cardview.widget.CardView>
</LinearLayout>
<LinearLayout
android:id="@+id/LinearLayoutBottom"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="8">
<!--
In the above cardview widget
cardelevation property will give elevation to your card view
card corner radius will provide radius to your card view
card background color will give background color to your card view
card max elevation will give the cardview maximum elevation
card prevent corner overlap will add padding to CardView on v20 and before to prevent intersections between the Card content and rounded corners.
card use compact padding will add padding in API v21+ as well to have the same measurements with previous versions.
below are the two widgets imageview and text view we are displaying inside our card view.
-->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/text2"
android:layout_gravity="bottom|center_horizontal"
android:textSize="16sp"
android:textStyle="bold" />
<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
android:layout_width="match_parent"
android:layout_height="fill_parent"
app:mapbox_cameraZoom="12"/>
</LinearLayout>
</LinearLayout>

View File

@@ -0,0 +1,174 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="230dp"
android:orientation="vertical"
android:layout_marginTop="40dp"
android:gravity="center">
<ImageView
android:layout_centerHorizontal="true"
android:text="MITR LABSAGE"
android:gravity="center"
android:textStyle="bold"
android:fontFamily="@font/fontstyle"
android:layout_width="match_parent"
android:layout_height="90dp"
android:src="@drawable/shanmukha_logo_small"
></ImageView>
<TextView
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:textSize="25sp"
android:text="MITR LABSAGE"
android:gravity="center"
android:textStyle="bold"
android:fontFamily="@font/fontstyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/shanmukha_logo_small"
></TextView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_marginTop="235dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="135dp"
android:orientation="horizontal"
android:layout_marginBottom="10dp">
<androidx.cardview.widget.CardView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:orientation="vertical"
android:layout_margin="3dp"
android:layout_weight="1">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.smi.smartlab.FontAwesome
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/holo_blue_dark"
android:textSize="40dp"
android:text="&#xf041;"
android:id="@+id/add_gps1"
android:textStyle="normal"
android:fontFamily="sans-serif"
></com.smi.smartlab.FontAwesome>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" GPS Location "
android:textSize="14sp"
android:textStyle="normal"
android:layout_centerHorizontal="true"
android:layout_marginBottom="4dp"
android:fontFamily="@font/fontstyle"
android:layout_marginTop="4dp"
android:layout_below="@id/add_gps1"></TextView>
<Button
android:id="@+id/add_gps"
android:layout_width="match_parent"
android:background="@android:color/transparent"
android:layout_height="match_parent"
></Button>
</RelativeLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
//second linear
<LinearLayout
android:layout_width="match_parent"
android:layout_height="135dp"
android:orientation="horizontal"
android:layout_marginBottom="10dp">
<androidx.cardview.widget.CardView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_margin="3dp"
android:orientation="vertical"
android:layout_marginRight="5dp"
android:layout_weight="1">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.smi.smartlab.FontAwesome
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="&#xf03a;"
android:id="@+id/sensors"
android:textColor="@android:color/holo_blue_dark"
android:textSize="40dp"
></com.smi.smartlab.FontAwesome>
<TextView
android:textSize="14sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Lab Metrics"
android:fontFamily="@font/fontstyle"
android:layout_centerHorizontal="true"
android:layout_marginBottom="4dp"
android:layout_marginTop="4dp"
android:layout_below="@id/sensors"></TextView>
<Button
android:id="@+id/add_sensors"
android:layout_width="match_parent"
android:background="@android:color/transparent"
android:layout_height="match_parent"
></Button>
</RelativeLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>

View File

@@ -0,0 +1,423 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="200dp"
android:id="@+id/l1"
android:orientation="vertical"
>
<ImageView
android:layout_centerHorizontal="true"
android:text="MITR LABSAGE"
android:gravity="center"
android:textStyle="bold"
android:layout_marginTop="30dp"
android:fontFamily="@font/fontstyle"
android:layout_width="match_parent"
android:layout_height="100dp"
android:id="@+id/img"
android:src="@drawable/shanmukha_logo_small"
></ImageView>
<TextView
android:layout_centerHorizontal="true"
android:textSize="30sp"
android:layout_below="@id/img"
android:text="MITR LABSAGE"
android:gravity="center"
android:textStyle="bold"
android:fontFamily="@font/fontstyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/shanmukha_logo_small"
></TextView>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="20dp"
android:layout_above="@id/l1"
android:orientation="vertical"
android:gravity="center">
<TextView
android:layout_width="match_parent"
android:layout_marginTop="35dp"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:text="Van1"
android:src="@drawable/shanmukha_logo_small"
></TextView>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_marginTop="190dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="30dp"
android:background="@android:color/holo_blue_dark"
android:gravity="center"
android:orientation="horizontal"
>
<TextView
android:textAlignment="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Lab Name : RGCA MOBILE LAB"
android:textSize="20sp"
android:textColor="#fff"
android:textStyle="bold"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="230dp"
android:orientation="horizontal"
android:layout_marginBottom="10dp">
<androidx.cardview.widget.CardView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:orientation="vertical"
android:layout_margin="3dp"
android:layout_weight="1">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.smi.smartlab.FontAwesome
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/holo_blue_dark"
android:textSize="40dp"
android:text="&#xf76b;"
android:layout_marginTop="40dp"
android:layout_centerHorizontal="true"
android:id="@+id/add_gps1"
android:textStyle="normal"
android:fontFamily="sans-serif"
></com.smi.smartlab.FontAwesome>
<TextView
android:textSize="20sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Temperature"
android:textStyle="normal"
android:layout_centerHorizontal="true"
android:layout_marginBottom="4dp"
android:fontFamily="@font/fontstyle"
android:layout_marginTop="4dp"
android:layout_below="@id/add_gps1"></TextView>
<TextView
android:textSize="20sp"
android:layout_below="@id/add_gps1"
android:layout_marginTop="40dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/temp1"
android:text="Temp:"
android:fontFamily="@font/fontstyle"
android:layout_centerHorizontal="true"
></TextView>
<TextView
android:textSize="20sp"
android:layout_below="@+id/temp1"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/temp2"
android:text="Temp:"
android:fontFamily="@font/fontstyle"
android:layout_centerHorizontal="true"
></TextView>
<Button
android:id="@+id/sensors_temp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"></Button>
</RelativeLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width="0dp"
android:elevation="10dp"
android:layout_margin="3dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:orientation="vertical"
android:layout_marginLeft="5dp"
android:layout_weight="1">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.smi.smartlab.FontAwesome
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_centerHorizontal="true"
android:textColor="@android:color/holo_blue_dark"
android:textSize="40dp"
android:text="&#xf73b;"
android:id="@+id/humidity_0"
></com.smi.smartlab.FontAwesome>
<TextView
android:textSize="20sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Humidity"
android:layout_centerHorizontal="true"
android:fontFamily="@font/fontstyle"
android:layout_marginBottom="4dp"
android:layout_marginTop="4dp"
android:layout_below="@id/humidity_0"></TextView>
<TextView
android:textSize="20sp"
android:layout_below="@id/humidity_0"
android:layout_marginTop="40dp"
android:id="@+id/humidity1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Humidity:"
android:fontFamily="@font/fontstyle"
android:layout_centerHorizontal="true"
></TextView>
<TextView
android:textSize="20sp"
android:layout_below="@id/humidity1"
android:layout_marginTop="10dp"
android:id="@+id/humidity2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Humidity:"
android:fontFamily="@font/fontstyle"
android:layout_centerHorizontal="true"
></TextView>
<Button
android:id="@+id/sensors_humidity"
android:layout_width="match_parent"
android:background="@android:color/transparent"
android:layout_height="match_parent"
></Button>
</RelativeLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
//second linear
<LinearLayout
android:layout_width="match_parent"
android:layout_height="230dp"
android:orientation="horizontal"
android:layout_marginBottom="10dp">
<androidx.cardview.widget.CardView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_margin="3dp"
android:orientation="vertical"
android:layout_marginRight="5dp"
android:layout_weight="1">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.smi.smartlab.FontAwesome
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_centerHorizontal="true"
android:text="&#xf03a;"
android:id="@+id/sensors"
android:textColor="@android:color/holo_blue_dark"
android:textSize="40dp"
></com.smi.smartlab.FontAwesome>
<TextView
android:textSize="20sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="PPM"
android:fontFamily="@font/fontstyle"
android:layout_centerHorizontal="true"
android:layout_marginBottom="4dp"
android:layout_marginTop="4dp"
android:layout_below="@id/sensors"></TextView>
<TextView
android:textSize="20sp"
android:layout_below="@id/sensors"
android:layout_marginTop="40dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="PPM:"
android:id="@+id/gas1"
android:fontFamily="@font/fontstyle"
android:layout_centerHorizontal="true"
></TextView>
<TextView
android:textSize="20sp"
android:layout_below="@id/gas1"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="PPM:"
android:id="@+id/gas2"
android:fontFamily="@font/fontstyle"
android:layout_centerHorizontal="true"
></TextView>
<Button
android:id="@+id/sensors_ppm"
android:layout_width="match_parent"
android:background="@android:color/transparent"
android:layout_height="match_parent"
></Button>
</RelativeLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width="0dp"
android:layout_margin="3dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:orientation="vertical"
android:layout_marginLeft="5dp"
android:layout_weight="1">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.smi.smartlab.FontAwesome
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/holo_blue_dark"
android:textSize="40dp"
android:id="@+id/about"
android:text="&#xf05a;"
></com.smi.smartlab.FontAwesome>
<TextView
android:textSize="20sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Others"
android:layout_centerHorizontal="true"
android:fontFamily="@font/fontstyle"
android:layout_marginBottom="4dp"
android:layout_marginTop="4dp"
android:layout_below="@id/about"></TextView>
<Button
android:id="@+id/others_sensors"
android:layout_width="match_parent"
android:background="@android:color/transparent"
android:layout_height="match_parent"
></Button>
</RelativeLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>

View File

@@ -0,0 +1,195 @@
<?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:src="@drawable/shanmukha_logo_small"
android:layout_width="match_parent"
android:layout_height="100dp"
android:contentDescription="TODO"
android:layout_marginTop="15dp"
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:text="Smart Lab"
android:gravity="center_horizontal" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Sign in"
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/contactnumber"
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:ems="10"
android:textColorHint="@android:color/darker_gray"
android:hint="Company Id :"
android:inputType="textEmailAddress"
android:padding="12dp"
/>
<EditText
android:id="@+id/password"
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="Pass Key :"
android:inputType="textPassword"
android:padding="12dp"/>
<androidx.appcompat.widget.AppCompatCheckBox
android:id="@+id/showpassword"
android:layout_width="match_parent"
android:buttonTint="@android:color/darker_gray"
android:layout_height="wrap_content"
android:layout_marginStart="20sp"
android:layout_marginTop="18dp"
android:layout_marginEnd="20sp"
android:textColorHighlight="@android:color/black"
android:backgroundTint="#ffffff"
android:padding="20dp"
android:textColorHint="#ffffff"
android:text="Show Pass Key"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:id="@+id/forgetpassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:padding="10dp"
android:text="Forgot Pass key?"
android:textColor="@android:color/holo_blue_dark"
android:textStyle="bold"
android:layout_marginLeft="10dp" />
<View
android:id="@+id/divider"
android:layout_width="2dp"
android:layout_height="41dp"
android:layout_marginHorizontal="25dp"
android:background="@android:color/holo_blue_dark" />
<TextView
android:id="@+id/createaccount"
android:layout_width="wrap_content"
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:textStyle="bold" />
/>
</LinearLayout>
<Button
android:layout_marginTop="50dp"
android:id="@+id/login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAllCaps="false"
android:fontFamily="@font/fontstyle"
android:text="Sign in"
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>

View File

@@ -0,0 +1,51 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_height="match_parent"
android:layout_width="match_parent">
<androidx.drawerlayout.widget.DrawerLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/Drawer"
android:fitsSystemWindows="true"
tools:openDrawer="start"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/line"
android:layout_marginTop="20dp"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:id="@+id/tollbar"
android:background="@color/colorPrimary"
android:elevation="4dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" >
</androidx.appcompat.widget.Toolbar>
</LinearLayout>
<com.google.android.material.navigation.NavigationView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/navigation"
android:layout_gravity="start"
app:headerLayout="@layout/head"
app:menu="@menu/menu">
</com.google.android.material.navigation.NavigationView>
</androidx.drawerlayout.widget.DrawerLayout>
</RelativeLayout>

View File

@@ -0,0 +1,234 @@
<?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_height="match_parent"
>
<ImageView
android:layout_centerHorizontal="true"
android:gravity="center"
android:textStyle="bold"
android:fontFamily="@font/fontstyle"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_above="@id/text"
android:layout_marginBottom="10dp"
android:src="@drawable/shanmukha_logo_small"
></ImageView>
<TextView
android:layout_centerHorizontal="true"
android:textSize="34sp"
android:text="MITR LABSAGE"
android:id="@+id/text"
android:gravity="center"
android:textStyle="bold"
android:layout_centerInParent="true"
android:fontFamily="@font/fontstyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/shanmukha_logo_small"
></TextView>
</RelativeLayout>
</LinearLayout>
<!--
<?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:background="@drawable/finalback"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/wvHelp1"
android:layout_width="match_parent"
android:orientation="vertical"
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/yourscore4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:fontFamily="serif-monospace"
android:layout_alignParentTop="true"
android:layout_marginTop="5dp"
android:textAlignment="center"
android:textColor="@color/colorAccent"
android:text="FARMER AND AGRI STARTUP SUPPLY LINKAGE APPLICATION "
android:textSize="22sp"
/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/wvHelp"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="0dp"
android:layout_weight="0.3" >
<TextView
android:id="@+id/yourscoreg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:padding="20sp"
android:textColor="#FF9933"
android:textAlignment="center"
android:fontFamily="serif-monospace"
android:layout_centerInParent="true"
android:textStyle="bold"
android:layout_alignParentTop="true"
android:layout_marginTop="5dp"
android:text="CONNECTING KITCHEN TO FARM PRODUCE "
android:textSize="20sp"
/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/wvHelpj"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="0dp"
android:layout_weight="0.5" >
</RelativeLayout>
</LinearLayout>-->

View File

@@ -0,0 +1,97 @@
<?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="230dp"
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.smi.smartlab.FontAwesome
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="50dp"
android:text="&#xf2bd;"
android:padding="20dp"
android:layout_marginTop="30dp"
android:id="@+id/image"
android:textColor="@android:color/white"
></com.smi.smartlab.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/not_sign_in"
android:padding="10dp"
android:textColor="@android:color/white"
android:id="@+id/text"></TextView>
</RelativeLayout>
</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="&#xf2bd;"
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>-->

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:showIn="navigation">
<group android:checkableBehavior="single">
<item
android:id="@+id/nav_home"
android:title="Home" />
<item
android:id="@+id/nav_contact_us"
android:title="About" />
<item
android:id="@+id/nav_logout"
android:title="Logout" />
</group>
</menu>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,16 @@
<resources>
<dimen name="activity_vertical_margin">10.7dp</dimen>
<dimen name="padding_list_row">6.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">9.3sp</dimen>
<dimen name="timestamp">6.7sp</dimen>
<dimen name="small_text_size">8sp</dimen>
<dimen name="msg_text_primary">8sp</dimen>
<dimen name="msg_text_secondary">7.3sp</dimen>
<dimen name="heading_size">10.7sp</dimen>
<dimen name="default_text_size">9.3sp</dimen>
</resources>

View File

@@ -0,0 +1,16 @@
<resources>
<dimen name="activity_vertical_margin">10.7dp</dimen>
<dimen name="padding_list_row">6.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">9.3sp</dimen>
<dimen name="timestamp">6.7sp</dimen>
<dimen name="small_text_size">8sp</dimen>
<dimen name="msg_text_primary">8sp</dimen>
<dimen name="msg_text_secondary">7.3sp</dimen>
<dimen name="heading_size">10.7sp</dimen>
<dimen name="default_text_size">9.3sp</dimen>
</resources>

View File

@@ -0,0 +1,16 @@
<resources>
<dimen name="heading_size">16sp</dimen>
<dimen name="default_text_size">14sp</dimen>
<dimen name="small_text_size">12sp</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">10dp</dimen>
<dimen name="messages_padding_left">72dp</dimen>
<dimen name="icon_width_height">40dp</dimen>
<dimen name="msg_text_primary">12sp</dimen>
<dimen name="msg_text_secondary">11sp</dimen>
<dimen name="icon_star">25dp</dimen>
<dimen name="icon_text">14sp</dimen>
<dimen name="timestamp">10sp</dimen>
</resources>

View File

@@ -0,0 +1,16 @@
<resources>
<dimen name="activity_vertical_margin">21.3dp</dimen>
<dimen name="padding_list_row">13.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">18.7sp</dimen>
<dimen name="timestamp">13.3sp</dimen>
<dimen name="small_text_size">16sp</dimen>
<dimen name="msg_text_primary">16sp</dimen>
<dimen name="msg_text_secondary">14.7sp</dimen>
<dimen name="heading_size">21.3sp</dimen>
<dimen name="default_text_size">18.7sp</dimen>
</resources>

View File

@@ -0,0 +1,16 @@
<resources>
<dimen name="activity_vertical_margin">26.7dp</dimen>
<dimen name="padding_list_row">16.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">23.3sp</dimen>
<dimen name="timestamp">16.7sp</dimen>
<dimen name="small_text_size">20sp</dimen>
<dimen name="msg_text_primary">20sp</dimen>
<dimen name="msg_text_secondary">18.3sp</dimen>
<dimen name="heading_size">26.7sp</dimen>
<dimen name="default_text_size">23.3sp</dimen>
</resources>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">@android:color/holo_blue_dark</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>

View File

@@ -0,0 +1,16 @@
<resources>
<dimen name="heading_size">8.9sp</dimen>
<dimen name="default_text_size">7.8sp</dimen>
<dimen name="small_text_size">6.7sp</dimen>
<dimen name="activity_horizontal_margin">8.9dp</dimen>
<dimen name="activity_vertical_margin">8.9dp</dimen>
<dimen name="fab_margin">8.9dp</dimen>
<dimen name="padding_list_row">5.6dp</dimen>
<dimen name="messages_padding_left">40dp</dimen>
<dimen name="icon_width_height">22.2dp</dimen>
<dimen name="msg_text_primary">6.7sp</dimen>
<dimen name="msg_text_secondary">6.1sp</dimen>
<dimen name="icon_star">13.9dp</dimen>
<dimen name="icon_text">7.8sp</dimen>
<dimen name="timestamp">5.6sp</dimen>
</resources>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#F5F6F5</color>
</resources>

View File

@@ -0,0 +1,11 @@
<resources>
<string name="app_name">MITR Lab Sage</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>
<string name="mapbox_access_token">sk.eyJ1IjoiZGV2ZWxvcGVycmFtYSIsImEiOiJja3VtZmNzdTYxcXUzMnFuNjMxMm1zeWFoIn0.jB6ngpp89-xUKtdhNZvnnQ</string>
</resources>

View File

@@ -0,0 +1,13 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:textColorHint">#000</item>
<item name="android:editTextColor">#000</item>
</style>
</resources>

View File

@@ -0,0 +1,3 @@
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="external_files" path="."/>
</paths>

View File

@@ -0,0 +1,17 @@
package in.testright.smartlab_app23;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}