diff --git a/res/layout/chat.xml b/res/layout/chat.xml index 8f77bd62e..d00a18240 100644 --- a/res/layout/chat.xml +++ b/res/layout/chat.xml @@ -82,7 +82,8 @@ true + false true true true diff --git a/src/org/linphone/ChatFragment.java b/src/org/linphone/ChatFragment.java index 10c68713e..bc2643f44 100644 --- a/src/org/linphone/ChatFragment.java +++ b/src/org/linphone/ChatFragment.java @@ -61,6 +61,7 @@ import android.provider.MediaStore; import android.support.v4.app.Fragment; import android.support.v4.content.CursorLoader; import android.text.Editable; +import android.text.InputType; import android.text.TextWatcher; import android.view.ContextMenu; import android.view.ContextMenu.ContextMenuInfo; @@ -131,7 +132,12 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC sendMessage = (TextView) view.findViewById(R.id.sendMessage); sendMessage.setOnClickListener(this); + message = (EditText) view.findViewById(R.id.message); + if (!getActivity().getResources().getBoolean(R.bool.allow_chat_multiline)) { + message.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE); + message.setMaxLines(1); + } uploadLayout = (RelativeLayout) view.findViewById(R.id.uploadLayout); textLayout = (RelativeLayout) view.findViewById(R.id.messageLayout);