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
This commit is contained in:
Sam Lanning 2015-01-02 21:22:42 +00:00 committed by Moxie Marlinspike
parent fe5fc411a7
commit b8ca0e57ad

View File

@ -74,8 +74,11 @@ public class EmojiDrawer extends KeyboardAwareLinearLayout {
inflater.inflate(R.layout.emoji_drawer, this, true);
initializeResources();
if (!this.isInEditMode()) {
initializeEmojiGrid();
}
}
private void initializeResources() {
this.pager = (ViewPager ) findViewById(R.id.emoji_pager);