Commit c8be3dfb authored by Tiago Cunha's avatar Tiago Cunha

Improved message entry

Message entry always available
Clean up some views
RTL fixes
Fixes notification breaking bug
parent a21a9ec0
......@@ -154,8 +154,8 @@ public class RoomFragment extends AbstractChatRoomFragment
@Override
public void onItemClick(PairedMessage pairedMessage) {
if (pairedMessage.target != null) {
final int syncstate = pairedMessage.target.getSyncState();
if (syncstate == SyncState.FAILED) {
final int syncState = pairedMessage.target.getSyncState();
if (syncState == SyncState.FAILED) {
final String messageId = pairedMessage.target.getId();
new AlertDialog.Builder(getContext())
.setPositiveButton(R.string.resend, (dialog, which) -> {
......@@ -171,7 +171,6 @@ public class RoomFragment extends AbstractChatRoomFragment
realm.where(Message.class)
.equalTo("_id", messageId).findAll().deleteAllFromRealm()
).continueWith(new LogcatIfError());
;
})
.show();
}
......@@ -180,8 +179,8 @@ public class RoomFragment extends AbstractChatRoomFragment
}
private void setupSideMenu() {
View sidemenu = rootView.findViewById(R.id.room_side_menu);
sidemenu.findViewById(R.id.btn_users).setOnClickListener(view -> {
View sideMenu = rootView.findViewById(R.id.room_side_menu);
sideMenu.findViewById(R.id.btn_users).setOnClickListener(view -> {
UsersOfRoomDialogFragment.create(serverConfigId, roomId, hostname)
.show(getFragmentManager(), UsersOfRoomDialogFragment.class.getSimpleName());
closeSideMenuIfNeeded();
......@@ -225,6 +224,13 @@ public class RoomFragment extends AbstractChatRoomFragment
.put("ts", System.currentTimeMillis())
.put("rid", roomId)
.put("msg", messageText))));
messageComposerManager.setExtrasPickerListener(() -> {
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select Picture to Upload"),
RC_UPL);
});
}
private void setupFileUploader() {
......@@ -285,10 +291,10 @@ public class RoomFragment extends AbstractChatRoomFragment
RecyclerView listView = (RecyclerView) rootView.findViewById(R.id.recyclerview);
if (listView != null && listView.getAdapter() instanceof MessageListAdapter) {
MessageListAdapter adapter = (MessageListAdapter) listView.getAdapter();
final int syncstate = procedure.getSyncState();
final int syncState = procedure.getSyncState();
final boolean hasNext = procedure.hasNext();
RCLog.d("hasNext: %s syncstate: %d", hasNext, syncstate);
if (syncstate == SyncState.SYNCED || syncstate == SyncState.FAILED) {
RCLog.d("hasNext: %s syncstate: %d", hasNext, syncState);
if (syncState == SyncState.SYNCED || syncState == SyncState.FAILED) {
scrollListener.setLoadingDone();
adapter.updateFooter(hasNext, true);
} else {
......
......@@ -45,8 +45,8 @@ public abstract class AbstractMessageViewHolder extends RealmModelViewHolder<Pai
bindMessage(pairedMessage);
if (pairedMessage.target != null) {
int syncstate = pairedMessage.target.getSyncState();
if (syncstate == SyncState.NOT_SYNCED || syncstate == SyncState.SYNCING) {
int syncState = pairedMessage.target.getSyncState();
if (syncState == SyncState.NOT_SYNCED || syncState == SyncState.SYNCING) {
itemView.setAlpha(0.6f);
} else {
itemView.setAlpha(1.0f);
......@@ -76,7 +76,7 @@ public abstract class AbstractMessageViewHolder extends RealmModelViewHolder<Pai
private void setSequential(boolean sequential) {
if (avatar != null) {
if (sequential) {
avatar.setVisibility(View.INVISIBLE);
avatar.setVisibility(View.GONE);
} else {
avatar.setVisibility(View.VISIBLE);
}
......
......@@ -9,6 +9,7 @@ import chat.rocket.android.widget.message.MessageComposer;
public class MessageComposerManager {
private final MessageComposer messageComposer;
private SendMessageCallback sendMessageCallback;
private ExtrasPickerListener extrasPickerListener;
public MessageComposerManager(MessageComposer messageComposer) {
this.messageComposer = messageComposer;
......@@ -19,16 +20,12 @@ public class MessageComposerManager {
messageComposer.setOnActionListener(new MessageComposer.ActionListener() {
@Override
public void onSubmit(String message) {
if (sendMessageCallback != null) {
messageComposer.setEnabled(false);
sendMessageCallback.onSubmit(message).onSuccess(task -> {
clearComposingText();
return null;
}).continueWith(task -> {
messageComposer.setEnabled(true);
return null;
});
}
sendMessage(message);
}
@Override
public void onExtra() {
openExtras();
}
@Override
......@@ -41,11 +38,42 @@ public class MessageComposerManager {
this.sendMessageCallback = sendMessageCallback;
}
public void setExtrasPickerListener(ExtrasPickerListener listener) {
extrasPickerListener = listener;
}
public void clearComposingText() {
messageComposer.setText("");
}
private void sendMessage(String message) {
if (sendMessageCallback == null) {
return;
}
messageComposer.setEnabled(false);
sendMessageCallback.onSubmit(message).onSuccess(task -> {
clearComposingText();
return null;
}).continueWith(task -> {
messageComposer.setEnabled(true);
return null;
});
}
private void openExtras() {
if (extrasPickerListener == null) {
return;
}
extrasPickerListener.onOpen();
}
public interface SendMessageCallback {
Task<Void> onSubmit(String messageText);
}
public interface ExtrasPickerListener {
void onOpen();
}
}
......@@ -92,7 +92,6 @@ public class MessageListAdapter
return new AbstractMessageViewHolder(itemView, hostname, userId, token) {
@Override
protected void bindMessage(PairedMessage pairedMessage) {
}
};
}
......
......@@ -125,7 +125,7 @@ public class NotificationItemObserver extends AbstractModelObserver<Notification
.setContentText(description)
.setNumber(unreadCount)
.setColor(ContextCompat.getColor(context, R.color.colorPrimary))
.setSmallIcon(R.drawable.rocket_chat_notification_24dp)
.setSmallIcon(R.drawable.rocket_chat_notification)
.setContentIntent(getContentIntent(roomId))
.setDeleteIntent(getDeleteIntent(roomId));
......
......@@ -2,28 +2,24 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
android:layout_height="match_parent">
<include layout="@layout/sidebar"/>
<include layout="@layout/sidebar" />
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:title="@string/app_name"
/>
app:title="@string/app_name" />
</android.support.design.widget.AppBarLayout>
<FrameLayout
......@@ -31,8 +27,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
/>
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>
</LinearLayout>
\ No newline at end of file
......@@ -2,10 +2,9 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
android:orientation="horizontal">
<include layout="@layout/fragment_room_main"/>
<include layout="@layout/fragment_room_main" />
<include layout="@layout/room_side_menu"/>
<include layout="@layout/room_side_menu" />
</LinearLayout>
\ No newline at end of file
......@@ -3,20 +3,17 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/sliding_pane"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
android:layout_height="match_parent">
<include layout="@layout/sidebar"/>
<include layout="@layout/sidebar" />
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
android:id="@+id/activity_main_toolbar"
......@@ -24,18 +21,15 @@
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:title="@string/app_name"
/>
app:title="@string/app_name" />
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:id="@+id/activity_main_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:clickable="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
/>
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>
</android.support.v4.widget.SlidingPaneLayout>
\ No newline at end of file
......@@ -5,20 +5,19 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="288dp"
android:padding="@dimen/margin_24"
>
android:padding="@dimen/margin_24">
<android.support.design.widget.TextInputLayout
android:id="@+id/text_input_channel_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/editor_channel_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textWebEmailAddress"
android:hint="@string/dialog_add_channel_name"
/>
android:hint="@string/dialog_add_channel_name" />
</android.support.design.widget.TextInputLayout>
<LinearLayout
......@@ -27,29 +26,26 @@
android:orientation="horizontal"
android:layout_marginTop="@dimen/margin_16"
android:layout_marginStart="@dimen/margin_8"
android:layout_marginEnd="@dimen/margin_8"
>
android:layout_marginEnd="@dimen/margin_8">
<CheckBox
android:id="@+id/checkbox_private"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/dialog_add_channel_private"
/>
android:text="@string/dialog_add_channel_private" />
<CheckBox
android:id="@+id/checkbox_read_only"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/dialog_add_channel_read_only"
/>
android:text="@string/dialog_add_channel_read_only" />
</LinearLayout>
<Space
android:layout_width="match_parent"
android:layout_height="@dimen/margin_16"
/>
android:layout_height="@dimen/margin_16" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/btn_add_channel"
......@@ -58,8 +54,7 @@
android:layout_gravity="end|bottom"
app:elevation="2dp"
app:fabSize="mini"
app:srcCompat="@drawable/ic_arrow_forward_white_24dp"
/>
app:srcCompat="@drawable/ic_arrow_forward_white_24dp" />
<chat.rocket.android.widget.WaitingView
android:id="@+id/waiting"
......@@ -68,7 +63,6 @@
android:layout_gravity="center"
android:visibility="gone"
app:dotCount="5"
app:dotSize="12dp"
/>
app:dotSize="12dp" />
</LinearLayout>
\ No newline at end of file
......@@ -5,26 +5,24 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="288dp"
android:padding="@dimen/margin_24"
>
android:padding="@dimen/margin_24">
<android.support.design.widget.TextInputLayout
android:id="@+id/text_input_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
android:layout_height="wrap_content">
<android.support.v7.widget.AppCompatAutoCompleteTextView
android:id="@+id/editor_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="username"
android:completionThreshold="3"
/>
android:completionThreshold="3" />
</android.support.design.widget.TextInputLayout>
<Space
android:layout_width="match_parent"
android:layout_height="@dimen/margin_16"
/>
android:layout_height="@dimen/margin_16" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/btn_add_direct_message"
......@@ -33,8 +31,7 @@
android:layout_gravity="end|bottom"
app:elevation="2dp"
app:fabSize="mini"
app:srcCompat="@drawable/ic_arrow_forward_white_24dp"
/>
app:srcCompat="@drawable/ic_arrow_forward_white_24dp" />
<chat.rocket.android.widget.WaitingView
android:id="@+id/waiting"
......@@ -43,7 +40,6 @@
android:layout_gravity="center"
android:visibility="gone"
app:dotCount="5"
app:dotSize="12dp"
/>
app:dotSize="12dp" />
</LinearLayout>
\ No newline at end of file
......@@ -6,22 +6,19 @@
android:paddingStart="@dimen/margin_16"
android:paddingEnd="@dimen/margin_16"
android:paddingBottom="@dimen/margin_16"
android:orientation="vertical"
>
android:orientation="vertical">
<FrameLayout
android:id="@+id/room_user_titlebar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
>
android:layout_height="?attr/actionBarSize">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:text="@string/file_uploading_title"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
/>
android:textAppearance="@style/TextAppearance.AppCompat.Title" />
</FrameLayout>
......@@ -33,8 +30,7 @@
android:layout_marginTop="@dimen/margin_8"
android:layout_marginBottom="@dimen/margin_8"
tools:progress="12"
tools:max="120"
/>
tools:max="120" />
<LinearLayout
android:layout_width="wrap_content"
......@@ -42,25 +38,25 @@
android:orientation="horizontal"
android:layout_gravity="end"
android:paddingEnd="2dp"
>
android:paddingRight="2dp">
<TextView
android:id="@+id/txt_filesize_uploaded"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="12"
/>
tools:text="12" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="/"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
/>
android:layout_marginEnd="2dp" />
<TextView
android:id="@+id/txt_filesize_total"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="120"
/>
tools:text="120" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
......@@ -5,14 +5,12 @@
android:layout_height="match_parent"
android:minWidth="288dp"
android:orientation="vertical"
android:padding="@dimen/margin_24"
>
android:padding="@dimen/margin_24">
<android.support.design.widget.TextInputLayout
android:id="@+id/text_input_email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/editor_email"
......@@ -21,20 +19,17 @@
android:hint="@string/dialog_user_registration_email"
android:imeOptions="actionNext"
android:inputType="textWebEmailAddress"
android:singleLine="true"
/>
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
<Space
android:layout_width="wrap_content"
android:layout_height="@dimen/margin_8"
/>
android:layout_height="@dimen/margin_8" />
<android.support.design.widget.TextInputLayout
android:id="@+id/text_input_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/editor_username"
......@@ -43,21 +38,18 @@
android:hint="@string/dialog_user_registration_username"
android:imeOptions="actionNext"
android:inputType="textWebEmailAddress"
android:singleLine="true"
/>
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
<Space
android:layout_width="wrap_content"
android:layout_height="@dimen/margin_8"
/>
android:layout_height="@dimen/margin_8" />
<android.support.design.widget.TextInputLayout
android:id="@+id/text_input_passwd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:passwordToggleEnabled="true"
>
app:passwordToggleEnabled="true">
<android.support.design.widget.TextInputEditText
android:id="@+id/editor_passwd"
......@@ -66,14 +58,12 @@
android:hint="@string/dialog_user_registration_password"
android:imeOptions="actionNext"
android:inputType="textWebPassword"
android:singleLine="true"
/>
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
<Space
android:layout_width="wrap_content"
android:layout_height="@dimen/margin_16"
/>
android:layout_height="@dimen/margin_16" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/btn_register_user"
......@@ -82,8 +72,7 @@
android:layout_gravity="end|bottom"
app:elevation="2dp"
app:fabSize="mini"
app:srcCompat="@drawable/ic_arrow_forward_white_24dp"
/>
app:srcCompat="@drawable/ic_arrow_forward_white_24dp" />
<chat.rocket.android.widget.WaitingView
android:id="@+id/waiting"
......@@ -91,7 +80,6 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
app:dotCount="5"
app:dotSize="12dp"
/>
app:dotSize="12dp" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
android:orientation="vertical">
<FrameLayout
android:id="@+id/room_user_titlebar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:paddingRight="@dimen/margin_16"
android:paddingStart="@dimen/margin_16"
>
android:paddingEnd="@dimen/margin_16"
android:paddingStart="@dimen/margin_16">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:text="@string/users_of_room_title"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
/>
android:textAppearance="@style/TextAppearance.AppCompat.Title" />
<TextView
android:id="@+id/room_user_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|center_vertical"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
/>
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
</FrameLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
/>
android:orientation="vertical" />
</LinearLayout>
......@@ -48,7 +42,6 @@
android:id="@+id/waiting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
/>
android:layout_gravity="center" />
</FrameLayout>
\ No newline at end of file
......@@ -5,27 +5,23 @@
android:gravity="center"
android:minWidth="288dp"
android:orientation="vertical"
android:padding="@dimen/margin_24"
>
android:padding="@dimen/margin_24">
<ImageView
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginBottom="@dimen/margin_24"
android:scaleType="fitCenter"
android:src="@mipmap/ic_launcher"
/>
android:src="@mipmap/ic_launcher" />
<chat.rocket.android.widget.WaitingView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
android:layout_height="wrap_content" />
<TextView
android:id="@+id/txt_caption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_16"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
/>
android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
</LinearLayout>
\ No newline at end of file
......@@ -5,8 +5,7 @@
android:gravity="center"
android:orientation="vertical"
android:padding="@dimen/margin_16"
android:theme="@style/Theme.AppCompat.Light"
>
android:theme="@style/Theme.AppCompat.Light">
<TextView
android:layout_width="match_parent"
......@@ -14,12 +13,10 @@
android:layout_marginBottom="@dimen/margin_16"
android:gravity="center"
android:text="@string/fragment_home_welcome_message"
android:textSize="14sp"
/>
android:textSize="14sp" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_launcher"
/>
android:src="@mipmap/ic_launcher" />
</LinearLayout>
\ No newline at end of file
......@@ -3,8 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorPrimaryDark"
>
android:background="?attr/colorPrimaryDark">
<LinearLayout
android:layout_width="wrap_content"
......@@ -13,22 +12,19 @@
android:background="@color/white"
android:minWidth="288dp"
android:orientation="horizontal"
android:padding="@dimen/margin_24"
>
android:padding="@dimen/margin_24">
<LinearLayout
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
>
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_input_hostname_hostname"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
/>
android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
<EditText
android:id="@+id/editor_hostname"
......@@ -37,14 +33,12 @@
android:hint="@string/fragment_input_hostname_server_hint"
android:imeOptions="actionGo"
android:inputType="textWebEditText"
android:singleLine="true"
/>
android:singleLine="true" />
</LinearLayout>
<Space
android:layout_width="@dimen/margin_8"
android:layout_height="wrap_content"
/>
android:layout_height="wrap_content" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/btn_connect"
......@@ -53,7 +47,6 @@
android:layout_gravity="end|bottom"
app:elevation="2dp"
app:fabSize="mini"
app:srcCompat="@drawable/ic_arrow_forward_white_24dp"
/>
app:srcCompat="@drawable/ic_arrow_forward_white_24dp" />
</LinearLayout>
</FrameLayout>
\ No newline at end of file
......@@ -3,8 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorPrimaryDark"
>
android:background="?attr/colorPrimaryDark">
<LinearLayout
android:layout_width="wrap_content"
......@@ -13,14 +12,12 @@
android:background="@color/white"
android:minWidth="288dp"
android:orientation="vertical"
android:padding="@dimen/margin_24"
>
android:padding="@dimen/margin_24">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
android:orientation="horizontal">
<chat.rocket.android.widget.FontAwesomeButton
android:id="@+id/btn_login_with_twitter"
......@@ -29,7 +26,7 @@
android:layout_marginEnd="@dimen/margin_8"
android:text="@string/fa_twitter"
android:textSize="16dp"
/>
android:layout_marginRight="@dimen/margin_8" />
<chat.rocket.android.widget.FontAwesomeButton
android:id="@+id/btn_login_with_facebook"
......@@ -38,7 +35,7 @@
android:layout_marginEnd="@dimen/margin_8"
android:text="@string/fa_facebook_official"
android:textSize="16dp"
/>
android:layout_marginRight="@dimen/margin_8" />
<chat.rocket.android.widget.FontAwesomeButton
android:id="@+id/btn_login_with_github"
......@@ -47,7 +44,7 @@
android:layout_marginEnd="@dimen/margin_8"
android:text="@string/fa_github"
android:textSize="16dp"
/>
android:layout_marginRight="@dimen/margin_8" />
<chat.rocket.android.widget.FontAwesomeButton
android:id="@+id/btn_login_with_google"
......@@ -56,15 +53,14 @@
android:layout_marginEnd="@dimen/margin_8"
android:text="@string/fa_google"
android:textSize="16dp"
/>
android:layout_marginRight="@dimen/margin_8" />
</LinearLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/text_input_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/editor_username"
......@@ -73,21 +69,18 @@
android:hint="@string/fragment_login_username_or_email"
android:imeOptions="actionNext"
android:inputType="textWebEmailAddress"
android:singleLine="true"
/>
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
<Space
android:layout_width="wrap_content"
android:layout_height="@dimen/margin_8"
/>
android:layout_height="@dimen/margin_8" />
<android.support.design.widget.TextInputLayout
android:id="@+id/text_input_passwd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:passwordToggleEnabled="true"
>
app:passwordToggleEnabled="true">
<android.support.design.widget.TextInputEditText
android:id="@+id/editor_passwd"
......@@ -96,20 +89,17 @@
android:hint="@string/fragment_login_password"
android:imeOptions="actionNext"
android:inputType="textWebPassword"
android:singleLine="true"
/>
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
<Space
android:layout_width="wrap_content"
android:layout_height="@dimen/margin_16"
/>
android:layout_height="@dimen/margin_16" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
android:orientation="horizontal">
<android.support.design.widget.FloatingActionButton
android:id="@+id/btn_user_registration"
......@@ -119,8 +109,7 @@
app:backgroundTint="@color/white"
app:elevation="2dp"
app:fabSize="mini"
app:srcCompat="@drawable/ic_user_registration_blue_24dp"
/>
app:srcCompat="@drawable/ic_user_registration_blue_24dp" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/btn_login_with_email"
......@@ -129,8 +118,7 @@
android:layout_gravity="end|bottom"
app:elevation="2dp"
app:fabSize="normal"
app:srcCompat="@drawable/ic_arrow_forward_white_24dp"
/>
app:srcCompat="@drawable/ic_arrow_forward_white_24dp" />
</FrameLayout>
</LinearLayout>
</FrameLayout>
\ No newline at end of file
......@@ -3,8 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorPrimaryDark"
>
android:background="?attr/colorPrimaryDark">
<LinearLayout
android:layout_width="wrap_content"
......@@ -13,15 +12,13 @@
android:background="@color/white"
android:minWidth="288dp"
android:orientation="vertical"
android:padding="@dimen/margin_24"
>
android:padding="@dimen/margin_24">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_retry_login_error_title"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
/>
android:textAppearance="@style/TextAppearance.AppCompat.Title" />
<TextView
android:id="@+id/txt_error_description"
......@@ -29,16 +26,14 @@
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/margin_8"
android:layout_marginTop="@dimen/margin_8"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Body1"
/>
android:textAppearance="@style/Base.TextAppearance.AppCompat.Body1" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical"
>
android:orientation="vertical">
<android.support.design.widget.FloatingActionButton
android:id="@+id/btn_retry_login"
......@@ -47,15 +42,13 @@
android:layout_margin="@dimen/margin_8"
app:elevation="2dp"
app:fabSize="normal"
app:srcCompat="@drawable/ic_arrow_forward_white_24dp"
/>
app:srcCompat="@drawable/ic_arrow_forward_white_24dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/fragment_retry_login_retry_title"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
/>
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
</LinearLayout>
......@@ -66,8 +59,7 @@
android:layout_gravity="center"
android:layout_marginTop="@dimen/margin_16"
app:dotCount="5"
app:dotSize="12dp"
/>
app:dotSize="12dp" />
</LinearLayout>
</FrameLayout>
\ No newline at end of file
......@@ -2,19 +2,17 @@
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
android:layout_height="match_parent">
<include layout="@layout/fragment_room_main"/>
<include layout="@layout/fragment_room_main" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="end"
android:clickable="true"
android:theme="@style/AppTheme.Dark"
>
android:theme="@style/AppTheme.Dark">
<include layout="@layout/room_side_menu"/>
<include layout="@layout/room_side_menu" />
</FrameLayout>
</android.support.v4.widget.DrawerLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:layout_above="@+id/message_composer" />
<chat.rocket.android.widget.message.MessageComposer
android:id="@+id/message_composer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/Theme.AppCompat.Light"
android:layout_gravity="bottom"
android:background="@android:color/white" />
</FrameLayout>
\ No newline at end of file
android:layout_alignParentBottom="true" />
</RelativeLayout>
\ No newline at end of file
......@@ -61,7 +61,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingStart="?attr/listPreferredItemPaddingLeft">
android:paddingStart="?attr/listPreferredItemPaddingLeft"
android:paddingLeft="?attr/listPreferredItemPaddingLeft">
<TextView
android:id="@+id/unread_title"
......@@ -80,7 +81,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="?attr/listPreferredItemPaddingRight"
android:orientation="vertical" />
android:orientation="vertical"
android:layout_marginRight="?attr/listPreferredItemPaddingRight" />
<FrameLayout
android:layout_width="match_parent"
......@@ -112,7 +114,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="?attr/listPreferredItemPaddingRight"
android:orientation="vertical" />
android:orientation="vertical"
android:layout_marginRight="?attr/listPreferredItemPaddingRight" />
<FrameLayout
android:layout_width="match_parent"
......@@ -144,7 +147,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="?attr/listPreferredItemPaddingRight"
android:orientation="vertical" />
android:orientation="vertical"
android:layout_marginRight="?attr/listPreferredItemPaddingRight" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
......
......@@ -3,29 +3,25 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorPrimaryDark"
android:theme="@style/AppTheme.Dark"
>
android:theme="@style/AppTheme.Dark">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical"
>
android:orientation="vertical">
<chat.rocket.android.widget.WaitingView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
android:layout_height="wrap_content" />
<TextView
android:id="@+id/txt_caption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_32"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
/>
android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
</LinearLayout>
</FrameLayout>
\ No newline at end of file
......@@ -2,5 +2,4 @@
<Space xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/space"
android:layout_width="match_parent"
android:layout_height="88dp"
/>
\ No newline at end of file
android:layout_height="0dp" />
\ No newline at end of file
......@@ -3,14 +3,12 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:theme="@style/AppTheme"
>
android:theme="@style/AppTheme">
<chat.rocket.android.widget.WaitingView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="@dimen/margin_8"
/>
android:layout_margin="@dimen/margin_8" />
</FrameLayout>
\ No newline at end of file
......@@ -6,15 +6,13 @@
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:gravity="center_vertical"
android:orientation="horizontal"
>
android:orientation="horizontal">
<View
android:layout_width="0px"
android:layout_height="1dp"
android:layout_weight="1"
android:background="@color/newday_color"
/>
android:background="@color/newday_color" />
<TextView
android:id="@+id/newday_text"
......@@ -25,14 +23,12 @@
android:textColor="@color/newday_color"
android:textSize="8sp"
android:textStyle="bold"
tools:text="2016/01/23"
/>
tools:text="2016/01/23" />
<View
android:layout_width="0px"
android:layout_height="1dp"
android:layout_weight="1"
android:background="@color/newday_color"
/>
android:background="@color/newday_color" />
</LinearLayout>
\ No newline at end of file
......@@ -3,8 +3,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:theme="@style/AppTheme"
>
android:theme="@style/AppTheme">
<TextView
android:layout_width="wrap_content"
......@@ -12,7 +11,6 @@
android:layout_gravity="center"
android:layout_margin="@dimen/margin_16"
android:text="@string/start_of_conversation"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
/>
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
</FrameLayout>
\ No newline at end of file
......@@ -4,77 +4,70 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:theme="@style/AppTheme"
>
android:theme="@style/AppTheme">
<include layout="@layout/list_item_message_newday"/>
<include layout="@layout/list_item_message_newday" />
<LinearLayout
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
android:layout_marginBottom="2dp">
<ImageView
android:id="@+id/user_avatar"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_margin="8dp"
tools:src="@drawable/ic_default_avatar"
/>
tools:src="@drawable/ic_default_avatar" />
<LinearLayout
android:layout_width="0px"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_weight="1"
android:layout_marginStart="48dp"
android:orientation="vertical"
>
android:layout_marginRight="8dp"
android:layout_marginLeft="48dp">
<LinearLayout
android:id="@+id/user_and_timestamp_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
android:orientation="horizontal">
<TextView
android:id="@+id/username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
tools:text="John Doe"
/>
tools:text="John Doe" />
<Space
android:layout_width="@dimen/margin_8"
android:layout_height="wrap_content"
/>
android:layout_height="wrap_content" />
<TextView
android:id="@+id/timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="false"
tools:text="12:34"
/>
tools:text="12:34" />
</LinearLayout>
<chat.rocket.android.widget.message.RocketChatMessageLayout
android:id="@+id/message_body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
android:layout_height="wrap_content" />
<chat.rocket.android.widget.message.RocketChatMessageUrlsLayout
android:id="@+id/message_urls"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
android:layout_height="wrap_content" />
<chat.rocket.android.widget.message.RocketChatMessageAttachmentsLayout
android:id="@+id/message_attachments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
</FrameLayout>
</LinearLayout>
\ No newline at end of file
......@@ -4,60 +4,53 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:theme="@style/AppTheme"
>
android:theme="@style/AppTheme">
<include layout="@layout/list_item_message_newday"/>
<include layout="@layout/list_item_message_newday" />
<LinearLayout
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
android:layout_height="wrap_content">
<ImageView
android:id="@+id/user_avatar"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_margin="8dp"
tools:src="@drawable/ic_default_avatar"
/>
tools:src="@drawable/ic_default_avatar" />
<LinearLayout
android:layout_width="0px"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_weight="1"
android:layout_marginStart="48dp"
android:orientation="vertical"
>
android:layout_marginRight="8dp"
android:layout_marginLeft="48dp">
<LinearLayout
android:id="@+id/user_and_timestamp_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
android:orientation="horizontal">
<TextView
android:id="@+id/username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
tools:text="John Doe"
/>
tools:text="John Doe" />
<Space
android:layout_width="@dimen/margin_8"
android:layout_height="wrap_content"
/>
android:layout_height="wrap_content" />
<TextView
android:id="@+id/timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="false"
tools:text="12:34"
/>
tools:text="12:34" />
</LinearLayout>
<TextView
......@@ -66,8 +59,7 @@
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textStyle="italic"
android:enabled="false"
/>
android:enabled="false" />
</LinearLayout>
</LinearLayout>
</FrameLayout>
</LinearLayout>
\ No newline at end of file
......@@ -3,21 +3,18 @@
android:layout_width="match_parent"
android:layout_height="?attr/listPreferredItemHeightSmall"
android:gravity="center_vertical"
android:orientation="horizontal"
>
android:orientation="horizontal">
<ImageView
android:id="@+id/room_user_status"
android:layout_width="8dp"
android:layout_height="8dp"
android:layout_margin="@dimen/margin_8"
/>
android:layout_margin="@dimen/margin_8" />
<ImageView
android:id="@+id/room_user_avatar"
android:layout_width="24dp"
android:layout_height="24dp"
/>
android:layout_height="24dp" />
<TextView
android:id="@+id/room_user_name"
......@@ -27,7 +24,6 @@
android:layout_marginLeft="@dimen/margin_8"
android:layout_marginRight="@dimen/margin_8"
android:layout_weight="1"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
/>
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
</LinearLayout>
\ No newline at end of file
......@@ -4,31 +4,27 @@
android:layout_width="48dp"
android:layout_height="match_parent"
android:layout_gravity="end"
android:orientation="vertical"
>
android:orientation="vertical">
<chat.rocket.android.widget.FontAwesomeButton
android:layout_width="48dp"
android:layout_height="48dp"
android:enabled="false"
android:text="@string/fa_search"
android:textSize="24dp"
/>
android:textSize="24dp" />
<chat.rocket.android.widget.FontAwesomeButton
android:id="@+id/btn_users"
android:layout_width="48dp"
android:layout_height="48dp"
android:text="@string/fa_users"
android:textSize="24dp"
/>
android:textSize="24dp" />
<chat.rocket.android.widget.FontAwesomeButton
android:layout_width="48dp"
android:layout_height="48dp"
android:enabled="false"
android:text="@string/fa_at"
android:textSize="24dp"
/>
android:textSize="24dp" />
</LinearLayout>
\ No newline at end of file
......@@ -4,44 +4,38 @@
android:layout_width="280dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:theme="@style/AppTheme.Dark"
>
android:theme="@style/AppTheme.Dark">
<android.support.v4.widget.NestedScrollView
android:layout_width="96dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="?attr/colorPrimaryDark"
>
android:background="?attr/colorPrimaryDark">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
android:orientation="vertical">
<ImageButton
style="@style/Base.Widget.AppCompat.Button.Borderless"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_margin="@dimen/margin_8"
android:src="@mipmap/ic_launcher"
/>
android:src="@mipmap/ic_launcher" />
<chat.rocket.android.widget.FontAwesomeButton
style="@style/Base.Widget.AppCompat.Button.Borderless"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_margin="@dimen/margin_8"
android:text="@string/fa_plus"
/>
android:text="@string/fa_plus" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<FrameLayout
android:id="@+id/sidebar_fragment_container"
android:layout_width="280dp"
android:layout_height="match_parent"
/>
android:layout_height="match_parent" />
</android.support.v4.widget.SlidingPaneLayout>
\ No newline at end of file
......@@ -2,7 +2,6 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
android:layout_height="match_parent">
</FrameLayout>
\ No newline at end of file
......@@ -2,5 +2,4 @@
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
\ No newline at end of file
android:layout_height="match_parent" />
\ No newline at end of file
......@@ -13,6 +13,7 @@
<item name="actionModeBackground">?attr/colorPrimaryDark</item>
<item name="android:statusBarColor" tools:targetApi="21">?attr/colorPrimaryDark</item>
<item name="android:navigationBarColor" tools:targetApi="21">?attr/colorPrimaryDark</item>
<item name="android:windowBackground">@android:color/white</item>
</style>
<style name="AppTheme.Dark" parent="Theme.AppCompat.NoActionBar">
......
......@@ -4,11 +4,14 @@ import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.support.annotation.Nullable;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
......@@ -19,6 +22,9 @@ public class MessageComposer extends LinearLayout {
protected ActionListener actionListener;
protected ViewGroup composer;
private View btnExtra;
private View btnSubmit;
public MessageComposer(Context context) {
super(context);
init();
......@@ -47,14 +53,50 @@ public class MessageComposer extends LinearLayout {
private void init() {
composer = (ViewGroup) LayoutInflater.from(getContext())
.inflate(R.layout.message_composer, this, false);
composer.findViewById(R.id.btn_submit).setOnClickListener(new OnClickListener() {
btnExtra = composer.findViewById(R.id.btn_extras);
btnExtra.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (actionListener != null) {
actionListener.onExtra();
}
}
});
btnSubmit = composer.findViewById(R.id.btn_submit);
btnSubmit.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
String messageText = getText();
if (messageText.length() > 0) {
if (actionListener != null) {
actionListener.onSubmit(messageText);
}
if (messageText.length() > 0 && actionListener != null) {
actionListener.onSubmit(messageText);
}
}
});
btnSubmit.animate().scaleX(0).scaleY(0).setDuration(0);
btnSubmit.setVisibility(GONE);
((EditText) composer.findViewById(R.id.editor)).addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
if (s.toString().trim().length() > 0) {
animateHide(btnExtra);
animateShow(btnSubmit);
} else {
animateShow(btnExtra);
animateHide(btnSubmit);
}
}
});
......@@ -113,9 +155,29 @@ public class MessageComposer extends LinearLayout {
return getVisibility() == View.VISIBLE;
}
private void animateHide(final View view) {
view.animate().scaleX(0).scaleY(0).setDuration(150).withEndAction(new Runnable() {
@Override
public void run() {
view.setVisibility(GONE);
}
});
}
private void animateShow(final View view) {
view.animate().scaleX(1).scaleY(1).setDuration(150).withStartAction(new Runnable() {
@Override
public void run() {
view.setVisibility(VISIBLE);
}
});
}
public interface ActionListener {
void onSubmit(String message);
void onExtra();
void onCancel();
}
}
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M13,7h-2v4L7,11v2h4v4h2v-4h4v-2h-4L13,7zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"/>
</vector>
......@@ -3,5 +3,4 @@
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.RocketChat.MessageBody"
/>
android:textAppearance="@style/TextAppearance.RocketChat.MessageBody" />
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -11,4 +10,5 @@
android:layout_marginEnd="6dp"
android:layout_marginTop="3dp"
android:layout_marginBottom="3dp"
/>
\ No newline at end of file
android:layout_marginLeft="0px"
android:layout_marginRight="6dp" />
\ No newline at end of file
......@@ -12,20 +12,50 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="bottom"
android:orientation="horizontal">
<ImageView
android:id="@+id/emoji_keyboard_toggle"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_margin="8dp" />
<EditText
android:id="@+id/editor"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="@null"
android:layout_marginLeft="0dp"
android:layout_marginRight="0dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:padding="0dp"
android:layout_weight="1"
android:maxLines="3" />
android:textSize="14sp"
android:hint="@string/message_composer_message_hint"
android:minLines="1"
android:maxLines="4" />
<ImageButton
android:id="@+id/btn_submit"
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
app:srcCompat="@drawable/ic_send_black_24dp" />
android:layout_height="wrap_content">
<ImageView
android:id="@+id/btn_extras"
android:layout_width="48dp"
android:layout_height="48dp"
android:padding="8dp"
app:srcCompat="@drawable/ic_add_circle_outline_black_24dp" />
<ImageView
android:id="@+id/btn_submit"
android:layout_width="48dp"
android:layout_height="48dp"
android:padding="8dp"
app:srcCompat="@drawable/ic_send_black_24dp" />
</FrameLayout>
</LinearLayout>
</LinearLayout>
......@@ -4,21 +4,19 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_margin="4dp"
android:padding="4dp"
>
android:padding="4dp">
<View
android:layout_width="3dp"
android:layout_height="match_parent"
android:layout_marginRight="5dp"
android:background="@color/inline_attachment_quote_line"
/>
android:background="@color/inline_attachment_quote_line" />
<LinearLayout
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
>
android:orientation="vertical">
<TextView
android:id="@+id/title"
......@@ -27,8 +25,7 @@
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:textAppearance="@style/TextAppearance.RocketChat.MessageAttachment.Title"
android:background="?attr/selectableItemBackground"
/>
android:background="?attr/selectableItemBackground" />
<ImageView
android:id="@+id/image"
......@@ -38,8 +35,7 @@
android:layout_marginTop="4dp"
android:layout_marginRight="8dp"
android:adjustViewBounds="true"
android:scaleType="fitStart"
/>
android:scaleType="fitStart" />
</LinearLayout>
</LinearLayout>
......@@ -5,14 +5,14 @@
android:orientation="horizontal"
android:background="?attr/selectableItemBackground"
android:layout_margin="4dp"
android:padding="4dp"
>
android:padding="4dp">
<View
android:layout_width="3dp"
android:layout_height="match_parent"
android:layout_marginEnd="5dp"
android:background="@color/inline_attachment_quote_line"
/>
android:layout_marginRight="5dp" />
<ImageView
android:id="@+id/image"
......@@ -23,14 +23,13 @@
android:layout_marginEnd="8dp"
android:adjustViewBounds="true"
android:scaleType="fitStart"
/>
android:layout_marginRight="8dp" />
<LinearLayout
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
>
android:orientation="vertical">
<TextView
android:id="@+id/hostname"
......@@ -38,8 +37,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:enabled="false"
/>
android:enabled="false" />
<TextView
android:id="@+id/title"
......@@ -47,8 +45,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:textAppearance="@style/TextAppearance.RocketChat.MessageAttachment.Title"
/>
android:textAppearance="@style/TextAppearance.RocketChat.MessageAttachment.Title" />
<TextView
android:id="@+id/description"
......@@ -56,8 +53,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:textAppearance="@style/TextAppearance.RocketChat.MessageAttachment.Description"
/>
android:textAppearance="@style/TextAppearance.RocketChat.MessageAttachment.Description" />
</LinearLayout>
......
......@@ -3,14 +3,13 @@
android:layout_height="wrap_content"
android:background="@drawable/inline_attachment_background"
android:layout_margin="4dp"
android:padding="4dp"
>
android:padding="4dp">
<ImageView
android:id="@+id/message_inline_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxHeight="200dp"
android:adjustViewBounds="true"
android:scaleType="fitStart"
/>
android:scaleType="fitStart" />
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
android:layout_height="wrap_content">
<FrameLayout
android:layout_width="32dp"
android:layout_height="?attr/listPreferredItemHeightSmall"
android:layout_marginEnd="16dp"
>
android:layout_marginRight="16dp">
<chat.rocket.android.widget.FontAwesomeTextView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
/>
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
</FrameLayout>
<TextView
......@@ -23,8 +23,7 @@
android:layout_height="?attr/listPreferredItemHeightSmall"
android:layout_weight="1"
android:gravity="center_vertical"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
/>
android:textAppearance="@style/TextAppearance.AppCompat.Body2" />
<FrameLayout
android:id="@+id/alert_count_container"
......@@ -35,14 +34,14 @@
android:padding="3dp"
android:layout_gravity="center_vertical"
android:background="@drawable/unread_count_background"
>
android:layout_marginLeft="8dp">
<TextView
android:id="@+id/alert_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14dp"
android:layout_gravity="center"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
/>
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
</FrameLayout>
</merge>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="message_composer_message_hint">Message</string>
</resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment