Skip to content
Snippets Groups Projects
Commit 8b1e7c51 authored by Ilham Firdausi Putra's avatar Ilham Firdausi Putra
Browse files

add bottom edit text and button for bot chat

parent 32af7916
Branches
No related merge requests found
......@@ -117,52 +117,52 @@ public class HomeFragment extends Fragment {
));
chatLists.add(new ChatList(
R.drawable.priagung,
"Priagung Satyagama",
"Priagung Satyagama2",
"Woi sini ke sekre 2 temani diriku yang kesepian"
));
chatLists.add(new ChatList(
R.drawable.rama,
"Yusuf Rahmat Pratama",
"Yusuf Rahmat Pratama2",
"Eh, gmn gmn?"
));
chatLists.add(new ChatList(
R.drawable.priagung,
"Priagung Satyagama",
"Priagung Satyagama3",
"Woi sini ke sekre 2 temani diriku yang kesepian"
));
chatLists.add(new ChatList(
R.drawable.rama,
"Yusuf Rahmat Pratama",
"Yusuf Rahmat Pratama3",
"Eh, gmn gmn?"
));
chatLists.add(new ChatList(
R.drawable.priagung,
"Priagung Satyagama",
"Priagung Satyagama4",
"Woi sini ke sekre 2 temani diriku yang kesepian"
));
chatLists.add(new ChatList(
R.drawable.rama,
"Yusuf Rahmat Pratama",
"Yusuf Rahmat Pratama4",
"Eh, gmn gmn?"
));
chatLists.add(new ChatList(
R.drawable.priagung,
"Priagung Satyagama",
"Priagung Satyagama5",
"Woi sini ke sekre 2 temani diriku yang kesepian"
));
chatLists.add(new ChatList(
R.drawable.rama,
"Yusuf Rahmat Pratama",
"Yusuf Rahmat Pratama5",
"Eh, gmn gmn?"
));
chatLists.add(new ChatList(
R.drawable.priagung,
"Priagung Satyagama",
"Priagung Satyagama6",
"Woi sini ke sekre 2 temani diriku yang kesepian"
));
chatLists.add(new ChatList(
R.drawable.rama,
"Yusuf Rahmat Pratama",
"Yusuf Rahmat Pratama6",
"Eh, gmn gmn?"
));
return chatLists;
......
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/right_arrow_clicked"
android:state_focused="true"
android:state_pressed="true"/>
<item
android:drawable="@drawable/right_arrow_clicked"
android:state_focused="false"
android:state_pressed="true"/>
<item
android:drawable="@drawable/right_arrow_idle"
android:state_focused="true"
android:state_pressed="false"/>
<item
android:drawable="@drawable/right_arrow_idle"
android:state_focused="false"
android:state_pressed="false"/>
</selector>
\ No newline at end of file
android/app/src/main/res/drawable/right_arrow_clicked.png

3.97 KiB

android/app/src/main/res/drawable/right_arrow_idle.png

4.21 KiB

android/app/src/main/res/drawable/send.png

12.7 KiB

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.constraint.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="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".BotFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
<android.support.v7.widget.RecyclerView
android:id="@+id/chat_bot_room_rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Bot fragment" />
android:layout_marginBottom="56dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
</FrameLayout>
\ No newline at end of file
</android.support.v7.widget.RecyclerView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="56dp"
app:layout_constraintTop_toBottomOf="@id/chat_bot_room_rv"
android:orientation="horizontal">
<EditText
android:id="@+id/chat_bot_room_et"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:minHeight="56dp"
android:layout_weight="9"
android:hint="@string/message"
android:inputType="textCapSentences|textMultiLine"
android:maxLines ="4"
android:maxLength ="2000"
android:scrollHorizontally="false"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2">
<ImageButton
android:id="@+id/chat_bot_room_send"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitCenter"
android:clickable="true"
android:focusable="true"
android:background="@drawable/my_custom_selector"
android:contentDescription="@string/send_message_button"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"/>
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
......@@ -25,5 +25,7 @@
<string name="navigation_profile">Profile</string>
<string name="navigation_home">Home</string>
<string name="navigation_bot">Bot</string>
<string name="send_message_button">Send message button</string>
<string name="message">Message</string>
</resources>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment