Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Augmented Reality Chemistry Laboratory
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2021-189
Augmented Reality Chemistry Laboratory
Commits
84e1ab35
Commit
84e1ab35
authored
Nov 24, 2021
by
Mahima Induvara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inteface Changed!
parent
e94295ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
12 deletions
+15
-12
app/src/main/java/chatbot/MainActivity.kt
app/src/main/java/chatbot/MainActivity.kt
+1
-1
app/src/main/java/com/example/archemistrylab/MainActivity.java
...rc/main/java/com/example/archemistrylab/MainActivity.java
+10
-7
app/src/main/res/layout/content_main.xml
app/src/main/res/layout/content_main.xml
+4
-4
No files found.
app/src/main/java/chatbot/MainActivity.kt
View file @
84e1ab35
...
@@ -30,7 +30,7 @@ class MainActivity : AppCompatActivity() {
...
@@ -30,7 +30,7 @@ class MainActivity : AppCompatActivity() {
setContentView
(
R
.
layout
.
activity_chatbot_main
)
setContentView
(
R
.
layout
.
activity_chatbot_main
)
val
retrofit
=
Retrofit
.
Builder
()
val
retrofit
=
Retrofit
.
Builder
()
.
baseUrl
(
"http://192.168.1.
101
:5000/"
)
.
baseUrl
(
"http://192.168.1.
4
:5000/"
)
.
addConverterFactory
(
GsonConverterFactory
.
create
())
.
addConverterFactory
(
GsonConverterFactory
.
create
())
.
build
()
.
build
()
...
...
app/src/main/java/com/example/archemistrylab/MainActivity.java
View file @
84e1ab35
...
@@ -57,6 +57,13 @@ public class MainActivity extends AppCompatActivity {
...
@@ -57,6 +57,13 @@ public class MainActivity extends AppCompatActivity {
NavigationUI
.
setupActionBarWithNavController
(
this
,
navController
,
mAppBarConfiguration
);
NavigationUI
.
setupActionBarWithNavController
(
this
,
navController
,
mAppBarConfiguration
);
NavigationUI
.
setupWithNavController
(
navigationView
,
navController
);
NavigationUI
.
setupWithNavController
(
navigationView
,
navController
);
}
}
private
void
logout
()
{
FirebaseAuth
.
getInstance
().
signOut
();
Intent
intent
=
new
Intent
(
MainActivity
.
this
,
LoginActivity
.
class
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
|
Intent
.
FLAG_ACTIVITY_CLEAR_TASK
);
startActivity
(
intent
);
finish
();
}
@Override
@Override
public
void
onBackPressed
()
{
public
void
onBackPressed
()
{
DrawerLayout
drawer
=
findViewById
(
R
.
id
.
drawer_layout
);
DrawerLayout
drawer
=
findViewById
(
R
.
id
.
drawer_layout
);
...
@@ -70,6 +77,8 @@ public class MainActivity extends AppCompatActivity {
...
@@ -70,6 +77,8 @@ public class MainActivity extends AppCompatActivity {
@Override
@Override
public
void
onClick
(
DialogInterface
dialogInterface
,
int
i
)
{
public
void
onClick
(
DialogInterface
dialogInterface
,
int
i
)
{
finish
();
finish
();
logout
();
}
}
});
});
builder
.
setPositiveButton
(
"Cancle"
,
new
DialogInterface
.
OnClickListener
()
{
builder
.
setPositiveButton
(
"Cancle"
,
new
DialogInterface
.
OnClickListener
()
{
...
@@ -82,13 +91,7 @@ public class MainActivity extends AppCompatActivity {
...
@@ -82,13 +91,7 @@ public class MainActivity extends AppCompatActivity {
alrt
.
show
();
alrt
.
show
();
}
}
}
}
private
void
logout
()
{
FirebaseAuth
.
getInstance
().
signOut
();
Intent
intent
=
new
Intent
(
MainActivity
.
this
,
LoginActivity
.
class
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
|
Intent
.
FLAG_ACTIVITY_CLEAR_TASK
);
startActivity
(
intent
);
finish
();
}
@Override
@Override
public
boolean
onOptionsItemSelected
(
MenuItem
item
)
{
public
boolean
onOptionsItemSelected
(
MenuItem
item
)
{
...
...
app/src/main/res/layout/content_main.xml
View file @
84e1ab35
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"10dp"
android:layout_marginTop=
"10dp"
android:layout_marginBottom=
"10dp"
android:layout_marginBottom=
"10dp"
android:text=
"B
rowse
"
android:text=
"B
ROWSE
"
android:textSize=
"16dp"
/>
android:textSize=
"16dp"
/>
<Button
<Button
...
@@ -145,7 +145,7 @@
...
@@ -145,7 +145,7 @@
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"10dp"
android:layout_marginTop=
"10dp"
android:layout_marginBottom=
"10dp"
android:layout_marginBottom=
"10dp"
android:text=
"
User
"
android:text=
"
PRACTICAL
"
android:textSize=
"16dp"
/>
android:textSize=
"16dp"
/>
<Button
<Button
...
@@ -200,7 +200,7 @@
...
@@ -200,7 +200,7 @@
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"10dp"
android:layout_marginTop=
"10dp"
android:layout_marginBottom=
"10dp"
android:layout_marginBottom=
"10dp"
android:text=
"D
ocuments
"
android:text=
"D
OCUMENTS
"
android:textSize=
"16dp"
/>
android:textSize=
"16dp"
/>
<Button
<Button
...
@@ -245,7 +245,7 @@
...
@@ -245,7 +245,7 @@
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"10dp"
android:layout_marginTop=
"10dp"
android:layout_marginBottom=
"10dp"
android:layout_marginBottom=
"10dp"
android:text=
"
Settings
"
android:text=
"
CALCULATOR
"
android:textSize=
"16dp"
/>
android:textSize=
"16dp"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment