Only initialise EmojiGrid when not in edit mode

Suppress initialisation of the emoji_grid_layout.xml when the
EmojiDrawer is being used in a layout where the editor is shown,
 to prevent an NPE when an editor is being used.

// FREEBIE

Closes #2288
pull/1/head
Sam Lanning 10 years ago committed by Moxie Marlinspike
parent fe5fc411a7
commit b8ca0e57ad

@ -74,7 +74,10 @@ public class EmojiDrawer extends KeyboardAwareLinearLayout {
inflater.inflate(R.layout.emoji_drawer, this, true);
initializeResources();
initializeEmojiGrid();
if (!this.isInEditMode()) {
initializeEmojiGrid();
}
}
private void initializeResources() {

Loading…
Cancel
Save