Bitliker 9 lat temu
rodzic
commit
761eb8faae

+ 0 - 3
WeiChat/src/main/java/com/xzjmyk/pm/activity/adapter/PublicMessageAdapter.java

@@ -1002,7 +1002,6 @@ public class PublicMessageAdapter extends BaseAdapter implements BusinessCircleA
                 ToastUtil.showErrorNet(mContext);
             }
         }, new StringJsonObjectRequest.Listener<Void>() {
-
             @Override
             public void onResponse(ObjectResult<Void> result) {
                 boolean success = Result.defaultParser(mContext, result, true);
@@ -1212,8 +1211,6 @@ public class PublicMessageAdapter extends BaseAdapter implements BusinessCircleA
      */
     @Override
     public void ideChangeFragment() {
-//		stopVoiceIDE();
-
     }
 
 }

+ 241 - 22
WeiChat/src/main/java/com/xzjmyk/pm/activity/adapter/WorkLogAdapter.java

@@ -1,28 +1,87 @@
 package com.xzjmyk.pm.activity.adapter;
 
 import android.content.Context;
+import android.os.Handler;
+import android.os.Message;
+import android.text.SpannableStringBuilder;
+import android.text.TextUtils;
+import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.BaseAdapter;
 import android.widget.ImageView;
+import android.widget.LinearLayout;
 import android.widget.TextView;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.xzjmyk.pm.activity.MyApplication;
 import com.xzjmyk.pm.activity.R;
+import com.xzjmyk.pm.activity.bean.User;
+import com.xzjmyk.pm.activity.bean.circle.Comment;
+import com.xzjmyk.pm.activity.bean.circle.Praise;
 import com.xzjmyk.pm.activity.bean.circle.PublicMessage;
+import com.xzjmyk.pm.activity.helper.AvatarHelper;
+import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
+import com.xzjmyk.pm.activity.util.HtmlUtils;
+import com.xzjmyk.pm.activity.util.LinkMovementClickMethod;
+import com.xzjmyk.pm.activity.util.StringUtils;
+import com.xzjmyk.pm.activity.util.TimeUtils;
 import com.xzjmyk.pm.activity.view.MyListView;
 
+import java.util.HashMap;
 import java.util.List;
 
 /**
  * Created by gongpm on 2016/8/1.
  */
 public class WorkLogAdapter extends BaseAdapter {
+    private static final int PRAISE_WHAT = 0x11;
+    private User user;
     private List<PublicMessage> messages;
     private Context context;
+    private CommentAdapter mAdapter;
+    private int pon;//点赞的对象
+    private Handler handler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            String message = msg.getData().getString("result");
+            Log.i("gongpengming", message);
+            switch (msg.what) {
+                case PRAISE_WHAT:
+                    JSONObject json = JSON.parseObject(message);
+                    if (json.getIntValue("resultCode") != 1) return;
+                    if (json.getString("data") == null) {//为取消点赞
+                        messages.get(pon).setIsPraise(0);
+                        messages.get(pon).setPraise(messages.get(pon).getPraise() - 1);
+                        List<Praise> praises = messages.get(pon).getPraises();
+                        for (int i = 0; i < praises.size(); i++) {
+                            if (praises.get(i).getUserId().equals(MyApplication.getInstance().mLoginUser.getUserId())) {
+                                praises.remove(i);
+                                break;
+                            }
+                        }
+                    } else {//点赞
+                        messages.get(pon).setIsPraise(1);
+                        Praise bean = new Praise();
+                        bean.setNickName(MyApplication.getInstance().mLoginUser.getNickName());
+                        bean.setUserId(MyApplication.getInstance().mLoginUser.getUserId());
+                        bean.setPraiseId(json.getString("data"));
+                        messages.get(pon).getPraises().add(0, bean);
+                        messages.get(pon).setPraise(messages.get(pon).getPraise() + 1);
+                    }
+                    notifyDataSetChanged();
+                    break;
+            }
 
-    public WorkLogAdapter(Context context) {
+        }
+    };
+
+    public WorkLogAdapter(Context context, List<PublicMessage> messages) {
         this.context = context;
+        this.messages = messages;
+        this.user = MyApplication.getInstance().mLoginUser;
     }
 
     public void setData(List<PublicMessage> messages) {
@@ -50,18 +109,15 @@ public class WorkLogAdapter extends BaseAdapter {
         ViewHolder holder;
         if (view == null) {
             holder = new ViewHolder();
-            LayoutInflater.from(context).inflate(R.layout.p_msg_item_main_body, null);
+            view = LayoutInflater.from(context).inflate(R.layout.item_activity_worklogs, null);
             holder.avatar_img = (ImageView) view.findViewById(R.id.avatar_img);
-            holder.operation_more_img = (ImageView) view.findViewById(R.id.operation_more_img);
-
-            holder.nick_name_tv = (TextView) view.findViewById(R.id.nick_name_tv);
-            holder.body_tv = (TextView) view.findViewById(R.id.body_tv);
+            holder.comment_tag = (LinearLayout) view.findViewById(R.id.comment_tag);
+            holder.name_tv = (TextView) view.findViewById(R.id.name_tv);
+            holder.content_tv = (TextView) view.findViewById(R.id.content_tv);
             holder.time_tv = (TextView) view.findViewById(R.id.time_tv);
-            holder.delete_tv = (TextView) view.findViewById(R.id.delete_tv);
-            holder.location_tv = (TextView) view.findViewById(R.id.location_tv);
-            holder.multi_praise_tv = (TextView) view.findViewById(R.id.multi_praise_tv);
-            holder.img_praise_line = view.findViewById(R.id.img_praise_line);
-            holder.command_listView = (MyListView) view.findViewById(R.id.command_listView);
+            holder.like_tv = (TextView) view.findViewById(R.id.like_tv);
+            holder.command_tv = (TextView) view.findViewById(R.id.command_tv);
+            holder.command_lv = (MyListView) view.findViewById(R.id.command_lv);
             view.setTag(holder);
         } else {
             holder = (ViewHolder) view.getTag();
@@ -70,22 +126,185 @@ public class WorkLogAdapter extends BaseAdapter {
         return view;
     }
 
-    private void bindData(ViewHolder holder, int i) {
-        PublicMessage message = messages.get(i);
+    private PublicMessage.Body body;//临时变量
 
+    private void bindData(ViewHolder holder, final int i) {
+        final PublicMessage message = messages.get(i);
+        holder.name_tv.setText(message.getNickName());//名字
+        AvatarHelper.getInstance().displayAvatar(message.getUserId(), holder.avatar_img, false);//头像设置
+        holder.time_tv.setText(TimeUtils.getFriendlyTimeDesc(context, (int) message.getTime()));//时间设置
+        body = message.getBody();
+        String text;
+        if (body == null || body.getText() == null) text = "";
+        else text = body.getText();
+        holder.content_tv.setText(text);
+        final List<Comment> comments = message.getComments();
+        holder.like_tv.setText(message.getPraise() + "");
+        final boolean isPraise = message.getIsPraise() != 1;
+        holder.command_tv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                if (listener == null) return;
+                listener.onClick(i, message.getMessageId(), message.getUserId(), message.getNickName());
+            }
+        });
+        holder.like_tv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                praiseOrCancle(i, isPraise);
+            }
+        });
 
