mirror of
https://github.com/yuliskov/SmartTube.git
synced 2025-05-17 19:35:54 +08:00
chat: upd formatting
This commit is contained in:
@ -31,6 +31,7 @@ import android.widget.TextView;
|
||||
import androidx.annotation.LayoutRes;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.liskovsoft.sharedutils.helpers.Helpers;
|
||||
import com.stfalcon.chatkit.R;
|
||||
import com.stfalcon.chatkit.commons.ImageLoader;
|
||||
import com.stfalcon.chatkit.commons.ViewHolder;
|
||||
@ -705,7 +706,7 @@ public class MessagesListAdapter<MESSAGE extends IMessage>
|
||||
|
||||
private boolean checkMessage(MESSAGE message) {
|
||||
return message != null && message.getId() != null && message.getUser() != null && message.getUser().getId() != null
|
||||
&& message.getText() != null && !message.getText().trim().isEmpty();
|
||||
&& message.getText() != null && !Helpers.trim(message.getText()).isEmpty();
|
||||
}
|
||||
|
||||
void setLayoutManager(RecyclerView.LayoutManager layoutManager) {
|
||||
|
@ -1,21 +1,24 @@
|
||||
<!-- MODIFIED -->
|
||||
<!-- Android 9 message focused bug fix: RelativeLayout focusable="false" -->
|
||||
<!-- Decrease space between messages: RelativeLayout android:layout_marginBottom=8dp>3dp android:layout_marginTop=8dp>3dp -->
|
||||
<!-- Decrease space between messages: RelativeLayout android:layout_marginBottom="8dp"->"3dp" android:layout_marginTop="8dp"->"3dp" -->
|
||||
<!-- Margins: android:layout_marginRight="16dp"->"3dp" -->
|
||||
<RelativeLayout 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="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginRight="3dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:focusable="false">
|
||||
|
||||
<!-- Move author icon to the top android:layout_alignParentBottom="true"->android:layout_alignParentTop="true", add new android:layout_marginTop="3dp" -->
|
||||
<com.stfalcon.chatkit.utils.ShapeImageView
|
||||
android:id="@id/messageUserAvatar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp" />
|
||||
|
||||
|
Reference in New Issue
Block a user