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
82dbd007
Commit
82dbd007
authored
Jun 30, 2021
by
Mahima Induvara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added API Dependencies
parent
a88f5eaf
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
53 additions
and
30 deletions
+53
-30
app/build.gradle
app/build.gradle
+6
-0
app/src/main/AndroidManifest.xml
app/src/main/AndroidManifest.xml
+1
-1
app/src/main/java/com/example/archemistrylab/MainActivity.java
...rc/main/java/com/example/archemistrylab/MainActivity.java
+0
-17
app/src/main/java/com/example/archemistrylab/ui/home/HomeViewModel.java
...ava/com/example/archemistrylab/ui/home/HomeViewModel.java
+1
-1
app/src/main/python/myscript.py
app/src/main/python/myscript.py
+0
-2
app/src/main/res/layout/content_main.xml
app/src/main/res/layout/content_main.xml
+45
-9
No files found.
app/build.gradle
View file @
82dbd007
...
@@ -50,6 +50,12 @@ dependencies {
...
@@ -50,6 +50,12 @@ dependencies {
implementation
'androidx.appcompat:appcompat:1.2.0'
implementation
'androidx.appcompat:appcompat:1.2.0'
implementation
'com.google.android.material:material:1.3.0'
implementation
'com.google.android.material:material:1.3.0'
implementation
'androidx.constraintlayout:constraintlayout:2.0.4'
implementation
'androidx.constraintlayout:constraintlayout:2.0.4'
//retrofit
implementation
'com.squareup.retrofit2:retrofit:2.9.0'
implementation
'com.squareup.retrofit2:converter-gson:2.9.0'
implementation
'androidx.navigation:navigation-fragment:2.3.5'
implementation
'androidx.navigation:navigation-fragment:2.3.5'
implementation
'androidx.navigation:navigation-ui:2.3.5'
implementation
'androidx.navigation:navigation-ui:2.3.5'
implementation
'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
implementation
'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
...
...
app/src/main/AndroidManifest.xml
View file @
82dbd007
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.example.archemistrylab"
>
package=
"com.example.archemistrylab"
>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<application
<application
android:allowBackup=
"true"
android:allowBackup=
"true"
android:icon=
"@mipmap/ic_launcher"
android:icon=
"@mipmap/ic_launcher"
...
...
app/src/main/java/com/example/archemistrylab/MainActivity.java
View file @
82dbd007
...
@@ -17,10 +17,6 @@ import androidx.drawerlayout.widget.DrawerLayout;
...
@@ -17,10 +17,6 @@ import androidx.drawerlayout.widget.DrawerLayout;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.appcompat.widget.Toolbar
;
import
androidx.appcompat.widget.Toolbar
;
import
com.chaquo.python.PyObject
;
import
com.chaquo.python.Python
;
import
com.chaquo.python.android.AndroidPlatform
;
public
class
MainActivity
extends
AppCompatActivity
{
public
class
MainActivity
extends
AppCompatActivity
{
private
AppBarConfiguration
mAppBarConfiguration
;
private
AppBarConfiguration
mAppBarConfiguration
;
...
@@ -33,19 +29,6 @@ public class MainActivity extends AppCompatActivity {
...
@@ -33,19 +29,6 @@ public class MainActivity extends AppCompatActivity {
Toolbar
toolbar
=
findViewById
(
R
.
id
.
toolbar
);
Toolbar
toolbar
=
findViewById
(
R
.
id
.
toolbar
);
setSupportActionBar
(
toolbar
);
setSupportActionBar
(
toolbar
);
FloatingActionButton
fab
=
findViewById
(
R
.
id
.
fab
);
FloatingActionButton
fab
=
findViewById
(
R
.
id
.
fab
);
textView
=
(
TextView
)
findViewById
(
R
.
id
.
textview
);
if
(!
Python
.
isStarted
())
{
Python
.
start
(
new
AndroidPlatform
(
this
));
}
Python
py
=
Python
.
getInstance
();
PyObject
pyobj
=
py
.
getModule
(
"myscript"
);
PyObject
obj
=
pyobj
.
callAttr
(
"main"
);
textView
.
setText
(
obj
.
toString
());
fab
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
fab
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
...
...
app/src/main/java/com/example/archemistrylab/ui/home/HomeViewModel.java
View file @
82dbd007
...
@@ -10,7 +10,7 @@ public class HomeViewModel extends ViewModel {
...
@@ -10,7 +10,7 @@ public class HomeViewModel extends ViewModel {
public
HomeViewModel
()
{
public
HomeViewModel
()
{
mText
=
new
MutableLiveData
<>();
mText
=
new
MutableLiveData
<>();
mText
.
setValue
(
"This is home fragment"
);
//
mText.setValue("This is home fragment");
}
}
public
LiveData
<
String
>
getText
()
{
public
LiveData
<
String
>
getText
()
{
...
...
app/src/main/python/myscript.py
View file @
82dbd007
def
main
():
return
"Hello World!!!!! "
app/src/main/res/layout/content_main.xml
View file @
82dbd007
...
@@ -5,28 +5,64 @@
...
@@ -5,28 +5,64 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
tools:context=
".MainActivity"
>
tools:context=
".MainActivity"
>
<![CDATA[
tools:showIn="@layout/app_bar_main">
tools:showIn="@layout/app_bar_main">
<TextView
android:id=
"@+id/textview"
android:layout_width=
"270dp"
android:layout_height=
"59dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
]]>
<fragment
<fragment
android:id=
"@+id/nav_host_fragment"
android:id=
"@+id/nav_host_fragment"
android:name=
"androidx.navigation.fragment.NavHostFragment"
android:name=
"androidx.navigation.fragment.NavHostFragment"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:textAlignment=
"inherit"
app:defaultNavHost=
"true"
app:defaultNavHost=
"true"
app:layout_constraintHorizontal_bias=
"0.0"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:navGraph=
"@navigation/mobile_navigation"
/>
app:navGraph=
"@navigation/mobile_navigation"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rvChatList"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
app:layout_constraintBottom_toTopOf=
"@+id/etChat"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<EditText
android:id=
"@+id/etChat"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginLeft=
"16dp"
android:layout_marginEnd=
"8dp"
android:layout_marginRight=
"8dp"
android:ems=
"10"
android:hint=
"Chat with bot"
android:inputType=
"textPersonName"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toStartOf=
"@+id/btnSend"
app:layout_constraintStart_toStartOf=
"parent"
/>
<Button
android:id=
"@+id/btnSend"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"16dp"
android:layout_marginRight=
"16dp"
android:text=
"Send"
app:layout_constraintBottom_toBottomOf=
"@+id/etChat"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"@+id/etChat"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
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