Skip to content

Commit

Permalink
Added About Page
Browse files Browse the repository at this point in the history
  • Loading branch information
PrinceSumberia committed Jun 28, 2019
1 parent 901cf40 commit a3bdc08
Show file tree
Hide file tree
Showing 8 changed files with 170 additions and 35 deletions.
6 changes: 1 addition & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,13 @@ dependencies {
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'







androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0-alpha4', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation files('src/main/libs/activation.jar')
implementation files('src/main/libs/additionnal.jar')
implementation files('src/main/libs/mail.jar')
androidTestImplementation 'androidx.test:rules:1.2.0-alpha05'

}
apply plugin: 'com.google.gms.google-services'
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
android:roundIcon="@mipmap/ic_launcher_custom"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".AssetValueGraph"></activity>
<activity android:name=".AboutUs"></activity>
<activity android:name=".AssetValueGraph" />
<activity android:name=".IssuedAssets" />
<activity android:name=".IssueAssets" />
<!--
Expand Down
57 changes: 57 additions & 0 deletions app/src/main/java/com/prince/assetManagement/AboutUs.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package com.prince.assetManagement;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;

public class AboutUs extends AppCompatActivity {
Button features, credits;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about_us);
features = findViewById(R.id.features);
credits = findViewById(R.id.credits);

features.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
new AlertDialog.Builder(AboutUs.this)
.setTitle("Features")
.setMessage("iAsset is a low-cost solution which works on low-cost devices. It automatically recognizes and categorizes assets using artificial intelligence, thus saving time. With iAsset, adding an asset to an organizations’ inventory takes less than a minute.\n\n" + "Features:\n" +
"•\tAutomatic Object Detection\n" +
"•\tAssigned Asset-User Security Scheme. \t\n" +
"•\tDynamic Bulk QR Code Generation\n" +
"•\tAuto Generation & Assignment of IDs.\n" +
"•\tBulk Geotag Assets using GPS.\n" +
"•\tRequesting and Reporting Asset.\n" +
"•\tAnalytics\n" +
"•\tData Security & User Authentication\n")
.setNegativeButton("Close", null)
.show();
}
});

credits.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
new AlertDialog.Builder(AboutUs.this)
.setTitle("Credits")
.setMessage("•\tProf. Ankur Gupta, Director MIET\n" +
"•\tDr. Sahil Sawhney\n" +
"•\tAsst. Prof. Rishi Gupta\n" +
"•\tAsst. Prof. Purnendu Parbhat\n" +
"•\tPrince Sumberia, Developer\n" +
"•\tRayees Ahmed, Developer\n" +
"•\tAvinash Sharma, Developer\n")
.setNegativeButton("Close", null)
.show();

}
});
}
}
41 changes: 27 additions & 14 deletions app/src/main/java/com/prince/assetManagement/WelcomeActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.ColorInt;
import androidx.annotation.ColorRes;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.drawerlayout.widget.DrawerLayout;

import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
Expand All @@ -43,15 +52,6 @@
import java.io.IOException;
import java.util.UUID;

import androidx.annotation.ColorInt;
import androidx.annotation.ColorRes;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.drawerlayout.widget.DrawerLayout;


public class WelcomeActivity extends AppCompatActivity implements AdapterView.OnItemClickListener {
private static final String TAG = "WelcomeActivity";
Expand Down Expand Up @@ -80,12 +80,12 @@ public class WelcomeActivity extends AppCompatActivity implements AdapterView.On
R.drawable.ic_wrench,
R.drawable.ic_notification,
R.drawable.ic_delete,
R.drawable.ic_help,
R.drawable.ic_info,
R.drawable.ic_sent,
};