+        if (comments == null || comments.size() <= 0) {
+            holder.comment_tag.setVisibility(View.GONE);
+        }
+        holder.command_tv.setText(comments.size() + "");
+        mAdapter = new CommentAdapter(comments);
+        holder.command_lv.setAdapter(mAdapter);
     }
 
     class ViewHolder {
-        ImageView avatar_img, //头像
-                operation_more_img;//弹出点赞框
-        TextView nick_name_tv,//名字
-                body_tv,//内容
+        ImageView avatar_img; //头像
+        TextView name_tv,//名字
+                content_tv,//内容
                 time_tv, //发表时间
-                delete_tv, //删除按钮
-                location_tv;//地址
-        TextView multi_praise_tv;//点赞
-        View img_praise_line;//线
-        MyListView command_listView;
+                like_tv, //点赞按钮
+                command_tv;//评论
+        MyListView command_lv;
+        LinearLayout comment_tag;
+    }
+
+
+    //评论适配器
+    public class CommentAdapter extends BaseAdapter {
+        private int messagePosition;
+        private List<Comment> datas;
+
+        public CommentAdapter(int messagePosition, List<Comment> datas) {
+            this.messagePosition = messagePosition;
+            this.datas = datas;
+        }
+
+        public CommentAdapter(List<Comment> datas) {
+            this.datas = datas;
+        }
+
+        @Override
+        public int getCount() {
+            return datas.size();
+        }
+
+        @Override
+        public Object getItem(int position) {
+            return position;
+        }
+
+        @Override
+        public long getItemId(int position) {
+            return position;
+        }
+
+        @Override
+        public View getView(final int position, View convertView, ViewGroup parent) {
+            ViewHolder holder = null;
+            if (convertView == null) {
+                holder = new ViewHolder();
+                convertView = LayoutInflater.from(context).inflate(R.layout.p_msg_comment_list_item, null);
+                holder.text_view = (TextView) convertView.findViewById(R.id.text_view);
+                convertView.setTag(holder);
+            } else {
+                holder = (ViewHolder) convertView.getTag();
+            }
+            final Comment comment = datas.get(position);
+            SpannableStringBuilder builder = new SpannableStringBuilder();
+            String showName = comment.getNickName();
+            UserClickableSpan.setClickableSpan(context, builder, showName, comment.getUserId());// 设置评论者的ClickSpanned
+            if (!TextUtils.isEmpty(comment.getToUserId()) && !TextUtils.isEmpty(comment.getToNickname())) {
+                builder.append(context.getString(R.string.replay));
+                String toShowName = comment.getToNickname();
+                UserClickableSpan.setClickableSpan(context, builder, toShowName, comment.getToUserId());// 设置被评论者的ClickSpanned
+            }
+
+            builder.append(":");
+            // 设置评论内容
+            String commentBody = comment.getBody();
+            if (!TextUtils.isEmpty(commentBody)) {
+                commentBody = StringUtils.replaceSpecialChar(comment.getBody());
+                CharSequence charSequence = HtmlUtils.transform200SpanString(commentBody.replaceAll("\n", "\r\n"),
+                        true);
+                builder.append(charSequence);
+            }
+            holder.text_view.setText(builder);
+            holder.text_view.setLinksClickable(true);
+            holder.text_view.setMovementMethod(LinkMovementClickMethod.getInstance());
+            holder.text_view.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    //点击操作
+                    Log.i("gongpengming", "点击了" + comment.getBody());
+//                    if (comment.getUserId().equals(mLoginUserId)) {// 如果消息是我发的,那么就弹出删除和复制的对话框
+//                        showCommentLongClickDialog(messagePosition, position, CommentAdapter.this);
+//                    } else {// 弹出回复的框
+//                        String toShowName = getShowName(comment.getUserId(), comment.getNickName());
+//                        // 懒得写回调的,直接强转,以后如果不适用,可以写个接口回调
+//                        if (context instanceof BusinessCircleActivity) {
+//                            ((BusinessCircleActivity) mContext).showCommentEnterView(messagePosition,
+//                                    comment.getUserId(), comment.getNickName(), toShowName);
+//
+//                        } else {
+//                            ((MainActivity) context).getBusinessCircleFragment().showCommentEnterView(messagePosition,
+//                                    comment.getUserId(), comment.getNickName(), toShowName);
+//                        }
+//                    }
+                }
+            });
+            holder.text_view.setOnLongClickListener(new View.OnLongClickListener() {
+                @Override
+                public boolean onLongClick(View v) {
+
+                    return true;
+                }
+            });
+
+            return convertView;
+        }
+
+        class ViewHolder {
+            TextView text_view;
+        }
+    }
+
+
+    private ButtonViewListener listener;
+
+    public void setButtonViewListener(ButtonViewListener listener) {
+        this.listener = listener;
+    }
+
+    public interface ButtonViewListener {
+        void onClick(int i, String messageId, String userId, String nickName);
+    }
+
+
+    /**
+     * 赞或者取消赞
+     *
+     * @param
+     * @param isPraise
+     */
+    private void praiseOrCancle(final int position, final boolean isPraise) {
+        pon = position;
+        //参数
+        final PublicMessage message = messages.get(position);
+        String requestUrl = null;
+        if (isPraise) {
+            requestUrl = MyApplication.getInstance().getConfig().MSG_PRAISE_ADD;
+        } else {
+            requestUrl = MyApplication.getInstance().getConfig().MSG_PRAISE_DELETE;
+        }
+        HashMap<String, Object> params = new HashMap<>();
+        params.put("access_token", MyApplication.getInstance().mAccessToken);
+        params.put("messageId", message.getMessageId());
+        ViewUtil.httpSendRequest(context, requestUrl, params, handler, null, PRAISE_WHAT, null, null, "get");
     }
 }

