Commit ca213269 by 霍志良

feat:UI修改

parent b0253549
...@@ -47,11 +47,11 @@ public class MsgViewHolderLingxiFirstQuestion extends MsgViewHolderBase { ...@@ -47,11 +47,11 @@ public class MsgViewHolderLingxiFirstQuestion extends MsgViewHolderBase {
contentContainer.postDelayed(new Runnable() { contentContainer.postDelayed(new Runnable() {
@Override @Override
public void run() { public void run() {
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams( contentContainer.getWidth(), FrameLayout.LayoutParams params = new FrameLayout.LayoutParams( content_width.getWidth(),
(contentContainer.getHeight()/15)*13); (content_width.getWidth()/15)*13);
imageView.setLayoutParams(params); imageView.setLayoutParams(params);
imageView.invalidate(); imageView.postInvalidate();
imageView.requestLayout(); // imageView.requestLayout();
} }
},200); },200);
......
...@@ -62,6 +62,7 @@ public abstract class MsgViewHolderBase extends RecyclerViewHolder<BaseMultiItem ...@@ -62,6 +62,7 @@ public abstract class MsgViewHolderBase extends RecyclerViewHolder<BaseMultiItem
public HeadImageView avatarRight; public HeadImageView avatarRight;
public ImageView nameIconView; public ImageView nameIconView;
protected FrameLayout content_width;
protected TextView audioRightSmallTip; protected TextView audioRightSmallTip;
protected TextView audioLeftSmallTip; protected TextView audioLeftSmallTip;
...@@ -195,6 +196,7 @@ public abstract class MsgViewHolderBase extends RecyclerViewHolder<BaseMultiItem ...@@ -195,6 +196,7 @@ public abstract class MsgViewHolderBase extends RecyclerViewHolder<BaseMultiItem
audioRightSmallTip = findViewById(R.id.audio_right_small_tip); audioRightSmallTip = findViewById(R.id.audio_right_small_tip);
audioLeftSmallTip = findViewById(R.id.audio_left_small_tip); audioLeftSmallTip = findViewById(R.id.audio_left_small_tip);
content_width = findViewById(R.id.content_width);
// 这里只要inflate出来后加入一次即可 // 这里只要inflate出来后加入一次即可
if (contentContainer.getChildCount() == 0) { if (contentContainer.getChildCount() == 0) {
......
...@@ -111,6 +111,7 @@ ...@@ -111,6 +111,7 @@
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:id="@+id/content_width"
android:layout_below="@id/message_item_name_layout" android:layout_below="@id/message_item_name_layout"
android:layout_toStartOf="@id/message_item_portrait_right" android:layout_toStartOf="@id/message_item_portrait_right"
android:layout_toEndOf="@id/message_item_portrait_left"> android:layout_toEndOf="@id/message_item_portrait_left">
......
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