String[] txt = {"Add Asset", "Scan Asset", "Search Asset", "Issue Assets", "Add Users", "Reported Assets", "Asset Requests",
"Delete Assets", "Help", "Sign Out"};
"Delete Assets", "About", "Sign Out"};

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down Expand Up @@ -201,9 +201,9 @@ public void onComplete(@NonNull Task<DocumentSnapshot> task) {
}
break;
case 8:
Toast.makeText(WelcomeActivity.this, "Ready to help", Toast.LENGTH_SHORT).show();
// Intent intent2 = new Intent(getApplicationContext(), MapActivity.class);
// startActivity(intent2);
// Toast.makeText(WelcomeActivity.this, "About", Toast.LENGTH_SHORT).show();
Intent intent2 = new Intent(getApplicationContext(), AboutUs.class);
startActivity(intent2);
break;
case 9:
FirebaseAuth.getInstance().signOut();
Expand Down Expand Up @@ -330,6 +330,19 @@ public void onDrawerOpened(View drawerView) {
public boolean onNavigationItemSelected(final MenuItem item) {
Toast.makeText(getApplicationContext(), item.getTitle() + " Selected", Toast.LENGTH_SHORT).show();
// actionBar.setTitle(item.getTitle());
if (item.getTitle().equals("About")) {
Intent intent = new Intent(getApplicationContext(), AboutUs.class);
startActivity(intent);
} else if (item.getTitle().equals("Logout")) {
FirebaseAuth.getInstance().signOut();
Toast.makeText(WelcomeActivity.this, "Successfully Logged You Out", Toast.LENGTH_SHORT).show();
Intent intent = new Intent(getApplicationContext(), StartActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP |
Intent.FLAG_ACTIVITY_CLEAR_TASK |
Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
finish();
}
drawer.closeDrawers();
return true;
}
Expand Down
15 changes: 15 additions & 0 deletions app/src/main/res/drawable/ic_info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<vector android:height="24dp"
android:viewportHeight="496.158"
android:viewportWidth="496.158"
android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillColor="#25B7D3"
android:pathData="M496.158,248.085c0,-137.022 -111.069,-248.082 -248.075,-248.082C111.07,0.003 0,111.063 0,248.085c0,137.001 111.07,248.07 248.083,248.07C385.089,496.155 496.158,385.086 496.158,248.085z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M315.249,359.555c-1.387,-2.032 -4.048,-2.755 -6.27,-1.702c-24.582,11.637 -52.482,23.94 -57.958,25.015c-0.138,-0.123 -0.357,-0.348 -0.644,-0.737c-0.742,-1.005 -1.103,-2.318 -1.103,-4.015c0,-13.905 10.495,-56.205 31.192,-125.719c17.451,-58.406 19.469,-70.499 19.469,-74.514c0,-6.198 -2.373,-11.435 -6.865,-15.146c-4.267,-3.519 -10.229,-5.302 -17.719,-5.302c-12.459,0 -26.899,4.73 -44.146,14.461c-16.713,9.433 -35.352,25.41 -55.396,47.487c-1.569,1.729 -1.733,4.314 -0.395,6.228c1.34,1.915 3.825,2.644 5.986,1.764c7.037,-2.872 42.402,-17.359 47.557,-20.597c4.221,-2.646 7.875,-3.989 10.861,-3.989c0.107,0 0.199,0.004 0.276,0.01c0.036,0.198 0.07,0.5 0.07,0.933c0,3.047 -0.627,6.654 -1.856,10.703c-30.136,97.641 -44.785,157.498 -44.785,182.994c0,8.998 2.501,16.242 7.432,21.528c5.025,5.393 11.803,8.127 20.146,8.127c8.891,0 19.712,-3.714 33.08,-11.354c12.936,-7.392 32.68,-23.653 60.363,-49.717C316.337,364.326 316.636,361.587 315.249,359.555z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M314.282,76.672c-4.925,-5.041 -11.227,-7.597 -18.729,-7.597c-9.34,0 -17.475,3.691 -24.176,10.971c-6.594,7.16 -9.938,15.946 -9.938,26.113c0,8.033 2.463,14.69 7.32,19.785c4.922,5.172 11.139,7.794 18.476,7.794c8.958,0 17.049,-3.898 24.047,-11.586c6.876,-7.553 10.363,-16.433 10.363,-26.393C321.646,88.105 319.169,81.684 314.282,76.672z" />
</vector>
65 changes: 65 additions & 0 deletions app/src/main/res/layout/activity_about_us.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
tools:context=".AboutUs">

<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:layout_marginBottom="15dp"
android:src="@drawable/ic_employee"
android:tint="@color/blue_grey_800" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:text="iAsset"
android:textAlignment="center"
android:textStyle="bold"
android:textSize="26sp" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Intelligent Asset Management"
android:textAlignment="center"
android:textSize="20sp" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="20dp"
android:text="Version: 1.0"
android:textAlignment="center"
android:textSize="15sp" />

<Button
android:id="@+id/features"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Features" />

<Button
android:id="@+id/credits"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Credits" />

<TextView
android:layout_marginTop="50dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Copyright 2019, CRIE, M.I.E.T " />


</LinearLayout>
16 changes: 2 additions & 14 deletions app/src/main/res/menu/menu_navigation_drawer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,15 @@
<item
android:id="@+id/nav_trending"
android:icon="@drawable/ic_menu"
android:title="Trending" />
<item
android:id="@+id/nav_latest"
android:icon="@drawable/ic_menu"
android:title="Latest" />
<item
android:id="@+id/nav_highlight"
android:icon="@drawable/ic_menu"
android:title="Highlight" />
android:title="About" />
</group>
<group
android:id="@+id/grp_2"
android:checkableBehavior="none">
<item
android:id="@+id/nav_settings"
android:icon="@drawable/ic_menu"
android:title="Settings" />
<item
android:id="@+id/nav_help"
android:icon="@drawable/ic_menu"
android:title="Help" />
android:title="Logout" />
</group>

</menu>
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'org.apache.httpcomponents:httpclient:4.5.5'
classpath 'com.google.gms:google-services:4.2.0'

Expand Down

0 comments on commit a3bdc08

Please sign in to comment.