Emoji Support for all user input

All text that can be generated by users will show emoji from the
shipped sprites.

For all messages and posts, the custom emoji keyboard is now available.

This also disables menu actions rather than hiding them and thus
closes #677

Included is a fix for a regression that was not showing the keyboard
automatically in forums and thus
closes #676
This commit is contained in:
Torsten Grote
2016-09-26 17:58:26 -03:00
parent a422c626b3
commit f8e0441de8
42 changed files with 587 additions and 435 deletions

View File

@@ -11,7 +11,7 @@ import android.support.annotation.UiThread;
import android.util.AttributeSet;
import android.view.View;
import android.view.WindowManager;
import android.widget.RelativeLayout;
import android.widget.LinearLayout;
import org.briarproject.R;
@@ -31,10 +31,10 @@ import static java.util.logging.Level.WARNING;
* a soft keyboard has been opened and what its height would be.
*/
@UiThread
public class KeyboardAwareRelativeLayout extends RelativeLayout {
public class KeyboardAwareLinearLayout extends LinearLayout {
private static final Logger LOG =
Logger.getLogger(KeyboardAwareRelativeLayout.class.getName());
Logger.getLogger(KeyboardAwareLinearLayout.class.getName());
private final Rect rect = new Rect();
private final Set<OnKeyboardHiddenListener> hiddenListeners =
@@ -51,16 +51,16 @@ public class KeyboardAwareRelativeLayout extends RelativeLayout {
private boolean keyboardOpen = false;
private int rotation = -1;
public KeyboardAwareRelativeLayout(Context context) {
public KeyboardAwareLinearLayout(Context context) {
this(context, null);
}
public KeyboardAwareRelativeLayout(Context context,
public KeyboardAwareLinearLayout(Context context,
@Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
public KeyboardAwareRelativeLayout(Context context,
public KeyboardAwareLinearLayout(Context context,
@Nullable AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
final int statusBarRes = getResources()

View File

@@ -41,6 +41,7 @@ public class EmojiTextView extends TextView {
@Override
public void setText(@Nullable CharSequence text, BufferType type) {
source = EmojiProvider.getInstance(getContext()).emojify(text, this);
setTextEllipsized(source);
}