diff --git a/android/app/src/main/res/drawable-hdpi/ic_attach_file_black_24dp.png b/android/app/src/main/res/drawable-hdpi/ic_attach_file_black_24dp.png
new file mode 100644
index 0000000..af04153
Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/ic_attach_file_black_24dp.png differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_attach_file_white_24dp.png b/android/app/src/main/res/drawable-hdpi/ic_attach_file_white_24dp.png
new file mode 100644
index 0000000..29dfa5d
Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/ic_attach_file_white_24dp.png differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_insert_emoticon_black_24dp.png b/android/app/src/main/res/drawable-hdpi/ic_insert_emoticon_black_24dp.png
new file mode 100644
index 0000000..3df3dbf
Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/ic_insert_emoticon_black_24dp.png differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_insert_emoticon_white_24dp.png b/android/app/src/main/res/drawable-hdpi/ic_insert_emoticon_white_24dp.png
new file mode 100644
index 0000000..11d4e65
Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/ic_insert_emoticon_white_24dp.png differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_keyboard_black_24dp.png b/android/app/src/main/res/drawable-hdpi/ic_keyboard_black_24dp.png
new file mode 100644
index 0000000..d14e9de
Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/ic_keyboard_black_24dp.png differ
diff --git a/android/app/src/main/res/drawable-hdpi/ic_keyboard_white_24dp.png b/android/app/src/main/res/drawable-hdpi/ic_keyboard_white_24dp.png
new file mode 100644
index 0000000..5352d4c
Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/ic_keyboard_white_24dp.png differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_attach_file_black_24dp.png b/android/app/src/main/res/drawable-mdpi/ic_attach_file_black_24dp.png
new file mode 100644
index 0000000..40d81af
Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/ic_attach_file_black_24dp.png differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_attach_file_white_24dp.png b/android/app/src/main/res/drawable-mdpi/ic_attach_file_white_24dp.png
new file mode 100644
index 0000000..ac433ef
Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/ic_attach_file_white_24dp.png differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_insert_emoticon_black_24dp.png b/android/app/src/main/res/drawable-mdpi/ic_insert_emoticon_black_24dp.png
new file mode 100644
index 0000000..a38069b
Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/ic_insert_emoticon_black_24dp.png differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_insert_emoticon_white_24dp.png b/android/app/src/main/res/drawable-mdpi/ic_insert_emoticon_white_24dp.png
new file mode 100644
index 0000000..e6cc505
Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/ic_insert_emoticon_white_24dp.png differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_keyboard_black_24dp.png b/android/app/src/main/res/drawable-mdpi/ic_keyboard_black_24dp.png
new file mode 100644
index 0000000..f84c6b3
Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/ic_keyboard_black_24dp.png differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_keyboard_white_24dp.png b/android/app/src/main/res/drawable-mdpi/ic_keyboard_white_24dp.png
new file mode 100644
index 0000000..e8c24c7
Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/ic_keyboard_white_24dp.png differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_attach_file_black_24dp.png b/android/app/src/main/res/drawable-xhdpi/ic_attach_file_black_24dp.png
new file mode 100644
index 0000000..30ac6f9
Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/ic_attach_file_black_24dp.png differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_attach_file_white_24dp.png b/android/app/src/main/res/drawable-xhdpi/ic_attach_file_white_24dp.png
new file mode 100644
index 0000000..c3ff2bd
Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/ic_attach_file_white_24dp.png differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_insert_emoticon_black_24dp.png b/android/app/src/main/res/drawable-xhdpi/ic_insert_emoticon_black_24dp.png
new file mode 100644
index 0000000..abd5e97
Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/ic_insert_emoticon_black_24dp.png differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_insert_emoticon_white_24dp.png b/android/app/src/main/res/drawable-xhdpi/ic_insert_emoticon_white_24dp.png
new file mode 100644
index 0000000..c97abc4
Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/ic_insert_emoticon_white_24dp.png differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_keyboard_black_24dp.png b/android/app/src/main/res/drawable-xhdpi/ic_keyboard_black_24dp.png
new file mode 100644
index 0000000..752f007
Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/ic_keyboard_black_24dp.png differ
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_keyboard_white_24dp.png b/android/app/src/main/res/drawable-xhdpi/ic_keyboard_white_24dp.png
new file mode 100644
index 0000000..2b6b9b4
Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/ic_keyboard_white_24dp.png differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_attach_file_black_24dp.png b/android/app/src/main/res/drawable-xxhdpi/ic_attach_file_black_24dp.png
new file mode 100644
index 0000000..d8e2bd9
Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/ic_attach_file_black_24dp.png differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_attach_file_white_24dp.png b/android/app/src/main/res/drawable-xxhdpi/ic_attach_file_white_24dp.png
new file mode 100644
index 0000000..7091eca
Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/ic_attach_file_white_24dp.png differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_insert_emoticon_black_24dp.png b/android/app/src/main/res/drawable-xxhdpi/ic_insert_emoticon_black_24dp.png
new file mode 100644
index 0000000..b38942b
Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/ic_insert_emoticon_black_24dp.png differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_insert_emoticon_white_24dp.png b/android/app/src/main/res/drawable-xxhdpi/ic_insert_emoticon_white_24dp.png
new file mode 100644
index 0000000..4bfd751
Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/ic_insert_emoticon_white_24dp.png differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_keyboard_black_24dp.png b/android/app/src/main/res/drawable-xxhdpi/ic_keyboard_black_24dp.png
new file mode 100644
index 0000000..daf2da7
Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/ic_keyboard_black_24dp.png differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_keyboard_white_24dp.png b/android/app/src/main/res/drawable-xxhdpi/ic_keyboard_white_24dp.png
new file mode 100644
index 0000000..9d0bed2
Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/ic_keyboard_white_24dp.png differ
diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_attach_file_black_24dp.png b/android/app/src/main/res/drawable-xxxhdpi/ic_attach_file_black_24dp.png
new file mode 100644
index 0000000..620226d
Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/ic_attach_file_black_24dp.png differ
diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_attach_file_white_24dp.png b/android/app/src/main/res/drawable-xxxhdpi/ic_attach_file_white_24dp.png
new file mode 100644
index 0000000..771425c
Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/ic_attach_file_white_24dp.png differ
diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_insert_emoticon_black_24dp.png b/android/app/src/main/res/drawable-xxxhdpi/ic_insert_emoticon_black_24dp.png
new file mode 100644
index 0000000..0b7d14a
Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/ic_insert_emoticon_black_24dp.png differ
diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_insert_emoticon_white_24dp.png b/android/app/src/main/res/drawable-xxxhdpi/ic_insert_emoticon_white_24dp.png
new file mode 100644
index 0000000..319a13a
Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/ic_insert_emoticon_white_24dp.png differ
diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_keyboard_black_24dp.png b/android/app/src/main/res/drawable-xxxhdpi/ic_keyboard_black_24dp.png
new file mode 100644
index 0000000..ba4d5be
Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/ic_keyboard_black_24dp.png differ
diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_keyboard_white_24dp.png b/android/app/src/main/res/drawable-xxxhdpi/ic_keyboard_white_24dp.png
new file mode 100644
index 0000000..f77d9d2
Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/ic_keyboard_white_24dp.png differ
diff --git a/app/components/Room/SendMessageField.js b/app/components/Room/SendMessageField.js
index 1cb7783..c259c96 100644
--- a/app/components/Room/SendMessageField.js
+++ b/app/components/Room/SendMessageField.js
@@ -14,7 +14,7 @@ export default class SendMessageField extends Component {
this.handleChangeText = this.handleChangeText.bind(this)
this.state = {
- height: 56,
+ height: 46,
value: ''
}
}
@@ -34,7 +34,7 @@ export default class SendMessageField extends Component {
// }
handleChangeSize(e) {
- this.setState({height: e.nativeEvent.layout.height + 30})
+ this.setState({height: e.nativeEvent.layout.height})
}
handleChangeText(value) {
@@ -57,18 +57,19 @@ export default class SendMessageField extends Component {
return
}
onSending()
- this.setState({height: 56, value: ''})
+ this.setState({height: 46, value: ''})
}
render() {
const {value, height} = this.state
+ const {emojis, onRightAddIconPress} = this.props
return (
90 ? 90 : Math.max(56, height)}]}
+ style={[s.textInput, {height: height > 90 ? 90 : Math.max(46, height)}]}
value={value}
keyboardShouldPersistTaps={false}
underlineColorAndroid="white"
@@ -81,14 +82,24 @@ export default class SendMessageField extends Component {
{value}
-
+
+
+
+
)
@@ -98,5 +109,7 @@ export default class SendMessageField extends Component {
SendMessageField.propTypes = {
onSending: PropTypes.func,
value: PropTypes.string,
- onChange: PropTypes.func
+ onChange: PropTypes.func,
+ emojis: PropTypes.bool,
+ onRightAddIconPress: PropTypes.func
}
diff --git a/app/screens/Room.js b/app/screens/Room.js
index e7a2089..afd6880 100644
--- a/app/screens/Room.js
+++ b/app/screens/Room.js
@@ -1,5 +1,5 @@
import React, {Component, PropTypes} from 'react';
-import {InteractionManager, ToastAndroid, Clipboard, Alert, ListView, View, Platform} from 'react-native';
+import {InteractionManager, ToastAndroid, Clipboard, Alert, ListView, View, Platform, Keyboard} from 'react-native';
import Toolbar from '../components/Toolbar'
import {connect} from 'react-redux'
import DrawerLayout from 'react-native-drawer-layout'
@@ -84,11 +84,13 @@ class Room extends Component {
this.onNavigateBack = this.onNavigateBack.bind(this)
this.handleSharingRoom = this.handleSharingRoom.bind(this)
this.handleSharingMessage = this.handleSharingMessage.bind(this)
+ this.handleToggleEmojis = this.handleToggleEmojis.bind(this)
this.state = {
textInputValue: '',
editing: false,
- editMessage: {}
+ editMessage: {},
+ showEmojiBar: false
}
}
@@ -466,6 +468,18 @@ class Room extends Component {
})
}
+ handleToggleEmojis() {
+ const {showEmojiBar} = this.state
+
+ if (!showEmojiBar) {
+ // TODO(terrysahaidak) waiting 0.36 to be released
+ Keyboard.dismiss()
+ } else {
+ this.refs.sendMessageField.focus()
+ }
+ this.setState({showEmojiBar: !showEmojiBar})
+ }
+
leaveRoom() {
const {dispatch, route: {roomId}} = this.props
Alert.alert(
@@ -589,6 +603,8 @@ class Room extends Component {
}
return (