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
f6d0e972
Commit
f6d0e972
authored
Jul 06, 2021
by
Mahima Induvara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify the List item in Chatbot UI
parent
cf6e76cf
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
63 additions
and
26 deletions
+63
-26
app/src/main/java/chatbot/AdapterChatBot.kt
app/src/main/java/chatbot/AdapterChatBot.kt
+1
-1
app/src/main/java/chatbot/MainActivity.kt
app/src/main/java/chatbot/MainActivity.kt
+1
-1
app/src/main/res/drawable-v24/ba1.jpg
app/src/main/res/drawable-v24/ba1.jpg
+0
-0
app/src/main/res/drawable-v24/molecular.png
app/src/main/res/drawable-v24/molecular.png
+0
-0
app/src/main/res/drawable/ic_baseline_mic_24.xml
app/src/main/res/drawable/ic_baseline_mic_24.xml
+10
-0
app/src/main/res/drawable/ic_baseline_send_24.xml
app/src/main/res/drawable/ic_baseline_send_24.xml
+11
-0
app/src/main/res/layout/activity_chatbot_main.xml
app/src/main/res/layout/activity_chatbot_main.xml
+31
-13
app/src/main/res/layout/content_main.xml
app/src/main/res/layout/content_main.xml
+8
-10
app/src/main/res/layout/listitem_chat.xml
app/src/main/res/layout/listitem_chat.xml
+1
-1
No files found.
app/src/main/java/chatbot/AdapterChatBot.kt
View file @
f6d0e972
...
...
@@ -21,7 +21,7 @@ class AdapterChatBot : RecyclerView.Adapter<AdapterChatBot.MyViewHolder>() {
txtChat
.
setTextColor
(
Color
.
BLACK
)
txtChat
.
text
=
chat
.
chat
}
else
{
txtChat
.
setBackgroundColor
(
Color
.
GRAY
)
txtChat
.
setBackgroundColor
(
Color
.
YELLOW
)
txtChat
.
setTextColor
(
Color
.
BLACK
)
txtChat
.
text
=
chat
.
chat
}
...
...
app/src/main/java/chatbot/MainActivity.kt
View file @
f6d0e972
...
...
@@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() {
setContentView
(
R
.
layout
.
activity_chatbot_main
)
val
retrofit
=
Retrofit
.
Builder
()
.
baseUrl
(
"http://192.168.
1.100:5000
"
)
.
baseUrl
(
"http://192.168.
8.101:5000/
"
)
.
addConverterFactory
(
GsonConverterFactory
.
create
())
.
build
()
...
...
app/src/main/res/drawable-v24/ba1.jpg
0 → 100644
View file @
f6d0e972
963 KB
app/src/main/res/drawable-v24/molecular.png
0 → 100644
View file @
f6d0e972
41.2 KB
app/src/main/res/drawable/ic_baseline_mic_24.xml
0 → 100644
View file @
f6d0e972
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
android:tint=
"?attr/colorControlNormal"
>
<path
android:fillColor=
"@android:color/white"
android:pathData=
"M12,14c1.66,0 2.99,-1.34 2.99,-3L15,5c0,-1.66 -1.34,-3 -3,-3S9,3.34 9,5v6c0,1.66 1.34,3 3,3zM17.3,11c0,3 -2.54,5.1 -5.3,5.1S6.7,14 6.7,11L5,11c0,3.41 2.72,6.23 6,6.72L11,21h2v-3.28c3.28,-0.48 6,-3.3 6,-6.72h-1.7z"
/>
</vector>
app/src/main/res/drawable/ic_baseline_send_24.xml
0 → 100644
View file @
f6d0e972
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
android:tint=
"?attr/colorControlNormal"
android:autoMirrored=
"true"
>
<path
android:fillColor=
"@android:color/white"
android:pathData=
"M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z"
/>
</vector>
app/src/main/res/layout/activity_chatbot_main.xml
View file @
f6d0e972
...
...
@@ -5,39 +5,57 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
"chatbot.MainActivity"
>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rvChatList"
android:layout_width=
"
0
dp"
android:layout_height=
"
0
dp"
android:layout_width=
"
401
dp"
android:layout_height=
"
665
dp"
app:layout_constraintBottom_toTopOf=
"@+id/etChat"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"1.0"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.0"
/>
<EditText
android:id=
"@+id/etChat"
android:layout_width=
"
0
dp"
android:layout_height=
"
wrap_content
"
android:layout_width=
"
245
dp"
android:layout_height=
"
60dp
"
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_constraintHorizontal_bias=
"0.0"
app:layout_constraintStart_toStartOf=
"parent"
/>
<Button
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id=
"@+id/floatingActionButton2"
android:layout_width=
"56dp"
android:layout_height=
"56dp"
android:clickable=
"true"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.791"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.988"
app:srcCompat=
"@drawable/ic_baseline_mic_24"
/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
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"
android:clickable=
"true"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"@+id/etChat"
/>
app:layout_constraintHorizontal_bias=
"0.98"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.988"
app:srcCompat=
"@drawable/ic_baseline_send_24"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/content_main.xml
View file @
f6d0e972
...
...
@@ -27,8 +27,10 @@
android:layout_height=
"match_parent"
android:layout_alignParentLeft=
"true"
android:layout_alignParentTop=
"true"
>
android:layout_marginLeft=
"0dp"
android:layout_marginTop=
"3dp"
android:gravity=
"center"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"fill_parent"
...
...
@@ -107,8 +109,7 @@
android:layout_alignParentTop=
"true"
android:layout_marginTop=
"0dp"
android:background=
"@android:color/transparent"
/>
android:background=
"@android:color/transparent"
/>
</RelativeLayout>
...
...
@@ -153,8 +154,7 @@
android:layout_alignParentTop=
"true"
android:layout_marginTop=
"0dp"
android:background=
"@android:color/transparent"
/>
android:background=
"@android:color/transparent"
/>
</RelativeLayout>
...
...
@@ -209,8 +209,7 @@
android:layout_alignParentTop=
"true"
android:layout_marginTop=
"0dp"
android:background=
"@android:color/transparent"
/>
android:background=
"@android:color/transparent"
/>
</RelativeLayout>
...
...
@@ -256,8 +255,7 @@
android:layout_alignParentTop=
"true"
android:layout_marginTop=
"0dp"
android:background=
"@android:color/transparent"
/>
android:background=
"@android:color/transparent"
/>
</RelativeLayout>
...
...
app/src/main/res/layout/listitem_chat.xml
View file @
f6d0e972
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"
5
0dp"
android:layout_height=
"
6
0dp"
android:layout_gravity=
"end"
android:layout_margin=
"5dp"
android:elevation=
"8dp"
...
...
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