diff --git a/android/app/src/main/java/com/chatman/HomeFragment.java b/android/app/src/main/java/com/chatman/HomeFragment.java index 3eeacaa808afc82741dbea66d720ed539a4508e1..9a773b70643c288146a1ecdd3636c79978e770d9 100644 --- a/android/app/src/main/java/com/chatman/HomeFragment.java +++ b/android/app/src/main/java/com/chatman/HomeFragment.java @@ -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; diff --git a/android/app/src/main/res/drawable/my_custom_selector.xml b/android/app/src/main/res/drawable/my_custom_selector.xml new file mode 100644 index 0000000000000000000000000000000000000000..fb9a45081ad4ccc27ea56eae55cf20c007c888d1 --- /dev/null +++ b/android/app/src/main/res/drawable/my_custom_selector.xml @@ -0,0 +1,19 @@ +<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 diff --git a/android/app/src/main/res/drawable/right_arrow_clicked.png b/android/app/src/main/res/drawable/right_arrow_clicked.png new file mode 100644 index 0000000000000000000000000000000000000000..b6c90cfe73e4697610432c7eea6bc3033cc2b61b Binary files /dev/null and b/android/app/src/main/res/drawable/right_arrow_clicked.png differ diff --git a/android/app/src/main/res/drawable/right_arrow_idle.png b/android/app/src/main/res/drawable/right_arrow_idle.png new file mode 100644 index 0000000000000000000000000000000000000000..8fcb4a462a013e1a1f054c1b99b280e4edbbee2b Binary files /dev/null and b/android/app/src/main/res/drawable/right_arrow_idle.png differ diff --git a/android/app/src/main/res/drawable/send.png b/android/app/src/main/res/drawable/send.png new file mode 100644 index 0000000000000000000000000000000000000000..32a338e01b3f19ff86d8d91c5f05ca2d90a8ce8b Binary files /dev/null and b/android/app/src/main/res/drawable/send.png differ diff --git a/android/app/src/main/res/layout/fragment_bot.xml b/android/app/src/main/res/layout/fragment_bot.xml index d530ae6f203fd6e89b42678291a1ad5e48838968..a9d3cdbbde765239a4d43710c87b45445b8c200f 100644 --- a/android/app/src/main/res/layout/fragment_bot.xml +++ b/android/app/src/main/res/layout/fragment_bot.xml @@ -1,14 +1,63 @@ <?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 diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index 230ae7a8b40e2fb571758dcb1488870a2d57f4af..f3822ce99eeb8807ad9ef13c29cd789cd86fc83c 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -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>