Commit 9083a428 by 霍志良

feat:UI修改

parent c34b87c1
...@@ -51,16 +51,18 @@ public class MsgViewHolderText extends MsgViewHolderBase { ...@@ -51,16 +51,18 @@ public class MsgViewHolderText extends MsgViewHolderBase {
private void layoutDirection() { private void layoutDirection() {
if (isReceivedMessage()) { if (isReceivedMessage()) {
avatarRight.setVisibility(View.INVISIBLE);
bodyTextView.setTextColor(context.getResources().getColor(R.color.im_color_242424)); bodyTextView.setTextColor(context.getResources().getColor(R.color.im_color_242424));
bodyTextView.setBackgroundResource(NimUIKitImpl.getOptions().messageLeftBackground); bodyTextView.setBackgroundResource(NimUIKitImpl.getOptions().messageLeftBackground);
bodyTextView.setPadding(ScreenUtil.dip2px(13), ScreenUtil.dip2px(7), ScreenUtil.dip2px(13), ScreenUtil.dip2px(7)); bodyTextView.setPadding(ScreenUtil.dip2px(13), ScreenUtil.dip2px(7), ScreenUtil.dip2px(13), ScreenUtil.dip2px(7));
} else { } else {
avatarLeft.setVisibility(View.INVISIBLE);
bodyTextView.setTextColor(context.getResources().getColor(R.color.white)); bodyTextView.setTextColor(context.getResources().getColor(R.color.white));
bodyTextView.setBackgroundResource(NimUIKitImpl.getOptions().messageRightBackground); bodyTextView.setBackgroundResource(NimUIKitImpl.getOptions().messageRightBackground);
bodyTextView.setPadding(ScreenUtil.dip2px(13), ScreenUtil.dip2px(7), ScreenUtil.dip2px(13), ScreenUtil.dip2px(7)); bodyTextView.setPadding(ScreenUtil.dip2px(13), ScreenUtil.dip2px(7), ScreenUtil.dip2px(13), ScreenUtil.dip2px(7));
} }
int textWidth = RxDeviceTool.getScreenWidth(context) - RxImageTool.dp2px(122f); /* int textWidth = RxDeviceTool.getScreenWidth(context) - RxImageTool.dp2px(122f);
bodyTextView.setMaxWidth(textWidth); bodyTextView.setMaxWidth(textWidth);*/
} }
@Override @Override
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
android:layout_width="110dp" android:layout_width="110dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_8" android:layout_marginTop="@dimen/platform_dp_8"
android:layout_marginEnd="@dimen/platform_dp_12" android:layout_marginEnd="@dimen/platform_dp_9"
android:layout_marginBottom="@dimen/platform_dp_16" android:layout_marginBottom="@dimen/platform_dp_16"
android:background="@drawable/im_background_18dp_ebebeb" android:background="@drawable/im_background_18dp_ebebeb"
android:enabled="false" android:enabled="false"
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
android:includeFontPadding="false" android:includeFontPadding="false"
android:lineSpacingExtra="3dip" android:lineSpacingExtra="3dip"
android:minHeight="40dp" android:minHeight="40dp"
android:maxWidth="263dp"
android:textColor="@color/im_color_242424" android:textColor="@color/im_color_242424"
android:textSize="17dp"/> android:textSize="17dp"/>
</LinearLayout> </LinearLayout>
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