mirror of
https://github.com/yuliskov/SmartTube.git
synced 2025-05-18 20:06:26 +08:00
chat: upd formatting
This commit is contained in:
Submodule MediaServiceCore updated: 10fdf1a7af...98d020458b
Submodule SharedModules updated: 91a98730fc...e0cc415d21
@ -31,6 +31,7 @@ import android.widget.TextView;
|
|||||||
import androidx.annotation.LayoutRes;
|
import androidx.annotation.LayoutRes;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.liskovsoft.sharedutils.helpers.Helpers;
|
||||||
import com.stfalcon.chatkit.R;
|
import com.stfalcon.chatkit.R;
|
||||||
import com.stfalcon.chatkit.commons.ImageLoader;
|
import com.stfalcon.chatkit.commons.ImageLoader;
|
||||||
import com.stfalcon.chatkit.commons.ViewHolder;
|
import com.stfalcon.chatkit.commons.ViewHolder;
|
||||||
@ -705,7 +706,7 @@ public class MessagesListAdapter<MESSAGE extends IMessage>
|
|||||||
|
|
||||||
private boolean checkMessage(MESSAGE message) {
|
private boolean checkMessage(MESSAGE message) {
|
||||||
return message != null && message.getId() != null && message.getUser() != null && message.getUser().getId() != null
|
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) {
|
void setLayoutManager(RecyclerView.LayoutManager layoutManager) {
|
||||||
|
@ -1,21 +1,24 @@
|
|||||||
<!-- MODIFIED -->
|
<!-- MODIFIED -->
|
||||||
<!-- Android 9 message focused bug fix: RelativeLayout focusable="false" -->
|
<!-- 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"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="3dp"
|
android:layout_marginBottom="3dp"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="3dp"
|
||||||
android:layout_marginTop="3dp"
|
android:layout_marginTop="3dp"
|
||||||
android:focusable="false">
|
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
|
<com.stfalcon.chatkit.utils.ShapeImageView
|
||||||
android:id="@id/messageUserAvatar"
|
android:id="@id/messageUserAvatar"
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_marginTop="3dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:layout_marginRight="8dp" />
|
android:layout_marginRight="8dp" />
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ public class LiveChatView extends com.stfalcon.chatkit.messages.MessagesList {
|
|||||||
.apply(ViewUtil.glideOptions())
|
.apply(ViewUtil.glideOptions())
|
||||||
.circleCrop() // resize image
|
.circleCrop() // resize image
|
||||||
.into(imageView));
|
.into(imageView));
|
||||||
mAdapter.setMaxItemsCount(15);
|
mAdapter.setMaxItemsCount(20);
|
||||||
setAdapter(mAdapter);
|
setAdapter(mAdapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,16 +35,17 @@
|
|||||||
android:id="@+id/live_chat"
|
android:id="@+id/live_chat"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/semi_transparent"
|
||||||
app:showIncomingTime="false"
|
app:showIncomingTime="false"
|
||||||
app:isMessageFocusable="false"
|
app:isMessageFocusable="false"
|
||||||
app:incomingDefaultBubbleColor="@color/semi_transparent"
|
app:incomingDefaultBubbleColor="@color/transparent"
|
||||||
app:incomingTextColor="@color/white"
|
app:incomingTextColor="@color/white"
|
||||||
app:incomingBubblePaddingLeft="10sp"
|
app:incomingBubblePaddingLeft="10sp"
|
||||||
app:incomingBubblePaddingRight="10sp"
|
app:incomingBubblePaddingRight="10sp"
|
||||||
app:incomingBubblePaddingTop="3sp"
|
app:incomingBubblePaddingTop="0sp"
|
||||||
app:incomingBubblePaddingBottom="3sp"
|
app:incomingBubblePaddingBottom="0sp"
|
||||||
app:incomingAvatarHeight="25dp"
|
app:incomingAvatarHeight="20dp"
|
||||||
app:incomingAvatarWidth="25dp"
|
app:incomingAvatarWidth="20dp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
Reference in New Issue
Block a user