+ 88 - 12
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/WorkLogsActivity.java

@@ -5,6 +5,7 @@ import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
 import android.text.TextUtils;
+import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuItem;
@@ -14,10 +15,12 @@ import android.widget.ListView;
 import com.alibaba.fastjson.JSON;
 import com.xzjmyk.pm.activity.MyApplication;
 import com.xzjmyk.pm.activity.R;
-import com.xzjmyk.pm.activity.adapter.PublicMessageAdapter;
+import com.xzjmyk.pm.activity.adapter.WorkLogAdapter;
+import com.xzjmyk.pm.activity.bean.circle.Comment;
 import com.xzjmyk.pm.activity.bean.circle.PublicMessage;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
 import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
+import com.xzjmyk.pm.activity.view.PMsgBottomView;
 import com.xzjmyk.pm.activity.view.SuperSwipeRefreshLayout;
 
 import java.util.ArrayList;
@@ -33,27 +36,39 @@ public class WorkLogsActivity extends BaseActivity {
     private SuperSwipeRefreshLayout root_view;
     private ListView context_rv;
     private List<PublicMessage> mMessages;//消息对象
-
+    private PMsgBottomView bottom_view;
+    private CommentItemChche itemChche;
     private static int requestCode = 0x21;
     public static int resultCode = 0x22;
 
     private final static int LOAD_WHAT = 0x11;//获取消息列表接口
     private final static int ADD_WHAT = 0x12;//添加评论接口
-    private PublicMessageAdapter mAdapter;
+    private WorkLogAdapter mAdapter;
     private Handler handler = new Handler() {
         @Override
         public void handleMessage(Message msg) {
+            progressDialog.dismiss();
             String message = msg.getData().getString("result");
             switch (msg.what) {
                 case LOAD_WHAT:
                     mMessages = JSON.parseArray(JSON.parseObject(message).getJSONArray("data").toString(), PublicMessage.class);
                     upDataUi();
                     break;
+                case ADD_WHAT:
+                    Comment comment = new Comment();
+                    comment.setBody(itemChche.body);
+                    comment.setNickName(MyApplication.getInstance().mLoginUser.getNickName());
+                    comment.setToBody(itemChche.body);
+//                    comment.setToUserId(itemChche.toUserId);
+//                    comment.setNickName(itemChche.toName);
+                    mMessages.get(itemChche.option).getComments().add(comment);
+                    mAdapter.setData(mMessages);
+                    mAdapter.notifyDataSetChanged();
+                    break;
             }
         }
     };
 
-
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -64,13 +79,15 @@ public class WorkLogsActivity extends BaseActivity {
     }
 
     @Override
-    public boolean onContextItemSelected(MenuItem item) {
+    public boolean onOptionsItemSelected(MenuItem item) {
+        Log.i("gongpengming", "onContextItemSelected");
         switch (item.getItemId()) {
             case R.id.add_item:
+                Log.i("gongpengming", " switch (item.getItemId())");
                 startActivityForResult(new Intent(ct, AddLogActivity.class), requestCode);
                 break;
         }
-        return super.onContextItemSelected(item);
+        return super.onOptionsItemSelected(item);
     }
 
     @Override
@@ -91,30 +108,58 @@ public class WorkLogsActivity extends BaseActivity {
 
     //获取数据后更新界面
     private void upDataUi() {
-        if (mAdapter==null)
-        mAdapter = new PublicMessageAdapter(ct, mMessages);
-
+        if (mAdapter == null)
+            mAdapter = new WorkLogAdapter(ct, mMessages);
+        mAdapter.setButtonViewListener(new WorkLogAdapter.ButtonViewListener() {
+            @Override
+            public void onClick(int i, String messageId, String toUserId, String toName) {
+                if (itemChche == null)
+                    itemChche = new CommentItemChche();
+                itemChche.messageId = messageId;
+                itemChche.toName = toName;
+                itemChche.toUserId = toUserId;
+                itemChche.toUserId = toUserId;
+                itemChche.option = i;
+                bottom_view.show();
+            }
+        });
         context_rv.setAdapter(mAdapter);
     }
 
     private void initView() {
+        bottom_view = (PMsgBottomView) findViewById(R.id.bottom_view);
         root_view = (SuperSwipeRefreshLayout) findViewById(R.id.root_view);
         context_rv = (ListView) findViewById(R.id.context_rv);
         root_view.setHeaderView(getHeaderView());
+        bottom_view.setPMsgBottomListener(new PMsgBottomView.PMsgBottomListener() {
+            @Override
+            public void sendText(String text) {
+                //完成输入
+                if (itemChche == null) return;
+                itemChche.body = text;
+                addComment();
+                bottom_view.hide();
+            }
+        });
+        //下拉刷新,上拉加载控件
         root_view.setOnPullRefreshListener(new SuperSwipeRefreshLayout.OnPullRefreshListener() {
             @Override
             public void onRefresh() {
                 //TODO 开始刷新
+                Log.i("gongpengming", "onRefresh");
             }
 
             @Override
             public void onPullDistance(int distance) {
                 //TODO 下拉距离
+                Log.i("gongpengming", "onPullDistance=" + distance);
+
             }
 
             @Override
             public void onPullEnable(boolean enable) {
                 //TODO 下拉过程中,下拉的距离是否足够出发刷新
+                Log.i("gongpengming", "enable=" + enable);
             }
         });
 
@@ -122,7 +167,7 @@ public class WorkLogsActivity extends BaseActivity {
     }
 
     private void initData() {
-        requestSpace(LOAD_WHAT);
+        requestSpace();
     }
 
     /**
@@ -139,7 +184,7 @@ public class WorkLogsActivity extends BaseActivity {
     /**
      * 获取工作日志(朋友圈)数据接口
      */
-    private void requestSpace(int what) {
+    private void requestSpace() {
         //参数
         HashMap<String, Object> params = new HashMap<>();
         params.put("access_token", MyApplication.getInstance().mAccessToken);
@@ -153,6 +198,37 @@ public class WorkLogsActivity extends BaseActivity {
             params.put("messageId", messageId);
         }
         params.put("pageSize", "10");
-        ViewUtil.httpSendRequest(this, mConfig.MSG_LIST, params, handler, null, what, null, null, "get");
+        ViewUtil.httpSendRequest(this, mConfig.MSG_LIST, params, handler, null, LOAD_WHAT, null, null, "get");
+    }
+
+
+    /** 添加一条评论的操作 */
+    /**
+     * 新一条回复
+     */
+    private void addComment() {
+        //参数
+        HashMap<String, Object> params = new HashMap<>();
+        params.put("access_token", MyApplication.getInstance().mAccessToken);
+        if (itemChche == null) return;
+        params.put("messageId", itemChche.messageId);
+//        if (!TextUtils.isEmpty(itemChche.toUserId)) {
+//            params.put("toUserIdtoUserId", itemChche.toUserId);
+//        }
+//        if (!TextUtils.isEmpty(itemChche.toName)) {
+//            params.put("toNickname", itemChche.toName);
+//        }
+        params.put("body", itemChche.body);
+        ViewUtil.httpSendRequest(this, mConfig.MSG_COMMENT_ADD, params, handler, null, ADD_WHAT, null, null, "get");
+    }
+
+
+    class CommentItemChche {
+        private int option;
+        private String messageId;
+        private String toUserId;
+        private String toName;
+        private String body;
+
     }
 }

+ 20 - 6
WeiChat/src/main/res/layout/activity_work_logs.xml

@@ -1,13 +1,27 @@
 <?xml version="1.0" encoding="utf-8"?>
-<com.xzjmyk.pm.activity.view.SuperSwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/root_view"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@color/white">
 
-    <ListView
-        android:id="@+id/context_rv"
+    <com.xzjmyk.pm.activity.view.SuperSwipeRefreshLayout
+        android:id="@+id/root_view"
         android:layout_width="match_parent"
-        android:layout_height="match_parent" />
+        android:layout_height="match_parent">
+
+        <ListView
+            android:id="@+id/context_rv"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:divider="@color/item_line"
+            android:dividerHeight="2px" />
+    </com.xzjmyk.pm.activity.view.SuperSwipeRefreshLayout>
 
-</com.xzjmyk.pm.activity.view.SuperSwipeRefreshLayout>
+    <com.xzjmyk.pm.activity.view.PMsgBottomView
+        android:id="@+id/bottom_view"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:visibility="gone" />
+</RelativeLayout>

+ 32 - 31
WeiChat/src/main/res/layout/item_activity_worklogs.xml

@@ -25,34 +25,26 @@
         android:textSize="@dimen/text_main" />
 
     <TextView
+        android:id="@+id/time_tv"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_alignLeft="@+id/name_tv"
         android:layout_below="@+id/name_tv"
         android:layout_marginTop="5dp"
+        android:gravity="left|top"
         android:text="1月12日 19:40"
         android:textColor="@color/text_hine"
         android:textSize="@dimen/text_hine" />
 
-    <RatingBar
-        android:id="@+id/ratingBar"
-        style="?android:attr/ratingBarStyleSmall"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentRight="true"
-        android:layout_gravity="center_horizontal"
-        android:isIndicator="true"
-        android:numStars="5"
-        android:rating="1"
-        android:stepSize="1" />
-
     <TextView
         android:id="@+id/content_tv"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_below="@+id/avatar_img"
-        android:layout_marginTop="20dp"
+        android:layout_marginTop="10dp"
+        android:layout_toRightOf="@id/avatar_img"
         android:minLines="3" />
+
     <RelativeLayout
         android:id="@+id/client_tag_rl"
         android:layout_width="match_parent"
@@ -61,7 +53,9 @@
         android:layout_marginTop="20dp"
         android:background="@color/item_color1"
         android:gravity="center_vertical"
-        android:padding="5dp">
+        android:padding="5dp"
+        android:visibility="gone">
+
         <TextView
             android:id="@+id/client_tag_tv"
             android:layout_width="wrap_content"
@@ -86,12 +80,13 @@
 
     </RelativeLayout>
 
+
     <LinearLayout
-        android:id="@+id/comment_tag_ll"
+        android:id="@+id/comment_tag"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_below="@+id/client_tag_rl"
-        android:layout_marginTop="20dp"
+        android:layout_marginTop="5dp"
         android:orientation="vertical">
 
         <TextView
@@ -105,39 +100,45 @@
             android:textSize="@dimen/text_hine" />
 
         <com.xzjmyk.pm.activity.view.MyListView
-            android:id="@+id/comment_listview"
+            android:id="@+id/command_lv"
             android:layout_width="match_parent"
             android:layout_height="wrap_content" />
     </LinearLayout>
 
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="2px"
+        android:layout_below="@+id/comment_tag"
+        android:background="@color/item_line" />
+
     <RelativeLayout
-        android:layout_width="wrap_content"
+        android:id="@+id/operate_tag"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_below="@+id/comment_tag_ll"
+        android:layout_below="@+id/comment_tag"
         android:layout_centerHorizontal="true"
-        android:layout_marginTop="20dp"
-        android:background="@drawable/oa_signin_rl">
+        android:layout_marginTop="10dp">
 
         <TextView
             android:id="@+id/like_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="20dp"
-            android:layout_marginRight="20dp"
+            android:layout_marginLeft="50dp"
             android:drawableLeft="@drawable/likes"
             android:gravity="center"
-            android:padding="20dp"
-            android:text="1" />
+            android:padding="10dp"
+            android:text="0" />
 
         <TextView
+            android:id="@+id/command_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_gravity="center"
-            android:layout_marginLeft="20dp"
-            android:layout_marginRight="20dp"
-            android:layout_toRightOf="@id/like_tv"
+            android:layout_alignParentRight="true"
+            android:layout_marginRight="50dp"
             android:drawableLeft="@drawable/operate_more"
-            android:padding="20dp"
-            android:text="1" />
+            android:padding="10dp"
+            android:text="0" />
     </RelativeLayout>
+
+
 </RelativeLayout>

+ 0 - 1
WeiChat/src/main/res/layout/p_msg_item_main_body.xml

@@ -32,7 +32,6 @@
             android:textColor="@color/text_main"
             android:textSize="@dimen/text_main"
             android:textStyle="bold" />
-
         <TextView
             android:id="@+id/body_tv"
             android:layout_width="wrap_content"