Browse Source

更新包名 4-28

LiuJie 10 years ago
parent
commit
a912f53ece
72 changed files with 849 additions and 315 deletions
  1. 21 4
      WeiChat/src/main/java/com/sk/weichat/db/dao/ChatMessageDao.java
  2. 29 14
      WeiChat/src/main/java/com/sk/weichat/ui/MainActivity.java
  3. 20 1
      WeiChat/src/main/java/com/sk/weichat/ui/erp/activity/CompanyContactsActivity.java
  4. 5 1
      WeiChat/src/main/java/com/sk/weichat/ui/erp/activity/NewsTwoActivity.java
  5. 12 7
      WeiChat/src/main/java/com/sk/weichat/ui/erp/activity/NoticesActivity.java
  6. 4 8
      WeiChat/src/main/java/com/sk/weichat/ui/erp/activity/SaleSelectActivity.java
  7. 13 8
      WeiChat/src/main/java/com/sk/weichat/ui/erp/fragment/LinksManFragment.java
  8. 0 2
      WeiChat/src/main/java/com/sk/weichat/ui/erp/fragment/WorksFragment.java
  9. 3 5
      WeiChat/src/main/java/com/sk/weichat/ui/erp/view/MasterDialog.java
  10. 0 1
      WeiChat/src/main/java/com/sk/weichat/ui/me/MeFragment.java
  11. 91 27
      WeiChat/src/main/java/com/sk/weichat/ui/message/ChatActivity.java
  12. 76 15
      WeiChat/src/main/java/com/sk/weichat/ui/message/MucChatActivity.java
  13. 4 1
      WeiChat/src/main/java/com/sk/weichat/ui/message/SelectMessageWindow.java
  14. 1 1
      WeiChat/src/main/java/com/sk/weichat/util/Constants.java
  15. 2 2
      WeiChat/src/main/java/com/sk/weichat/util/SmileyParser.java
  16. 3 1
      WeiChat/src/main/java/com/sk/weichat/view/ChatBottomView.java
  17. 59 10
      WeiChat/src/main/java/com/sk/weichat/view/ChatContentView.java
  18. 33 0
      WeiChat/src/main/java/com/sk/weichat/view/RoundCornerImageView.java
  19. 75 0
      WeiChat/src/main/java/com/sk/weichat/view/XORView.java
  20. BIN
      WeiChat/src/main/res/drawable-hdpi/delete.png
  21. BIN
      WeiChat/src/main/res/drawable-hdpi/tab_found_press_u.png
  22. BIN
      WeiChat/src/main/res/drawable-hdpi/tab_job_press_u.png
  23. BIN
      WeiChat/src/main/res/drawable-hdpi/tab_me_press_u.png
  24. BIN
      WeiChat/src/main/res/drawable-hdpi/tab_smile_press_u.png
  25. BIN
      WeiChat/src/main/res/drawable-hdpi/to_back.png
  26. 0 0
      WeiChat/src/main/res/drawable-xhdpi/chat_bg_blue_press.9.png
  27. BIN
      WeiChat/src/main/res/drawable-xhdpi/tab_found_press_u.png
  28. BIN
      WeiChat/src/main/res/drawable-xhdpi/tab_job_press_u.png
  29. BIN
      WeiChat/src/main/res/drawable-xhdpi/tab_me_press_u.png
  30. BIN
      WeiChat/src/main/res/drawable-xhdpi/tab_smile_press_u.png
  31. BIN
      WeiChat/src/main/res/drawable-xxhdpi/chat_bg_blue_press.9.png
  32. BIN
      WeiChat/src/main/res/drawable-xxhdpi/tab_found_press_u.png
  33. BIN
      WeiChat/src/main/res/drawable-xxhdpi/tab_job_press_u.png
  34. BIN
      WeiChat/src/main/res/drawable-xxhdpi/tab_me_press_u.png
  35. BIN
      WeiChat/src/main/res/drawable-xxhdpi/tab_smile_press_u.png
  36. 2 1
      WeiChat/src/main/res/drawable/tab_interview.xml
  37. 2 1
      WeiChat/src/main/res/drawable/tab_more.xml
  38. 18 13
      WeiChat/src/main/res/layout/act_news_list.xml
  39. 12 6
      WeiChat/src/main/res/layout/act_notice_list.xml
  40. 1 1
      WeiChat/src/main/res/layout/activity_basic_info.xml
  41. 5 5
      WeiChat/src/main/res/layout/activity_setting.xml
  42. 3 4
      WeiChat/src/main/res/layout/activity_splash.xml
  43. 46 14
      WeiChat/src/main/res/layout/chat.xml
  44. 15 5
      WeiChat/src/main/res/layout/chat_from_item_card.xml
  45. 15 5
      WeiChat/src/main/res/layout/chat_from_item_file.xml
  46. 17 6
      WeiChat/src/main/res/layout/chat_from_item_gif.xml
  47. 26 15
      WeiChat/src/main/res/layout/chat_from_item_image.xml
  48. 15 5
      WeiChat/src/main/res/layout/chat_from_item_location.xml
  49. 19 11
      WeiChat/src/main/res/layout/chat_from_item_text.xml
  50. 14 4
      WeiChat/src/main/res/layout/chat_from_item_video.xml
  51. 21 10
      WeiChat/src/main/res/layout/chat_from_item_voice.xml
  52. 15 5
      WeiChat/src/main/res/layout/chat_to_item_card.xml
  53. 15 5
      WeiChat/src/main/res/layout/chat_to_item_file.xml
  54. 15 5
      WeiChat/src/main/res/layout/chat_to_item_gif.xml
  55. 15 5
      WeiChat/src/main/res/layout/chat_to_item_image.xml
  56. 15 5
      WeiChat/src/main/res/layout/chat_to_item_location.xml
  57. 14 4
      WeiChat/src/main/res/layout/chat_to_item_text.xml
  58. 15 5
      WeiChat/src/main/res/layout/chat_to_item_video.xml
  59. 15 5
      WeiChat/src/main/res/layout/chat_to_item_voice.xml
  60. 10 10
      WeiChat/src/main/res/layout/fragment_me.xml
  61. 8 8
      WeiChat/src/main/res/layout/fragment_works.xml
  62. 1 1
      WeiChat/src/main/res/layout/from_leave_view.xml
  63. 4 4
      WeiChat/src/main/res/layout/headview_cantacts_menus.xml
  64. 1 2
      WeiChat/src/main/res/layout/item_weixin_listview.xml
  65. 1 1
      WeiChat/src/main/res/layout/layout_data_load.xml
  66. 19 5
      WeiChat/src/main/res/layout/message_dialog.xml
  67. 1 1
      WeiChat/src/main/res/layout/p_msg_item_main_body.xml
  68. 1 1
      WeiChat/src/main/res/values/colors.xml
  69. 1 0
      WeiChat/src/main/res/values/dimens.xml
  70. 1 1
      build.gradle
  71. 0 13
      libbdupdatesdk/src/androidTest/java/com/example/administrator/libbdupdatesdk/ApplicationTest.java
  72. 0 15
      libbdupdatesdk/src/test/java/com/example/administrator/libbdupdatesdk/ExampleUnitTest.java

+ 21 - 4
WeiChat/src/main/java/com/sk/weichat/db/dao/ChatMessageDao.java

@@ -9,7 +9,6 @@ import com.j256.ormlite.dao.Dao;
 import com.j256.ormlite.stmt.QueryBuilder;
 import com.j256.ormlite.stmt.UpdateBuilder;
 import com.j256.ormlite.table.DatabaseTableConfig;
-import com.j256.ormlite.table.TableUtils;
 import com.sk.weichat.BuildConfig;
 import com.sk.weichat.MyApplication;
 import com.sk.weichat.bean.message.ChatMessage;
@@ -19,6 +18,7 @@ import com.sk.weichat.db.UnlimitDaoManager;
 import com.sk.weichat.util.TimeUtils;
 
 import java.sql.SQLException;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -60,7 +60,7 @@ public class ChatMessageDao {
         if (mDaoMap.containsKey(tableName)) {
             return mDaoMap.get(tableName);
         }
-        Log.i("table","tableName="+tableName);
+        Log.i("table", "tableName=" + tableName);
         Dao<ChatMessage, Integer> dao = null;
         try {
             DatabaseTableConfig<ChatMessage> config = DatabaseTableConfigUtil.fromClass(mHelper.getConnectionSource(), ChatMessage.class);
@@ -70,7 +70,7 @@ public class ChatMessageDao {
             dao = UnlimitDaoManager.createDao(mHelper.getConnectionSource(), config);
         } catch (SQLException e) {
             e.printStackTrace();
-            Log.i("table", "create table has an exception! 消息表" );
+            Log.i("table", "create table has an exception! 消息表");
         }
         if (dao != null)
             mDaoMap.put(tableName, dao);
@@ -94,9 +94,25 @@ public class ChatMessageDao {
         return false;
     }
 
+    public boolean deleteSingleChatMessage(String ownerId, String friendId, ArrayList<ChatMessage> messages) {
+        Dao<ChatMessage, Integer> dao = getDao(ownerId, friendId);
+        if (dao == null) {
+            return false;
+        }
+        try {
+            List<ChatMessage> chatMessages = dao.queryForEq("packetId", messages.get(0).getPacketId());
+            if (chatMessages != null && chatMessages.size() > 0) {
+                dao.delete(messages);
+                return true;
+            }
+        } catch (SQLException e) {
+            e.printStackTrace();
+        }
+        return false;
+    }
+
     /**
      * 保存一条新的聊天记录
-     *
      */
     public boolean saveNewSingleChatMessage(String ownerId, String friendId, ChatMessage message) {
         Dao<ChatMessage, Integer> dao = getDao(ownerId, friendId);
@@ -204,6 +220,7 @@ public class ChatMessageDao {
 
     /**
      * OK 取与某人的聊天记录
+     *
      * @param mMinId   大于此ID
      * @param pageSize 查询几条数据
      * @return

+ 29 - 14
WeiChat/src/main/java/com/sk/weichat/ui/MainActivity.java

@@ -85,7 +85,7 @@ public class MainActivity extends BaseActivity implements NetWorkObserver, AuthS
     public final static String SIP_PASSWORD = "ms_2014_0528@sk!@#";
     public static String HASHCODE = "MainActivity";
     public static final String TIME_MAIN = "TIMEMAIN";
-    public static long timeMin=-1;
+    public static long timeMin = -1;
     public static boolean isUnReadWork;   //判断我的空间是否有新内容
     public final static int SIP_SERVER_PORT = 5060;// 端口
     public final static String EXTRAT_SIP_SESSION_ID = "SipSession";
@@ -130,6 +130,7 @@ public class MainActivity extends BaseActivity implements NetWorkObserver, AuthS
     private boolean isPause = true;// 界面是否暂停
     private ScreenListener screenListener;//锁屏开屏监听
     private int mRetryCheckDelay = 0;
+    public static int UPDATA_LIST = 101;
     private Handler mUserCheckHander = new Handler() {
         public void handleMessage(Message msg) {
             if (msg.what == MSG_USER_CHECK) {
@@ -157,11 +158,26 @@ public class MainActivity extends BaseActivity implements NetWorkObserver, AuthS
         }
     };
 
+    /**
+     * 启动返回
+     * by gongpm
+     */
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (UPDATA_LIST == requestCode){
+            if (mBusinessCircleFragment!=null){
+                mBusinessCircleFragment.onResult();
+            }
+        }
+
+    }
 
 
-    private void hineColor(){
+    private void hineColor() {
 
     }
+
     /**
      * @desc:主页菜单入口
      * @author:Administrator on 2016/1/26 10:03
@@ -217,13 +233,14 @@ public class MainActivity extends BaseActivity implements NetWorkObserver, AuthS
     private AppConfig config;
     private String mLoginUserId;
 
-    public void changeRedZone(boolean b){
-        if (b){
+    public void changeRedZone(boolean b) {
+        if (b) {
             unWorkReadTV.setVisibility(View.VISIBLE);
-        }else {
+        } else {
             unWorkReadTV.setVisibility(View.GONE);
         }
     }
+
     private void requestMyBusiness() {
         if (config == null) {
             config = MyApplication.getInstance().getConfig();
@@ -247,15 +264,15 @@ public class MainActivity extends BaseActivity implements NetWorkObserver, AuthS
                 if (success) {
                     List<CircleMessage> datas = result.getData();
                     if (datas != null && datas.size() > 0) { // 没有更多数据
-                        long newTime=datas.get(0).getTime();  //获取最新时间
-                        long oldTime= PreferenceUtils.getLong(mContext, TIME_MAIN); //获取以前时间
+                        long newTime = datas.get(0).getTime();  //获取最新时间
+                        long oldTime = PreferenceUtils.getLong(mContext, TIME_MAIN); //获取以前时间
 
-                        if (newTime>oldTime){//当有新消息
-                            Log.i("gongpengming","newTime="+newTime+"@@@ oldTime="+oldTime);
+                        if (newTime > oldTime) {//当有新消息
+                            Log.i("gongpengming", "newTime=" + newTime + "@@@ oldTime=" + oldTime);
                             unWorkReadTV.setVisibility(View.VISIBLE);
-                            timeMin=newTime;
+                            timeMin = newTime;
                             isUnReadWork = true;
-                        }else{
+                        } else {
                             unWorkReadTV.setVisibility(View.GONE);
                             isUnReadWork = false;
                         }
@@ -391,7 +408,6 @@ public class MainActivity extends BaseActivity implements NetWorkObserver, AuthS
         getSupportActionBar().setDisplayHomeAsUpEnabled(false);
         /**@注释:主页布局文件 */
         setContentView(R.layout.activity_main);
-
         SIP_USERNAME = MyApplication.getInstance().mLoginUser.getUserId();
         String host = mConfig.MeetingHost;
         SIP_DOMAIN = host == null ? "120.24.211.24" : host;
@@ -405,12 +421,11 @@ public class MainActivity extends BaseActivity implements NetWorkObserver, AuthS
             Log.i("MainActivity", "关闭百度推送");
             PushManager.stopWork(this);
         }
-        mActivityManager = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
+        mActivityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
         if (savedInstanceState != null) {
             restoreState(savedInstanceState);
         }
         initView(savedInstanceState);//---
-
         // 注册网络改变回调
         MyApplication.getInstance().registerNetWorkObserver(this);
         //更新版本

+ 20 - 1
WeiChat/src/main/java/com/sk/weichat/ui/erp/activity/CompanyContactsActivity.java

@@ -33,6 +33,7 @@ import com.sk.weichat.MyApplication;
 import com.sk.weichat.R;
 import com.sk.weichat.bean.Friend;
 import com.sk.weichat.db.dao.FriendDao;
+import com.sk.weichat.ui.MainActivity;
 import com.sk.weichat.ui.base.BaseActivity;
 import com.sk.weichat.ui.erp.db.DBManager;
 import com.sk.weichat.ui.erp.entity.EmployeesEntity;
@@ -361,7 +362,7 @@ public class CompanyContactsActivity extends BaseActivity {
                     break;
                 case Constants.APP_SOCKETIMEOUTEXCEPTION:
                     String exception = msg.getData().getString("result");
-                    com.sk.weichat.ui.erp.net.ViewUtil.ToastMessage(ct,exception);
+                    com.sk.weichat.ui.erp.net.ViewUtil.ToastMessage(ct, exception);
                     com.sk.weichat.ui.erp.net.ViewUtil.AutoLoginErp(ct);
                     reScrollView.onRefreshComplete();
                     break;
@@ -384,6 +385,23 @@ public class CompanyContactsActivity extends BaseActivity {
         initView();
     }
 
+    @Override
+    protected void onPause() {
+        super.onPause();
+    }
+
+    @Override
+    protected void onStop() {
+        super.onStop();
+    }
+
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        setResult(MainActivity.UPDATA_LIST);
+
+    }
+
     private void initView() {
         initListener();
         mHandler.sendEmptyMessage(UPDATE_CHANGE_MASTER);
@@ -788,6 +806,7 @@ public class CompanyContactsActivity extends BaseActivity {
             ModelItem item = null;
             if (convertView == null) {
                 item = new ModelItem();
+
                 convertView = inflater.inflate(R.layout.item_staff_tree, parent, false);
                 item.iv_falg = (ImageView) convertView.findViewById(R.id.iv_item_falg);
                 item.tv_name = (TextView) convertView.findViewById(R.id.tv_name);

+ 5 - 1
WeiChat/src/main/java/com/sk/weichat/ui/erp/activity/NewsTwoActivity.java

@@ -14,6 +14,7 @@ import android.widget.AdapterView;
 import android.widget.AdapterView.OnItemClickListener;
 import android.widget.BaseAdapter;
 import android.widget.ImageView;
+import android.widget.ProgressBar;
 import android.widget.TextView;
 
 import com.alibaba.fastjson.JSON;
@@ -44,6 +45,8 @@ import java.util.Map;
 public class NewsTwoActivity extends BaseActivity {
     @ViewInject(R.id.list_news)
     private PullToRefreshListView mlist;
+    @ViewInject(R.id.progress_bar)
+    private ProgressBar progress_bar;
     private CardItemAdapter adapter;
     public EmptyLayout mEmptyLayout;
     private Context ct;
@@ -58,6 +61,7 @@ public class NewsTwoActivity extends BaseActivity {
 
     public void initView() {
         setContentView(R.layout.act_news_list);
+        progress_bar= (ProgressBar) findViewById(R.id.progress_bar);
         ct = this;
         ViewUtils.inject(this);
         TAG = "NewsTwoActivity";
@@ -103,6 +107,7 @@ public class NewsTwoActivity extends BaseActivity {
                     if (adapter == null) {
                         adapter = new CardItemAdapter(ct, newsEntity);
                         mlist.getRefreshableView().setAdapter(adapter);
+                        progress_bar.setVisibility(View.GONE);
                     } else {
                         adapter.notifyDataSetChanged();
                     }
@@ -126,7 +131,6 @@ public class NewsTwoActivity extends BaseActivity {
 
 
     public class CardItemAdapter extends BaseAdapter {
-
         private NewsEntity newsEntities;
         private Context ct;
         private LayoutInflater inflater;

+ 12 - 7
WeiChat/src/main/java/com/sk/weichat/ui/erp/activity/NoticesActivity.java

@@ -12,12 +12,11 @@ import android.widget.AdapterView;
 import android.widget.AdapterView.OnItemClickListener;
 import android.widget.BaseAdapter;
 import android.widget.ImageView;
+import android.widget.ProgressBar;
 import android.widget.TextView;
 
 import com.alibaba.fastjson.JSON;
 import com.handmark.pulltorefresh.library.PullToRefreshListView;
-import com.lidroid.xutils.ViewUtils;
-import com.lidroid.xutils.view.annotation.ViewInject;
 import com.sk.weichat.MyApplication;
 import com.sk.weichat.R;
 import com.sk.weichat.bean.Friend;
@@ -43,8 +42,9 @@ import java.util.Map;
  */
 public class NoticesActivity extends BaseActivity {
 
-    @ViewInject(R.id.list_notice)
+//    @ViewInject(R.id.list_notice)
     private PullToRefreshListView mlist;
+    private ProgressBar progress_bar;
     private EmptyLayout mEmptyLayout;
     private CardItemAdapter adapter;
     private int type;
@@ -53,13 +53,19 @@ public class NoticesActivity extends BaseActivity {
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
+
+        setContentView(R.layout.act_notice_list);
+        mlist= (PullToRefreshListView) findViewById(R.id.list_notice);
+        progress_bar = (ProgressBar) findViewById(R.id.progress_bar);
+
         initView();
         initData();
     }
 
     public void initView() {
-        setContentView(R.layout.act_notice_list);
-        ViewUtils.inject(this);
+
+//        ViewUtils.inject(this);
+
         TAG = "NoticesActivity";
         ct = this;
         getSupportActionBar().setTitle("通知");
@@ -67,10 +73,8 @@ public class NoticesActivity extends BaseActivity {
         mEmptyLayout.setShowEmptyButton(false);
         mEmptyLayout.setShowErrorButton(false);
         mEmptyLayout.setShowLoadingButton(false);
-
         type = getIntent().getIntExtra("type", 0);
         mlist.getRefreshableView().setOnItemClickListener(new OnItemClickListener() {
-
             @Override
             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                 CardItemAdapter.ItemModel model = (CardItemAdapter.ItemModel) view.getTag();
@@ -129,6 +133,7 @@ public class NoticesActivity extends BaseActivity {
                         newsEntity.setData(fiterdata);
                         adapter = new CardItemAdapter(ct, newsEntity);
                         mlist.getRefreshableView().setAdapter(adapter);
+                        progress_bar.setVisibility(View.GONE);
                     } else {
                         adapter.notifyDataSetChanged();
                     }

+ 4 - 8
WeiChat/src/main/java/com/sk/weichat/ui/erp/activity/SaleSelectActivity.java

@@ -339,23 +339,19 @@ public class SaleSelectActivity extends BaseActivity implements OnClickListener
                 }
                 Intent it_detail = null;
                 if ("SignMain".equals(from)) {
-                    Log.i("gongpengming", "" +
-                            "if");
+
                     if ("Ask4Leave".equals(caller)) {
-                        Log.i("gongpengming", "" +
-                                "Ask4Leave");
+
                         it_detail = new Intent(SaleSelectActivity.this,
                                 LeaveActivity.class);
                     }
                     if ("SpeAttendance".equals(caller)) {
-                        Log.i("gongpengming", "" +
-                                "SpeAttendance");
+
                         it_detail = new Intent(SaleSelectActivity.this,
                                 ExtraLeaveActivity.class);
                     }
                     if ("FeePlease!CCSQ".equals(caller)) {
-                        Log.i("gongpengming", "" +
-                                "FeePlease");
+
                         it_detail = new Intent(SaleSelectActivity.this,
                                 TravelActivity.class);
                     }

+ 13 - 8
WeiChat/src/main/java/com/sk/weichat/ui/erp/fragment/LinksManFragment.java

@@ -49,6 +49,7 @@ import com.sk.weichat.sortlist.BaseComparator;
 import com.sk.weichat.sortlist.BaseSortModel;
 import com.sk.weichat.sortlist.PingYinUtil;
 import com.sk.weichat.sortlist.SideBar;
+import com.sk.weichat.ui.MainActivity;
 import com.sk.weichat.ui.base.XutilsFragment;
 import com.sk.weichat.ui.circle.BasicInfoActivity;
 import com.sk.weichat.ui.erp.activity.CommonFragmentActivity;
@@ -64,7 +65,6 @@ import com.sk.weichat.util.ProgressDialogUtil;
 import com.sk.weichat.util.StringUtils;
 import com.sk.weichat.util.TimeUtils;
 import com.sk.weichat.util.ToastUtil;
-import com.sk.weichat.util.ViewAlphaUtil;
 import com.sk.weichat.volley.ArrayResult;
 import com.sk.weichat.volley.ObjectResult;
 import com.sk.weichat.volley.Result;
@@ -106,24 +106,31 @@ public class LinksManFragment extends XutilsFragment implements View.OnClickList
     private Activity mActivity;
     private DBManager manager;
 
-    //接收修改司广播
+    //接收修改F司广播
     private IntentFilter inputFilter;
     private BroadcastReceiver receiver = new BroadcastReceiver() {
         @Override
         public void onReceive(Context context, Intent intent) {
             if ("home".equals(intent.getStringExtra("falg"))) {
+                Log.i("gongpengming","onReceive");
                 upDataFriend();
                 loadData();
-
             }
         }
     };
 
+    public void onResult() {
+        Log.i("gongpengming","onResult");
+        upDataFriend();
+        loadData();
+    }
+
     @Override
     public void onClick(View v) {
         switch (v.getId()) {
             case R.id.my_data_rl:
-                ct.startActivity(new Intent(ct, CompanyContactsActivity.class));
+//                ct.startActivity();
+                ((MainActivity) ct).startActivityForResult(new Intent(ct, CompanyContactsActivity.class), MainActivity.UPDATA_LIST);
                 break;
             case R.id.my_friends_rl:
                 ct.startActivity(new Intent(ct, MyFriendActivity.class));
@@ -133,7 +140,6 @@ public class LinksManFragment extends XutilsFragment implements View.OnClickList
                 break;
             case R.id.local_video_rl:
                 //TODO 在通讯录页面点击商务伙伴时调转页面,待实现
-                Log.i("gongpengmimngIV", "点击了商务圈");
                 ToastUtil.showToast(getActivity(), "抱歉,该功能还未开发");
                 break;
         }
@@ -175,10 +181,10 @@ public class LinksManFragment extends XutilsFragment implements View.OnClickList
 
         String master = CommonUtil.getSharedPreferences(ct, "erp_master"); //待优化   每次都 读取文件耗性能
 
-         List<EmployeesEntity> emList = manager.select_getEmployee(
+        List<EmployeesEntity> emList = manager.select_getEmployee(
                 new String[]{master},
                 "whichsys=?");
-        Log.i("gongpengming","emList.size()="+emList.size()) ;
+        Log.i("gongpengming", "emList.size()=" + emList.size());
         List<Friend> friends = new ArrayList<>();
 
         for (int i = 0; i < emList.size(); i++) {
@@ -224,7 +230,6 @@ public class LinksManFragment extends XutilsFragment implements View.OnClickList
                 boolean success = Result.defaultParser(mActivity, result, false);
                 if (success) {
                     FriendDao.getInstance().addAttentionUsers(mHandler, MyApplication.getInstance().mLoginUser.getUserId(), result.getData(),
-
                             new OnCompleteListener() {
                                 @Override
                                 public void onCompleted() {

+ 0 - 2
WeiChat/src/main/java/com/sk/weichat/ui/erp/fragment/WorksFragment.java

@@ -3,7 +3,6 @@ package com.sk.weichat.ui.erp.fragment;
 import android.content.Context;
 import android.content.Intent;
 import android.os.Bundle;
-import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.ImageView;
@@ -20,7 +19,6 @@ import com.sk.weichat.ui.circle.BusinessCircleActivity;
 import com.sk.weichat.ui.erp.activity.ErpMenActivity;
 import com.sk.weichat.ui.erp.net.ViewUtil;
 import com.sk.weichat.util.PreferenceUtils;
-import com.sk.weichat.util.ViewAlphaUtil;
 import com.sk.weichat.volley.FastVolley;
 
 /**

+ 3 - 5
WeiChat/src/main/java/com/sk/weichat/ui/erp/view/MasterDialog.java

@@ -1,9 +1,5 @@
 package com.sk.weichat.ui.erp.view;
 
-import java.util.ArrayList;
-import java.util.List;
-
-
 import android.app.Dialog;
 import android.content.Context;
 import android.content.DialogInterface;
@@ -23,6 +19,9 @@ import com.sk.weichat.R;
 import com.sk.weichat.ui.erp.model.Master;
 import com.sk.weichat.ui.erp.util.CommonUtil;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * @author LiuJie
  * @功能:自定义的对话框
@@ -97,7 +96,6 @@ public class MasterDialog extends Dialog {
 		}
 		mListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);// 
 		mListView.setOnItemClickListener(new ListView.OnItemClickListener(){
-
 			@Override
 			public void onItemClick(AdapterView<?> parent, View view,
 					int position, long id) {

+ 0 - 1
WeiChat/src/main/java/com/sk/weichat/ui/me/MeFragment.java

@@ -94,7 +94,6 @@ public class MeFragment extends EasyFragment implements View.OnClickListener {
                             });
                     mDialog.show();
                     mDialog.initViewData(mList);
-
                     break;
                 case 3://切换账套登录
                     Map<String, Object> results = FlexJsonUtil.fromJson(msg

+ 91 - 27
WeiChat/src/main/java/com/sk/weichat/ui/message/ChatActivity.java

@@ -20,6 +20,9 @@ import android.util.Log;
 import android.view.KeyEvent;
 import android.view.Menu;
 import android.view.MenuItem;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
 import android.widget.TextView;
 import android.widget.Toast;
 
@@ -90,6 +93,9 @@ public class ChatActivity extends ActionBackActivity
 
     @SuppressWarnings("unused")
     private TextView mAuthStateTipTv;
+    private ImageView tv_none;
+    private ImageView tv_delete;
+    private LinearLayout botton_ll;
     private ChatContentView mChatContentView;
     private ChatBottomView mChatBottomView;
     private AudioManager mAudioManager = null;
@@ -102,7 +108,7 @@ public class ChatActivity extends ActionBackActivity
         public void handleMessage(Message msg) {
             switch (msg.what) {
                 case 5:
-                       Log.i("push",msg.getData().getString("result"));
+                    Log.i("push", msg.getData().getString("result"));
                     break;
             }
         }
@@ -119,6 +125,7 @@ public class ChatActivity extends ActionBackActivity
     private FastVolley mFastVolley;
 
 
+
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.chat);
@@ -156,21 +163,32 @@ public class ChatActivity extends ActionBackActivity
         @Override
         public void onReceive(Context context, Intent intent) {
             Log.d("wang", "接收到广播");
-            if (mChatContentView != null) {
-                int position = intent.getIntExtra(Constants.CHAT_REMOVE_MESSAGE_POSITION, 10000);
-                if (position == 10000) {
-                    return;
+            if (intent.getIntExtra(Constants.CHAT_REMOVE_MESSAGE_FALG, 10000) == 1) {//当广播为删除一个信息时候
+                if (mChatContentView != null) {
+                    int position = intent.getIntExtra(Constants.CHAT_REMOVE_MESSAGE_POSITION, 10000);
+                    if (position == 10000) {
+                        return;
+                    }
+                    ChatMessage message = mChatMessages.get(position);
+                    boolean isSuccess = ChatMessageDao.getInstance().deleteSingleChatMessage(mLoginUserId, mFriend.getUserId(), message);
+                    if (isSuccess) {
+
+                        mChatMessages.remove(position);
+                        mChatContentView.notifyDataSetInvalidated(true);
+                        MsgBroadcast.broadcastMsgUiUpdate(mContext);
+                    } else {
+                        Toast.makeText(mContext, "删除失败", Toast.LENGTH_SHORT).show();
+                    }
                 }
-                ChatMessage message = mChatMessages.get(position);
-                boolean isSuccess = ChatMessageDao.getInstance().deleteSingleChatMessage(mLoginUserId, mFriend.getUserId(), message);
-                if (isSuccess) {
-
-                    mChatMessages.remove(position);
-                    mChatContentView.notifyDataSetInvalidated(true);
-                    MsgBroadcast.broadcastMsgUiUpdate(mContext);
-                } else {
-                    Toast.makeText(mContext, "删除失败", Toast.LENGTH_SHORT).show();
+            } else {//当广播为删除一个信息时候
+                Log.i("gongpengming", "点击更多时候接受到广播");
+                if (botton_ll != null) {
+                    botton_ll.setVisibility(View.VISIBLE);
+                }
+                if (mChatBottomView != null) {
+                    mChatBottomView.setVisibility(View.GONE);
                 }
+
             }
 
         }
@@ -208,9 +226,10 @@ public class ChatActivity extends ActionBackActivity
         mAuthStateTipTv = (TextView) findViewById(R.id.auth_state_tip);
         mChatContentView = (ChatContentView) findViewById(R.id.chat_content_view);
         mChatContentView.setToUserId(mFriend.getUserId());
-
+        tv_delete = (ImageView) findViewById(R.id.tv_delete);
+        tv_none = (ImageView) findViewById(R.id.tv_none);
         mChatContentView.setData(mChatMessages);
-
+        botton_ll = (LinearLayout) findViewById(R.id.botton_ll);
         mChatContentView.setMessageEventListener(this);
         mChatContentView.setRefreshListener(new PullDownListView.RefreshingListener() {
             @Override
@@ -220,6 +239,49 @@ public class ChatActivity extends ActionBackActivity
         });
         mChatBottomView = (ChatBottomView) findViewById(R.id.chat_bottom_view);
         mChatBottomView.setChatBottomListener(this);
+        tv_none.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                if (botton_ll != null) {
+                    botton_ll.setVisibility(View.GONE);
+                }
+                if (mChatBottomView != null) {
+                    mChatBottomView.setVisibility(View.VISIBLE);
+                }
+                mChatContentView.setShowCB(false);
+                mChatContentView.notifyDataSetChanged();
+            }
+        });
+        tv_delete.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                //TODO 确定删除选择聊天记录
+                if (botton_ll != null) {
+                    botton_ll.setVisibility(View.GONE);
+                }
+                if (mChatBottomView != null) {
+                    mChatBottomView.setVisibility(View.VISIBLE);
+                }
+                //点击删除记录时候
+                onDeleteMore();
+            }
+        });
+    }
+
+    private void onDeleteMore() {
+        List<Integer> ints = mChatContentView.getInts();
+        ArrayList<ChatMessage> messages = new ArrayList<>();
+        for (int i = 0; i < ints.size(); i++) {
+            Log.i("gongpengming", "当前i=" + i);
+            messages.add(mChatMessages.get(ints.get(i)));
+        }
+        boolean isSuccess = ChatMessageDao.getInstance().deleteSingleChatMessage(mLoginUserId, mFriend.getUserId(), messages);
+        if (isSuccess) {
+            mChatMessages.removeAll(messages);
+            mChatContentView.notifyDataSetInvalidated(true);
+            MsgBroadcast.broadcastMsgUiUpdate(mContext);
+//            mChatContentView.notifyDataSetChanged();
+        }
     }
 
     private void doBack() {
@@ -251,8 +313,8 @@ public class ChatActivity extends ActionBackActivity
     protected void onDestroy() {
         super.onDestroy();
         mChatBottomView.recordCancel();
-        if (mFastVolley!=null )
-        mFastVolley.cancelAll(FRIEND);
+        if (mFastVolley != null)
+            mFastVolley.cancelAll(FRIEND);
         ListenerManager.getInstance().removeChatMessageListener(this);
         unbindService(mConnection);
         unregisterReceiver(broadcastReceiver);
@@ -371,11 +433,13 @@ public class ChatActivity extends ActionBackActivity
     }
 
     @Override
-    public void onMessageClick(ChatMessage chatMessage) {
+    public void onMessageClick(ChatMessage chatMessage) {//点击消息
+
     }
 
     @Override
-    public void onMessageLongClick(ChatMessage chatMessage) {
+    public void onMessageLongClick(ChatMessage chatMessage) {//张点击
+
     }
 
     @Override
@@ -446,7 +510,7 @@ public class ChatActivity extends ActionBackActivity
                 Log.d("roamer", "sendChatMessage....");
                 mService.sendChatMessage(mFriend.getUserId(), message);
             }
-        }  else {
+        } else {
             Log.d("roamer", "sendChatMessage");
             mService.sendChatMessage(mFriend.getUserId(), message);
             //进行百度推送
@@ -621,7 +685,7 @@ public class ChatActivity extends ActionBackActivity
 
     //TODO 发送卡片
     public void sendCard(String ObjectId) {
-            this.objectId = ObjectId;
+        this.objectId = ObjectId;
 //        ChatMessage message = new ChatMessage();
 //        message.setType(XmppMessage.TYPE_CARD);
 //        message.setFromUserName(mLoginNickName);
@@ -764,7 +828,7 @@ public class ChatActivity extends ActionBackActivity
                     }
                 }
                 mChatMessages.add(0, message);
-                Log.i("table","cardId="+message.getCardId());
+                Log.i("table", "cardId=" + message.getCardId());
             }
         }
 
@@ -878,7 +942,7 @@ public class ChatActivity extends ActionBackActivity
             mChatContentView.notifyDataSetInvalidated(true);
 //            message.setContent(MyApplication.getInstance().mLoginUser.getSex() + "");// 性别
 //            // 0表示女,1表示男
-           // sendMessage(message);
+            // sendMessage(message);
         }
     }
 
@@ -905,17 +969,17 @@ public class ChatActivity extends ActionBackActivity
                 boolean success = Result.defaultParser(mContext, result, true);
                 if (success && result.getData() != null) {
                     User mUser = result.getData();
-                    message.setContent(mUser.getSex()+ "");//   成功时候显示性别
+                    message.setContent(mUser.getSex() + "");//   成功时候显示性别
                     // 0表示女,1表示男
                     sendMessage(message);
                 } else {
-                    message.setContent(-1+ "");//   当失败时候显示保密
+                    message.setContent(-1 + "");//   当失败时候显示保密
                     // 0表示女,1表示男
                     sendMessage(message);
                 }
             }
         }, User.class, params);
-        mFastVolley.addDefaultRequest(FRIEND , request);
+        mFastVolley.addDefaultRequest(FRIEND, request);
     }
 
 

+ 76 - 15
WeiChat/src/main/java/com/sk/weichat/ui/message/MucChatActivity.java

@@ -20,6 +20,9 @@ import android.util.Log;
 import android.view.KeyEvent;
 import android.view.Menu;
 import android.view.MenuItem;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
 import android.widget.TextView;
 import android.widget.Toast;
 
@@ -98,6 +101,7 @@ public class MucChatActivity extends ActionBackActivity
 
         }
     };
+    private LinearLayout botton_ll;
     private CoreService mService;
     private boolean mHasSend = false;// 有没有发送过消息,发送过需要更新界面
     private FastVolley mFastVolley;
@@ -110,7 +114,8 @@ public class MucChatActivity extends ActionBackActivity
     private Friend mFriend;
     private ChatMessage instantMessage;
     private String instantFilePath;// 转发文件传过来的path
-
+    private ImageView tv_none;
+    private ImageView tv_delete;
     private String[] noticeFriendList;
 
     protected void onCreate(Bundle savedInstanceState) {
@@ -162,21 +167,32 @@ public class MucChatActivity extends ActionBackActivity
         @Override
         public void onReceive(Context context, Intent intent) {
             Log.d("wang", "接收到广播");
-            if (mChatContentView != null) {
-                int position = intent.getIntExtra(Constants.CHAT_REMOVE_MESSAGE_POSITION, 10000);
-                if (position == 10000) {
-                    return;
+            if (intent.getIntExtra(Constants.CHAT_REMOVE_MESSAGE_FALG, 10000) == 1) {//当广播为删除一个信息时候
+                if (mChatContentView != null) {
+                    int position = intent.getIntExtra(Constants.CHAT_REMOVE_MESSAGE_POSITION, 10000);
+                    if (position == 10000) {
+                        return;
+                    }
+                    ChatMessage message = mChatMessages.get(position);
+                    boolean isSuccess = ChatMessageDao.getInstance().deleteSingleChatMessage(mLoginUserId, mFriend.getUserId(), message);
+                    if (isSuccess) {
+
+                        mChatMessages.remove(position);
+                        mChatContentView.notifyDataSetInvalidated(true);
+                        MsgBroadcast.broadcastMsgUiUpdate(mContext);
+                    } else {
+                        Toast.makeText(mContext, "删除失败", Toast.LENGTH_SHORT).show();
+                    }
                 }
-                ChatMessage message = mChatMessages.get(position);
-                boolean isSuccess = ChatMessageDao.getInstance().deleteSingleChatMessage(mLoginUserId, mFriend.getUserId(), message);
-                if (isSuccess) {
-
-                    mChatMessages.remove(position);
-                    mChatContentView.notifyDataSetInvalidated(true);
-                    MsgBroadcast.broadcastMsgUiUpdate(mContext);
-                } else {
-                    Toast.makeText(mContext, "删除失败", Toast.LENGTH_SHORT).show();
+            } else {//当广播为删除一个信息时候
+                Log.i("gongpengming", "点击更多时候接受到广播");
+                if (botton_ll != null) {
+                    botton_ll.setVisibility(View.VISIBLE);
+                }
+                if (mChatBottomView != null) {
+                    mChatBottomView.setVisibility(View.GONE);
                 }
+
             }
 
         }
@@ -227,6 +243,8 @@ public class MucChatActivity extends ActionBackActivity
         mChatContentView = (ChatContentView) findViewById(R.id.chat_content_view);
         mChatContentView.setToUserId(mUseId);
         mChatContentView.setData(mChatMessages);
+        tv_delete = (ImageView) findViewById(R.id.tv_delete);
+        tv_none = (ImageView) findViewById(R.id.tv_none);
         mChatContentView.setMessageEventListener(this);
         mChatContentView.setRoomNickName(mFriend.getRoomMyNickName());
         mChatContentView.setRefreshListener(new PullDownListView.RefreshingListener() {
@@ -235,9 +253,52 @@ public class MucChatActivity extends ActionBackActivity
                 loadDatas(false);
             }
         });
-
+        botton_ll = (LinearLayout) findViewById(R.id.botton_ll);
         mChatBottomView = (ChatBottomView) findViewById(R.id.chat_bottom_view);
         mChatBottomView.setChatBottomListener(this);
+        tv_none.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                if (botton_ll != null) {
+                    botton_ll.setVisibility(View.GONE);
+                }
+                if (mChatBottomView != null) {
+                    mChatBottomView.setVisibility(View.VISIBLE);
+                }
+                mChatContentView.setShowCB(false);
+                mChatContentView.notifyDataSetChanged();
+            }
+        });
+        tv_delete.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                //TODO 确定删除选择聊天记录
+                if (botton_ll != null) {
+                    botton_ll.setVisibility(View.GONE);
+                }
+                if (mChatBottomView != null) {
+                    mChatBottomView.setVisibility(View.VISIBLE);
+                }
+                //点击删除记录时候
+                onDeleteMore();
+            }
+        });
+
+    }
+    private void onDeleteMore() {
+        List<Integer> ints = mChatContentView.getInts();
+        ArrayList<ChatMessage> messages = new ArrayList<>();
+        for (int i = 0; i < ints.size(); i++) {
+            Log.i("gongpengming", "当前i=" + i);
+            messages.add(mChatMessages.get(ints.get(i)));
+        }
+        boolean isSuccess = ChatMessageDao.getInstance().deleteSingleChatMessage(mLoginUserId, mFriend.getUserId(), messages);
+        if (isSuccess) {
+            mChatMessages.removeAll(messages);
+            mChatContentView.notifyDataSetInvalidated(true);
+            MsgBroadcast.broadcastMsgUiUpdate(mContext);
+//            mChatContentView.notifyDataSetChanged();
+        }
     }
 
     public void updateUi(String roomName) {

+ 4 - 1
WeiChat/src/main/java/com/sk/weichat/ui/message/SelectMessageWindow.java

@@ -15,7 +15,7 @@ import com.sk.weichat.R;
 import com.sk.weichat.bean.message.XmppMessage;
 
 public class SelectMessageWindow extends PopupWindow {
-	private Button mCopy, mInstant, mCancle, mDelete;
+	private Button mCopy, mInstant, mCancle, mDelete,mMore;
 	private View mMenuView;
 	int type;
 
@@ -47,6 +47,8 @@ public class SelectMessageWindow extends PopupWindow {
 		mInstant = (Button) mMenuView.findViewById(R.id.btn_instant);
 		mCancle = (Button) mMenuView.findViewById(R.id.btn_cancle);
 		mDelete = (Button) mMenuView.findViewById(R.id.btn_delete);
+		mMore = (Button) mMenuView.findViewById(R.id.btn_more);
+
 		this.type = type;
 		hideButton();
 		// 取消按钮
@@ -60,6 +62,7 @@ public class SelectMessageWindow extends PopupWindow {
 		mInstant.setOnClickListener(itemsOnClick);
 		mCancle.setOnClickListener(itemsOnClick);
 		mDelete.setOnClickListener(itemsOnClick);
+		mMore.setOnClickListener(itemsOnClick);
 		// 设置SelectPicPopupWindow的View
 		this.setContentView(mMenuView);
 		// 设置SelectPicPopupWindow弹出窗体的宽

+ 1 - 1
WeiChat/src/main/java/com/sk/weichat/util/Constants.java

@@ -6,7 +6,7 @@ public class Constants {
     public static String INSTANT_SEND="instant_send";//转发
     public static String CHAT_MESSAGE_DELETE_ACTION="chat_message_delete";
     public static String CHAT_MESSAGE_DELETE_FRIENDID="chat_message_delete_friendid";//删除消息要带过去的朋友id
-
+    public static String CHAT_REMOVE_MESSAGE_FALG="CHAT_REMOVE_MESSAGE_FALG";
     public static String CHAT_REMOVE_MESSAGE_POSITION="CHAT_REMOVE_MESSAGE_POSITION";
     public static String ONRECORDSTART="onrecordstart";
     public static String GROUP_JOIN_NOTICE="group_join_notice";//加入新群的通知

+ 2 - 2
WeiChat/src/main/java/com/sk/weichat/util/SmileyParser.java

@@ -77,10 +77,10 @@ public class SmileyParser {
 		private static final int[][] IDS = { { R.drawable.emoji_001, R.drawable.emoji_002, R.drawable.emoji_003, R.drawable.emoji_004,
 				R.drawable.emoji_005, R.drawable.emoji_006, R.drawable.emoji_007, R.drawable.emoji_008, R.drawable.emoji_009, R.drawable.emoji_010,
 				R.drawable.emoji_011, R.drawable.emoji_012, R.drawable.emoji_013, R.drawable.emoji_014, R.drawable.emoji_015, R.drawable.emoji_016,
-				R.drawable.emoji_017, R.drawable.emoji_018, } };
+				R.drawable.emoji_017, R.drawable.emoji_018 }};
 
 		private static final String[][] TEXTS = { { "[微笑]", "[得意]", "[害羞]", "[汗]", "[奸笑]", "[惊呆了]", "[开心]", "[哭]", "[呕吐]", "[亲亲]", "[色眯眯]", "[生病]",
-				"[生气]", "[爽]", "[委屈]", "[严肃]", "[疑问]", "[晕]" } };
+				"[生气]", "[爽]", "[委屈]", "[严肃]", "[疑问]", "[晕]" }   };
 
 		private static final Map<String, Integer> MAPS = new HashMap<String, Integer>();
 		static {

+ 3 - 1
WeiChat/src/main/java/com/sk/weichat/view/ChatBottomView.java

@@ -1,5 +1,6 @@
 package com.sk.weichat.view;
 
+import android.annotation.SuppressLint;
 import android.content.Context;
 import android.os.Handler;
 import android.text.Editable;
@@ -65,6 +66,7 @@ public class ChatBottomView extends LinearLayout implements View.OnClickListener
 		init(context);
 	}
 
+	@SuppressLint("NewApi")
 	public ChatBottomView(Context context, AttributeSet attrs, int defStyle) {
 		super(context, attrs, defStyle);
 		init(context);
@@ -155,7 +157,7 @@ public class ChatBottomView extends LinearLayout implements View.OnClickListener
 				mRecordBtn.setText(R.string.motalk_voice_chat_tip_1);
 				mRecordBtn.setBackgroundResource(R.drawable.im_voice_button_normal);
 				if(timeLen<1){
-					Toast.makeText(mContext, "录音太短了,我还没听清楚呢", 0).show();
+					Toast.makeText(mContext, "录音太短了,我还没听清楚呢", Toast.LENGTH_SHORT).show();
 					return;
 				}
 				if (mBottomListener != null) {

+ 59 - 10
WeiChat/src/main/java/com/sk/weichat/view/ChatContentView.java

@@ -26,6 +26,8 @@ import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.BaseAdapter;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
 import android.widget.FrameLayout;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
@@ -69,6 +71,7 @@ import com.sk.weichat.util.downloadTask;
 import com.sk.weichat.xmpp.listener.ChatMessageListener;
 
 import java.io.File;
+import java.util.ArrayList;
 import java.util.List;
 
 import pl.droidsonroids.gif.GifImageView;
@@ -77,11 +80,11 @@ import pl.droidsonroids.gif.GifImageView;
 public class ChatContentView extends PullDownListView implements OnMediaStateChange {
     private static final String TAG = ChatContentView.class.getSimpleName();
     private Context mContext;
-
+    private ArrayList<Integer> ints;
     /* 根据mLoginUserId和mToUserId 唯一确定一张表 */
     private String mLoginUserId;
     private String mToUserId;
-
+    private boolean isShowCB = false;
     private List<ChatMessage> mChatMessages;
     private MessageEventListener mMessageEventListener;
     private int mDelayTime = 0;
@@ -107,6 +110,23 @@ public class ChatContentView extends PullDownListView implements OnMediaStateCha
         init(context);
     }
 
+    public boolean isShowCB() {
+        return isShowCB;
+    }
+
+    public void setShowCB(boolean showCB) {
+        isShowCB = showCB;
+    }
+
+    public ArrayList<Integer> getInts() {
+        isShowCB=false;
+        return ints;
+    }
+
+    public void setInts(ArrayList<Integer> ints) {
+        this.ints = ints;
+    }
+
     public ChatContentView(Context context, AttributeSet attrs) {
         super(context, attrs);
         init(context);
@@ -331,7 +351,7 @@ public class ChatContentView extends PullDownListView implements OnMediaStateCha
         }
 
         @SuppressLint("NewApi")
-        public View getView(int position, View convertView, ViewGroup parent) {
+        public View getView(final int position, View convertView, ViewGroup parent) {
             final int viewType = getItemViewType(position);
             SystemViewHolder systemViewHolder = null;
             ContentViewHolder contentViewHolder = null;
@@ -476,6 +496,7 @@ public class ChatContentView extends PullDownListView implements OnMediaStateCha
                 if (systemViewHolder != null) {
                     convertView.setTag(R.id.tag_key_list_item_view, systemViewHolder);
                 } else if (contentViewHolder != null) {
+                    contentViewHolder.cb_choose = (CheckBox) convertView.findViewById(R.id.cb_remove);
                     contentViewHolder.time_tv = (TextView) convertView.findViewById(R.id.time_tv);
                     contentViewHolder.chat_head_iv = (ImageView) convertView.findViewById(R.id.chat_head_iv);
                     contentViewHolder.nick_name = (TextView) convertView.findViewById(R.id.nick_name);
@@ -496,8 +517,21 @@ public class ChatContentView extends PullDownListView implements OnMediaStateCha
                 systemViewHolder.chat_content_tv.setText(message.getContent());
                 return convertView;
             }
-
-			/* 是否显示日期 */
+            if (isShowCB) {    //点击更多时候
+                contentViewHolder.cb_choose.setVisibility(VISIBLE);
+                contentViewHolder.cb_choose.setChecked(false);
+                contentViewHolder.cb_choose.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+                    @Override
+                    public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
+                        if (b) {
+                            ints.add(position);
+                        }
+                    }
+                });
+            }else{
+                contentViewHolder.cb_choose.setVisibility(GONE);
+            }
+            /* 是否显示日期 */
             boolean showTime = true;
             if (position >= 1) {
                 ChatMessage prevMessage = mChatMessages.get(position - 1);
@@ -1046,7 +1080,6 @@ public class ChatContentView extends PullDownListView implements OnMediaStateCha
 
         private void setLongClickInterface(final ChatMessage message, View view, final int position) {
             view.setOnLongClickListener(new OnLongClickListener() {
-
                 @Override
                 public boolean onLongClick(View v) {
                     Vibrator vib = (Vibrator) mContext.getSystemService(Service.VIBRATOR_SERVICE);
@@ -1082,8 +1115,8 @@ public class ChatContentView extends PullDownListView implements OnMediaStateCha
 
         //读取下载线程数,如果为空,则单线程下载
         int downloadTN = 2;
-	/*//如果下载文件名为空则获取Url尾为文件名
-	int fileNameStart = url.lastIndexOf("/");
+    /*//如果下载文件名为空则获取Url尾为文件名
+    int fileNameStart = url.lastIndexOf("/");
 	String fileName =  url.substring(fileNameStart);*/
         //启动文件下载线程
         new downloadTask(url, Integer
@@ -1123,14 +1156,30 @@ public class ChatContentView extends PullDownListView implements OnMediaStateCha
                 case R.id.btn_delete:// 删除
                     Toast.makeText(mContext, "已成功删除", Toast.LENGTH_SHORT).show();
               /* if(mChatMessages!=null){
-            	   mChatMessages.remove(position);
+                   mChatMessages.remove(position);
                }*/
                     Intent broadcast = new Intent(Constants.CHAT_MESSAGE_DELETE_ACTION);//发送广播去界面更新
+                    broadcast.putExtra(Constants.CHAT_REMOVE_MESSAGE_FALG, 1);
                     broadcast.putExtra(Constants.CHAT_REMOVE_MESSAGE_POSITION, position);
                     mContext.sendBroadcast(broadcast);
                     break;
                 case R.id.btn_cancle:// 取消
 
+                    break;
+                case R.id.btn_more:// 更多
+                    //TODO 点击更多时候显示选择按钮
+                    if (ints == null) {
+                        ints = new ArrayList<>();
+                    }
+                    ints.clear();
+                    if (mChatContentAdapter != null) {
+                        isShowCB = true;
+                        mChatContentAdapter.notifyDataSetChanged();
+                    }
+                    Intent broadcast1 = new Intent(Constants.CHAT_MESSAGE_DELETE_ACTION);//发送广播去界面更新
+                    broadcast1.putExtra(Constants.CHAT_REMOVE_MESSAGE_FALG, 2);
+                    mContext.sendBroadcast(broadcast1);
+                    Log.i("gongpengming","点击更多");
                     break;
                 default:
                     break;
@@ -1353,7 +1402,7 @@ public class ChatContentView extends PullDownListView implements OnMediaStateCha
     abstract class ContentViewHolder {
         TextView time_tv;
         ImageView chat_head_iv;
-
+        CheckBox cb_choose;
         ProgressBar progress;// 只有From的item有
         ImageView failed_img_view;// 只有From的item有
         TextView nick_name;

+ 33 - 0
WeiChat/src/main/java/com/sk/weichat/view/RoundCornerImageView.java

@@ -0,0 +1,33 @@
+package com.sk.weichat.view;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Path;
+import android.graphics.RectF;
+import android.util.AttributeSet;
+import android.widget.ImageView;
+
+public class RoundCornerImageView extends ImageView {
+    public RoundCornerImageView(Context context) {
+        super(context);
+    }
+
+    public RoundCornerImageView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public RoundCornerImageView(Context context, AttributeSet attrs,
+                                int defStyle) {
+        super(context, attrs, defStyle);
+    }
+
+    @Override
+    protected void onDraw(Canvas canvas) {
+        Path clipPath = new Path();
+        int w = this.getWidth();
+        int h = this.getHeight();
+        clipPath.addRoundRect(new RectF(0, 0, w, h), 10.0f, 10.0f, Path.Direction.CW);
+        canvas.clipPath(clipPath);
+        super.onDraw(canvas);
+    }
+}

+ 75 - 0
WeiChat/src/main/java/com/sk/weichat/view/XORView.java

@@ -0,0 +1,75 @@
+package com.sk.weichat.view;
+
+import android.content.Context;
+import android.graphics.BitmapShader;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Path;
+import android.graphics.RectF;
+import android.graphics.Shader;
+import android.graphics.drawable.BitmapDrawable;
+import android.util.AttributeSet;
+import android.view.View;
+
+import com.sk.weichat.R;
+
+/**
+ * Created by Coder.Yan on 2015/5/21.
+ */
+@SuppressWarnings("deprecation")
+public class XORView extends View {
+    Paint paint;
+    Path path;
+    BitmapShader brush;
+
+
+    public XORView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        paint = new Paint();
+        path = new Path();
+        BitmapDrawable drawable = (BitmapDrawable)getResources().getDrawable(R.drawable.avatar_normal);
+        brush = new BitmapShader(drawable.getBitmap(), Shader.TileMode.REPEAT, Shader.TileMode.REPEAT);
+    }
+
+
+    public XORView(Context context, AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+    }
+
+
+
+
+    @Override
+    protected void onDraw(Canvas canvas) {
+        super.onDraw(canvas);
+        canvas.save();
+        paint.setStyle(Paint.Style.FILL);
+        //paint.setColor(Color.GREEN);
+        paint.setShader(brush);
+        canvas.drawPath(path, paint);
+        paint.reset();
+        paint.setStyle(Paint.Style.STROKE);
+        canvas.drawPath(path, paint);
+        canvas.restore();
+    }
+ 
+    @Override
+    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+        path.reset();
+        int w = getWidth();
+        int h = getHeight();
+        path.moveTo(0,10);
+        path.arcTo(new RectF(0,0,20,20),180,90);
+        path.lineTo(w - 30,0);
+        path.arcTo(new RectF(w - 40, 0, w - 20, 20), -90, 90);
+        path.lineTo(w-20,h/2 -10);
+        path.lineTo(w,h/2);
+        path.lineTo(w-20,h/2 +10);
+        path.lineTo(w-20,h - 10);
+        path.arcTo(new RectF(w-40, h-20,w-20,h-1),0,90);
+        path.lineTo(10,h-1);
+        path.arcTo(new RectF(0,h-20,20,h-1),90,90);
+        path.close();
+    }
+}

BIN
WeiChat/src/main/res/drawable-hdpi/delete.png


BIN
WeiChat/src/main/res/drawable-hdpi/tab_found_press_u.png


BIN
WeiChat/src/main/res/drawable-hdpi/tab_job_press_u.png


BIN
WeiChat/src/main/res/drawable-hdpi/tab_me_press_u.png


BIN
WeiChat/src/main/res/drawable-hdpi/tab_smile_press_u.png


BIN
WeiChat/src/main/res/drawable-hdpi/to_back.png


+ 0 - 0
WeiChat/src/main/res/drawable-hdpi/chat_bg_blue_press.9.png → WeiChat/src/main/res/drawable-xhdpi/chat_bg_blue_press.9.png


BIN
WeiChat/src/main/res/drawable-xhdpi/tab_found_press_u.png


BIN
WeiChat/src/main/res/drawable-xhdpi/tab_job_press_u.png


BIN
WeiChat/src/main/res/drawable-xhdpi/tab_me_press_u.png


BIN
WeiChat/src/main/res/drawable-xhdpi/tab_smile_press_u.png


BIN
WeiChat/src/main/res/drawable-xxhdpi/chat_bg_blue_press.9.png


BIN
WeiChat/src/main/res/drawable-xxhdpi/tab_found_press_u.png


BIN
WeiChat/src/main/res/drawable-xxhdpi/tab_job_press_u.png


BIN
WeiChat/src/main/res/drawable-xxhdpi/tab_me_press_u.png


BIN
WeiChat/src/main/res/drawable-xxhdpi/tab_smile_press_u.png


+ 2 - 1
WeiChat/src/main/res/drawable/tab_interview.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <selector
   xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_enabled="true" android:state_checked="true" android:drawable="@drawable/tab_smile_press_u" />
+    <item android:state_enabled="true" android:state_checked="true"
+        android:drawable="@drawable/tab_smile_press_u" />
     <item android:drawable="@drawable/tab_smile_u" />
 </selector>

+ 2 - 1
WeiChat/src/main/res/drawable/tab_more.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <selector
   xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_enabled="true" android:state_checked="true" android:drawable="@drawable/tab_me_press_u" />
+    <item android:state_enabled="true" android:state_checked="true"
+        android:drawable="@drawable/tab_me_press_u" />
     <item android:drawable="@drawable/tab_me_u" />
 </selector>

+ 18 - 13
WeiChat/src/main/res/layout/act_news_list.xml

@@ -1,16 +1,21 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@drawable/bg_main"
-    android:orientation="vertical" >
-     <com.handmark.pulltorefresh.library.PullToRefreshListView
-      android:id="@+id/list_news"
-      android:layout_width="match_parent"
-      android:layout_height="match_parent"
-      android:divider="@null"
-      android:listSelector="#00000000"
-      android:fadingEdge="none"
-      android:scrollbars="none" >
-  </com.handmark.pulltorefresh.library.PullToRefreshListView>
-</LinearLayout>
+    android:background="@drawable/bg_main">
+
+    <ProgressBar
+        android:id="@+id/progress_bar"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_centerInParent="true" />
+
+    <com.handmark.pulltorefresh.library.PullToRefreshListView
+        android:id="@+id/list_news"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:divider="@null"
+        android:fadingEdge="none"
+        android:listSelector="#00000000"
+        android:scrollbars="none"></com.handmark.pulltorefresh.library.PullToRefreshListView>
+</RelativeLayout>

+ 12 - 6
WeiChat/src/main/res/layout/act_notice_list.xml

@@ -1,8 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical">
+    android:layout_height="match_parent">
+
+    <ProgressBar
+        android:id="@+id/progress_bar"
+        android:layout_width="wrap_content"
+        android:visibility="visible"
+        android:layout_height="wrap_content"
+        android:layout_centerInParent="true" />
+
     <com.handmark.pulltorefresh.library.PullToRefreshListView
         android:id="@+id/list_notice"
         android:layout_width="match_parent"
@@ -12,6 +19,5 @@
 
         android:fadingEdge="none"
         android:listSelector="#00000000"
-        android:scrollbars="none">
-    </com.handmark.pulltorefresh.library.PullToRefreshListView>
-</LinearLayout>
+        android:scrollbars="none"></com.handmark.pulltorefresh.library.PullToRefreshListView>
+</RelativeLayout>

+ 1 - 1
WeiChat/src/main/res/layout/activity_basic_info.xml

@@ -179,7 +179,7 @@
 
         <com.sk.weichat.view.DataLoadView
             android:id="@+id/data_load_view"
-            android:visibility="gone"
+
             android:layout_width="match_parent"
             android:layout_height="match_parent" />
     </RelativeLayout>

+ 5 - 5
WeiChat/src/main/res/layout/activity_setting.xml

@@ -52,7 +52,7 @@
             </RelativeLayout>
             <View
                 android:layout_width="match_parent"
-                android:layout_height="1dp"
+                android:layout_height="@dimen/line"
                 android:background="@color/item_line"/>
             <!--设置关闭推送-->
             <RelativeLayout
@@ -81,7 +81,7 @@
             <!--清除缓存-->
             <View
                 android:layout_width="match_parent"
-                android:layout_height="1dp"
+                android:layout_height="@dimen/line"
                 android:background="@color/item_line"/>
             <RelativeLayout
                 android:id="@+id/clear_cache_rl"
@@ -116,7 +116,7 @@
             </RelativeLayout>
             <View
                 android:layout_width="match_parent"
-                android:layout_height="1dp"
+                android:layout_height="@dimen/line"
                 android:background="@color/item_line"/>
             <RelativeLayout
                 android:id="@+id/use_help_rl"
@@ -142,7 +142,7 @@
             </RelativeLayout>
             <View
                 android:layout_width="match_parent"
-                android:layout_height="1dp"
+                android:layout_height="@dimen/line"
                 android:layout_marginTop="@dimen/line_big"
                 android:background="@color/item_line"/>
             <RelativeLayout
@@ -170,7 +170,7 @@
             </RelativeLayout>
             <View
                 android:layout_width="match_parent"
-                android:layout_height="1dp"
+                android:layout_height="@dimen/line"
                 android:background="@color/item_line"/>
             <RelativeLayout
                 android:clickable="true"

+ 3 - 4
WeiChat/src/main/res/layout/activity_splash.xml

@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="#ff000000">
+    android:layout_height="match_parent">
 
     <FrameLayout
         android:id="@+id/welcome_ly"
@@ -52,8 +51,8 @@
             android:shadowDx="1.2"
             android:shadowDy="1.2"
             android:shadowRadius="1.0"
-            android:visibility="gone"
-            android:text="@string/register" />
+            android:text="@string/register"
+            android:visibility="gone" />
     </RelativeLayout>
 
 </FrameLayout>

+ 46 - 14
WeiChat/src/main/res/layout/chat.xml

@@ -2,14 +2,14 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/root_view"
     android:layout_width="fill_parent"
-    android:orientation="vertical"
     android:layout_height="fill_parent"
-    android:background="@drawable/bg_main" >
-   
+    android:background="@drawable/bg_main"
+    android:orientation="vertical">
+
     <RelativeLayout
         android:layout_width="fill_parent"
         android:layout_height="fill_parent"
-        android:orientation="vertical" >
+        android:orientation="vertical">
 
         <TextView
             android:id="@+id/auth_state_tip"
@@ -25,22 +25,54 @@
             android:id="@+id/chat_content_view"
             android:layout_width="fill_parent"
             android:layout_height="fill_parent"
-            android:background="@drawable/bg_main"
-            android:layout_above="@+id/chat_bottom_view"
+            android:layout_above="@+id/bottom_fl"
             android:layout_below="@+id/auth_state_tip"
+            android:background="@drawable/bg_main"
             android:cacheColorHint="#00000000"
             android:divider="#00000000"
             android:fadingEdge="none" />
 
-        <com.sk.weichat.view.ChatBottomView
-            android:id="@+id/chat_bottom_view"
-            android:layout_width="fill_parent"
+        <FrameLayout
+            android:id="@+id/bottom_fl"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_alignParentBottom="true"
-            android:cacheColorHint="#6c7eb7"
-            android:divider="#6c7eb7"
-            android:background="@color/bg_main"
-            android:fadingEdge="none" />
+            android:layout_alignParentBottom="true">
+
+            <com.sk.weichat.view.ChatBottomView
+                android:id="@+id/chat_bottom_view"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:background="@color/bg_main"
+                android:cacheColorHint="#6c7eb7"
+                android:divider="#6c7eb7"
+                android:fadingEdge="none" />
+
+            <LinearLayout
+                android:id="@+id/botton_ll"
+                android:layout_width="match_parent"
+                android:layout_height="30dp"
+                android:orientation="horizontal"
+                android:background="@color/item_color1"
+                android:visibility="gone">
+
+                <ImageView
+                    android:id="@+id/tv_delete"
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="1"
+                    android:clickable="true"
+                    android:src="@drawable/delete" />
+
+                <ImageView
+                    android:id="@+id/tv_none"
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="1"
+                    android:clickable="true"
+                    android:src="@drawable/to_back" />
+            </LinearLayout>
+
+        </FrameLayout>
     </RelativeLayout>
 
 </LinearLayout>

+ 15 - 5
WeiChat/src/main/res/layout/chat_from_item_card.xml

@@ -1,18 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical" >
+    >
 
     <TextView
+        android:layout_centerHorizontal="true"
         android:id="@+id/time_tv"
         style="@style/ChattingUISystem"
         android:layout_gravity="center_horizontal"
         android:layout_marginTop="5dp"
         android:background="@drawable/chatsystem_bg"
         android:gravity="center" />
-
+    <CheckBox
+        android:id="@+id/cb_remove"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentRight="true"
+        android:layout_below="@+id/time_tv"
+        android:layout_marginTop="15dp"
+        android:visibility="gone"/>
     <RelativeLayout
+        android:layout_below="@+id/time_tv"
+        android:layout_toLeftOf="@+id/cb_remove"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:gravity="right"
@@ -48,7 +58,7 @@
                 android:layout_height="70dp"
                 android:layout_alignParentRight="true"
                 android:layout_alignParentTop="true"
-                android:background="@drawable/chat_from_warp_bg"
+                android:background="@drawable/chat_bg_blue_press"
                 android:clickable="true"
                 android:focusable="true"
                 android:gravity="center" >
@@ -118,4 +128,4 @@
         </RelativeLayout>
     </RelativeLayout>
 
-</LinearLayout>
+</RelativeLayout>

+ 15 - 5
WeiChat/src/main/res/layout/chat_from_item_file.xml

@@ -1,18 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical" >
+ >
 
     <TextView
         android:id="@+id/time_tv"
         style="@style/ChattingUISystem"
         android:layout_gravity="center_horizontal"
         android:layout_marginTop="5dp"
+		android:layout_centerHorizontal="true"
         android:background="@drawable/chatsystem_bg"
         android:gravity="center" />
-
+	<CheckBox
+		android:id="@+id/cb_remove"
+		android:layout_width="wrap_content"
+		android:layout_height="wrap_content"
+		android:layout_alignParentRight="true"
+		android:layout_below="@+id/time_tv"
+		android:layout_marginTop="15dp"
+		android:visibility="gone"/>
     <RelativeLayout
+		android:layout_below="@+id/time_tv"
+		android:layout_toLeftOf="@+id/cb_remove"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:gravity="right"
@@ -49,7 +59,7 @@
                 	android:layout_height="70dp"
                 	android:layout_alignParentRight="true"
                 	android:layout_alignParentTop="true"
-                	android:background="@drawable/chat_from_warp_bg"
+                	android:background="@drawable/chat_bg_blue_press"
                 	android:clickable="true"
                 	android:focusable="true"
                 	android:gravity="center" 
@@ -103,4 +113,4 @@
         </RelativeLayout>
     </RelativeLayout>
 
-</LinearLayout>
+</RelativeLayout>

+ 17 - 6
WeiChat/src/main/res/layout/chat_from_item_gif.xml

@@ -1,23 +1,34 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="vertical" >
+    android:layout_height="wrap_content">
 
     <TextView
         android:id="@+id/time_tv"
         style="@style/ChattingUISystem"
+        android:layout_centerHorizontal="true"
         android:layout_gravity="center_horizontal"
         android:layout_marginTop="5dp"
         android:background="@drawable/chatsystem_bg"
         android:gravity="center" />
 
+    <CheckBox
+        android:id="@+id/cb_remove"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentRight="true"
+        android:layout_below="@+id/time_tv"
+        android:layout_marginTop="15dp"
+        android:visibility="gone" />
+
     <RelativeLayout
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
+        android:layout_below="@+id/time_tv"
+        android:layout_toLeftOf="@+id/cb_remove"
         android:gravity="right"
         android:orientation="horizontal"
-        android:padding="3dip" >
+        android:padding="3dip">
 
         <ImageView
             android:id="@+id/chat_head_iv"
@@ -40,7 +51,7 @@
             android:layout_width="275dip"
             android:layout_height="wrap_content"
             android:layout_below="@+id/nick_name"
-            android:layout_toLeftOf="@+id/chat_head_iv" >
+            android:layout_toLeftOf="@+id/chat_head_iv">
 
             <pl.droidsonroids.gif.GifImageView
                 android:id="@+id/chat_from_gif_view"
@@ -78,4 +89,4 @@
         </RelativeLayout>
     </RelativeLayout>
 
-</LinearLayout>
+</RelativeLayout>

+ 26 - 15
WeiChat/src/main/res/layout/chat_from_item_image.xml

@@ -1,30 +1,42 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="vertical" >
+    android:layout_height="wrap_content">
 
     <TextView
         android:id="@+id/time_tv"
         style="@style/ChattingUISystem"
-        android:layout_gravity="center_horizontal"
+        android:layout_centerHorizontal="true"
         android:layout_marginTop="5dp"
         android:background="@drawable/chatsystem_bg"
         android:gravity="center" />
 
+    <CheckBox
+        android:id="@+id/cb_remove"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentRight="true"
+        android:layout_below="@+id/time_tv"
+        android:layout_marginTop="15dp"
+        android:visibility="gone" />
+
     <RelativeLayout
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
+        android:layout_below="@+id/time_tv"
+        android:layout_toLeftOf="@+id/cb_remove"
         android:gravity="right"
         android:orientation="horizontal"
-        android:padding="3dip" >
+        android:padding="3dip">
+
 
-        <ImageView
+        <com.sk.weichat.view.RoundCornerImageView
             android:id="@+id/chat_head_iv"
             android:layout_width="48dip"
             android:layout_height="48dip"
             android:layout_alignParentRight="true"
             android:contentDescription="@string/app_name"
+            android:scaleType="centerCrop"
             android:src="@drawable/avatar_normal" />
 
         <TextView
@@ -40,7 +52,7 @@
             android:layout_width="275dp"
             android:layout_height="wrap_content"
             android:layout_below="@+id/nick_name"
-            android:layout_toLeftOf="@+id/chat_head_iv" >
+            android:layout_toLeftOf="@+id/chat_head_iv">
 
             <FrameLayout
                 android:id="@+id/chat_from_warp_view"
@@ -48,22 +60,21 @@
                 android:layout_height="wrap_content"
                 android:layout_alignParentRight="true"
                 android:layout_alignParentTop="true"
-                android:background="@drawable/chat_bg_blue_press"
                 android:clickable="true"
                 android:focusable="true"
                 android:gravity="center"
-                android:orientation="vertical" >
-
+                android:orientation="vertical">
                 <!-- 所有Item该布局的子布局不能超过210dp -->
 
-                <ImageView
+                <com.sk.weichat.view.RoundCornerImageView
                     android:id="@+id/chat_from_image"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
                     android:adjustViewBounds="true"
+                    android:background="@drawable/chat_bg_blue_press"
                     android:contentDescription="@string/app_name"
                     android:maxWidth="210dp"
-                    android:scaleType="fitXY"
+                    android:scaleType="centerCrop"
                     android:src="@drawable/defaultpic" />
 
                 <ProgressBar
@@ -97,4 +108,4 @@
         </RelativeLayout>
     </RelativeLayout>
 
-</LinearLayout>
+</RelativeLayout>

+ 15 - 5
WeiChat/src/main/res/layout/chat_from_item_location.xml

@@ -1,18 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical" >
+    >
 
     <TextView
         android:id="@+id/time_tv"
         style="@style/ChattingUISystem"
         android:layout_gravity="center_horizontal"
         android:layout_marginTop="5dp"
+        android:layout_centerHorizontal="true"
         android:background="@drawable/chatsystem_bg"
         android:gravity="center" />
-
+    <CheckBox
+        android:id="@+id/cb_remove"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentRight="true"
+        android:layout_below="@+id/time_tv"
+        android:layout_marginTop="15dp"
+        android:visibility="gone"/>
     <RelativeLayout
+        android:layout_below="@+id/time_tv"
+        android:layout_toLeftOf="@+id/cb_remove"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:gravity="right"
@@ -48,7 +58,7 @@
                 android:layout_height="wrap_content"
                 android:layout_alignParentRight="true"
                 android:layout_alignParentTop="true"
-                android:background="@drawable/chat_from_warp_bg"
+                android:background="@drawable/chat_bg_blue_press"
                 android:clickable="true"
                 android:focusable="true"
                 android:gravity="center"
@@ -98,4 +108,4 @@
         </RelativeLayout>
     </RelativeLayout>
 
-</LinearLayout>
+</RelativeLayout>

+ 19 - 11
WeiChat/src/main/res/layout/chat_from_item_text.xml

@@ -1,23 +1,31 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="vertical" >
+    android:layout_height="wrap_content">
 
     <TextView
         android:id="@+id/time_tv"
         style="@style/ChattingUISystem"
-        android:layout_gravity="center_horizontal"
+        android:layout_centerHorizontal="true"
         android:layout_marginTop="5dp"
         android:background="@drawable/chatsystem_bg"
         android:gravity="center" />
-
+    <CheckBox
+        android:id="@+id/cb_remove"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentRight="true"
+        android:layout_below="@+id/time_tv"
+        android:layout_marginTop="15dp"
+        android:visibility="gone" />
     <RelativeLayout
+        android:layout_toLeftOf="@+id/cb_remove"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
+        android:layout_below="@+id/time_tv"
         android:gravity="right"
         android:orientation="horizontal"
-        android:padding="3dip" >
+        android:padding="3dip">
 
         <ImageView
             android:id="@+id/chat_head_iv"
@@ -40,7 +48,7 @@
             android:layout_width="275dip"
             android:layout_height="wrap_content"
             android:layout_below="@+id/nick_name"
-            android:layout_toLeftOf="@+id/chat_head_iv" >
+            android:layout_toLeftOf="@+id/chat_head_iv">
 
             <LinearLayout
                 android:id="@+id/chat_from_warp_view"
@@ -48,20 +56,20 @@
                 android:layout_height="wrap_content"
                 android:layout_alignParentRight="true"
                 android:layout_alignParentTop="true"
-                android:background="@drawable/chat_from_warp_bg"
+                android:background="@drawable/chat_bg_blue_press"
                 android:clickable="true"
                 android:focusable="true"
                 android:gravity="center"
-                android:orientation="vertical" >
+                android:orientation="vertical">
 
                 <TextView
-                    android:textColor="@color/text_main"
                     android:id="@+id/chat_from_text"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
                     android:maxWidth="210dp"
                     android:padding="6dp"
+                    android:textColor="@color/text_main"
                     android:textSize="18sp" />
             </LinearLayout>
 
@@ -87,4 +95,4 @@
         </RelativeLayout>
     </RelativeLayout>
 
-</LinearLayout>
+</RelativeLayout>

+ 14 - 4
WeiChat/src/main/res/layout/chat_from_item_video.xml

@@ -1,18 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical" >
+      >
 
     <TextView
         android:id="@+id/time_tv"
         style="@style/ChattingUISystem"
+        android:layout_centerHorizontal="true"
         android:layout_gravity="center_horizontal"
         android:layout_marginTop="5dp"
         android:background="@drawable/chatsystem_bg"
         android:gravity="center" />
-
+    <CheckBox
+        android:id="@+id/cb_remove"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentRight="true"
+        android:layout_below="@+id/time_tv"
+        android:layout_marginTop="15dp"
+        android:visibility="gone"/>
     <RelativeLayout
+        android:layout_below="@+id/time_tv"
+        android:layout_toLeftOf="@+id/cb_remove"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:gravity="right"
@@ -98,4 +108,4 @@
         </RelativeLayout>
     </RelativeLayout>
 
-</LinearLayout>
+</RelativeLayout>

+ 21 - 10
WeiChat/src/main/res/layout/chat_from_item_voice.xml

@@ -1,23 +1,34 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="vertical" >
+    android:layout_height="wrap_content">
 
     <TextView
         android:id="@+id/time_tv"
         style="@style/ChattingUISystem"
+        android:layout_centerHorizontal="true"
         android:layout_gravity="center_horizontal"
         android:layout_marginTop="5dp"
         android:background="@drawable/chatsystem_bg"
         android:gravity="center" />
 
+    <CheckBox
+        android:id="@+id/cb_remove"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentRight="true"
+        android:layout_below="@+id/time_tv"
+        android:layout_marginTop="15dp"
+        android:visibility="gone"/>
+
     <RelativeLayout
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
+        android:layout_below="@+id/time_tv"
+        android:layout_toLeftOf="@+id/cb_remove"
         android:gravity="right"
         android:orientation="horizontal"
-        android:padding="3dip" >
+        android:padding="3dip">
 
         <ImageView
             android:id="@+id/chat_head_iv"
@@ -40,7 +51,7 @@
             android:layout_width="275dip"
             android:layout_height="wrap_content"
             android:layout_below="@+id/nick_name"
-            android:layout_toLeftOf="@+id/chat_head_iv" >
+            android:layout_toLeftOf="@+id/chat_head_iv">
 
             <LinearLayout
                 android:id="@+id/chat_from_warp_view"
@@ -48,18 +59,18 @@
                 android:layout_height="wrap_content"
                 android:layout_alignParentRight="true"
                 android:layout_alignParentTop="true"
-                android:background="@drawable/chat_from_warp_bg"
+                android:background="@drawable/chat_bg_blue_press"
                 android:clickable="true"
                 android:focusable="true"
                 android:gravity="center"
-                android:orientation="horizontal" >
+                android:orientation="horizontal">
 
                 <LinearLayout
                     android:id="@+id/chat_from_voice"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:gravity="left"
-                    android:orientation="horizontal" >
+                    android:orientation="horizontal">
 
                     <ImageView
                         android:id="@+id/chat_from_voice_icon"
@@ -83,8 +94,8 @@
                     android:layout_width="40dp"
                     android:layout_height="wrap_content"
                     android:gravity="center"
-                    android:singleLine="true"
                     android:padding="6dp"
+                    android:singleLine="true"
                     android:textColor="@color/text_main"
                     android:textSize="@dimen/text_main" />
             </LinearLayout>
@@ -111,4 +122,4 @@
         </RelativeLayout>
     </RelativeLayout>
 
-</LinearLayout>
+</RelativeLayout>

+ 15 - 5
WeiChat/src/main/res/layout/chat_to_item_card.xml

@@ -1,18 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical" >
+    >
 
     <TextView
         android:id="@+id/time_tv"
         style="@style/ChattingUISystem"
-        android:layout_gravity="center_horizontal"
+        android:layout_centerHorizontal="true"
         android:layout_marginTop="5dp"
         android:background="@drawable/chatsystem_bg"
         android:gravity="center" />
-
+    <CheckBox
+        android:id="@+id/cb_remove"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_below="@+id/time_tv"
+        android:layout_marginTop="15dp"
+        android:visibility="gone"
+        />
     <RelativeLayout
+        android:layout_below="@+id/time_tv"
+        android:layout_toRightOf="@+id/cb_remove"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:gravity="left"
@@ -122,4 +132,4 @@
         </RelativeLayout>
     </RelativeLayout>
 
-</LinearLayout>
+</RelativeLayout>

+ 15 - 5
WeiChat/src/main/res/layout/chat_to_item_file.xml

@@ -1,18 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical" >
+    >
 
     <TextView
         android:id="@+id/time_tv"
         style="@style/ChattingUISystem"
-        android:layout_gravity="center_horizontal"
+        android:layout_centerHorizontal="true"
         android:layout_marginTop="5dp"
         android:background="@drawable/chatsystem_bg"
         android:gravity="center" />
-
+    <CheckBox
+        android:id="@+id/cb_remove"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_below="@+id/time_tv"
+        android:layout_marginTop="15dp"
+        android:visibility="gone"
+        />
     <RelativeLayout
+        android:layout_below="@+id/time_tv"
+        android:layout_toRightOf="@+id/cb_remove"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:gravity="left"
@@ -99,4 +109,4 @@
         </RelativeLayout>
     </RelativeLayout>
 
-</LinearLayout>
+</RelativeLayout>

+ 15 - 5
WeiChat/src/main/res/layout/chat_to_item_gif.xml

@@ -1,18 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical" >
+    >
 
     <TextView
         android:id="@+id/time_tv"
         style="@style/ChattingUISystem"
-        android:layout_gravity="center_horizontal"
+        android:layout_centerHorizontal="true"
         android:layout_marginTop="5dp"
         android:background="@drawable/chatsystem_bg"
         android:gravity="center" />
-
+    <CheckBox
+        android:id="@+id/cb_remove"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_below="@+id/time_tv"
+        android:layout_marginTop="15dp"
+        android:visibility="gone"
+        />
     <RelativeLayout
+        android:layout_below="@+id/time_tv"
+        android:layout_toRightOf="@+id/cb_remove"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:gravity="left"
@@ -50,4 +60,4 @@
             android:scaleType="fitXY" />
     </RelativeLayout>
 
-</LinearLayout>
+</RelativeLayout>

+ 15 - 5
WeiChat/src/main/res/layout/chat_to_item_image.xml

@@ -1,18 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical" >
+    >
 
     <TextView
         android:id="@+id/time_tv"
         style="@style/ChattingUISystem"
-        android:layout_gravity="center_horizontal"
+       android:layout_centerHorizontal="true"
         android:layout_marginTop="5dp"
         android:background="@drawable/chatsystem_bg"
         android:gravity="center" />
-
+    <CheckBox
+        android:id="@+id/cb_remove"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_below="@+id/time_tv"
+        android:layout_marginTop="15dp"
+        android:visibility="gone"
+        />
     <RelativeLayout
+        android:layout_below="@+id/time_tv"
+        android:layout_toRightOf="@+id/cb_remove"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:gravity="left"
@@ -68,4 +78,4 @@
         </FrameLayout>
     </RelativeLayout>
 
-</LinearLayout>
+</RelativeLayout>

+ 15 - 5
WeiChat/src/main/res/layout/chat_to_item_location.xml

@@ -1,18 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical" >
+    >
 
     <TextView
         android:id="@+id/time_tv"
         style="@style/ChattingUISystem"
-        android:layout_gravity="center_horizontal"
+        android:layout_centerHorizontal="true"
         android:layout_marginTop="5dp"
         android:background="@drawable/chatsystem_bg"
         android:gravity="center" />
-
+    <CheckBox
+        android:id="@+id/cb_remove"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_below="@+id/time_tv"
+        android:layout_marginTop="15dp"
+        android:visibility="gone"
+        />
     <RelativeLayout
+        android:layout_below="@+id/time_tv"
+        android:layout_toRightOf="@+id/cb_remove"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:gravity="left"
@@ -70,4 +80,4 @@
         </LinearLayout>
     </RelativeLayout>
 
-</LinearLayout>
+</RelativeLayout>

+ 14 - 4
WeiChat/src/main/res/layout/chat_to_item_text.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:orientation="vertical" >
@@ -7,12 +7,22 @@
     <TextView
         android:id="@+id/time_tv"
         style="@style/ChattingUISystem"
-        android:layout_gravity="center_horizontal"
+        android:layout_centerHorizontal="true"
         android:layout_marginTop="5dp"
         android:background="@drawable/chatsystem_bg"
         android:gravity="center" />
-
+    <CheckBox
+        android:id="@+id/cb_remove"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_below="@+id/time_tv"
+        android:layout_marginTop="15dp"
+        android:visibility="gone"
+        />
     <RelativeLayout
+        android:layout_below="@+id/time_tv"
+        android:layout_toRightOf="@+id/cb_remove"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:gravity="left"
@@ -58,4 +68,4 @@
         </LinearLayout>
     </RelativeLayout>
 
-</LinearLayout>
+</RelativeLayout>

+ 15 - 5
WeiChat/src/main/res/layout/chat_to_item_video.xml

@@ -1,18 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical" >
+    >
 
     <TextView
         android:id="@+id/time_tv"
         style="@style/ChattingUISystem"
-        android:layout_gravity="center_horizontal"
+        android:layout_centerHorizontal="true"
         android:layout_marginTop="5dp"
         android:background="@drawable/chatsystem_bg"
         android:gravity="center" />
-
+    <CheckBox
+        android:id="@+id/cb_remove"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_below="@+id/time_tv"
+        android:layout_marginTop="15dp"
+        android:visibility="gone"
+        />
     <RelativeLayout
+        android:layout_below="@+id/time_tv"
+        android:layout_toRightOf="@+id/cb_remove"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:gravity="left"
@@ -91,4 +101,4 @@
         </LinearLayout>
     </RelativeLayout>
 
-</LinearLayout>
+</RelativeLayout>

+ 15 - 5
WeiChat/src/main/res/layout/chat_to_item_voice.xml

@@ -1,18 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical" >
+     >
 
     <TextView
         android:id="@+id/time_tv"
         style="@style/ChattingUISystem"
-        android:layout_gravity="center_horizontal"
+android:layout_centerHorizontal="true"
         android:layout_marginTop="5dp"
         android:background="@drawable/chatsystem_bg"
         android:gravity="center" />
-
+    <CheckBox
+        android:id="@+id/cb_remove"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_below="@+id/time_tv"
+        android:layout_marginTop="15dp"
+        android:visibility="gone"
+        />
     <RelativeLayout
+        android:layout_below="@+id/time_tv"
+        android:layout_toRightOf="@+id/cb_remove"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:gravity="left"
@@ -114,4 +124,4 @@
         </RelativeLayout>
     </RelativeLayout>
 
-</LinearLayout>
+</RelativeLayout>

+ 10 - 10
WeiChat/src/main/res/layout/fragment_me.xml

@@ -65,7 +65,7 @@
         </RelativeLayout>
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
+            android:layout_height="@dimen/line"
             android:background="@color/item_line" />
         <RelativeLayout
             android:id="@+id/my_data_rl"
@@ -95,7 +95,7 @@
 
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
+            android:layout_height="@dimen/line"
             android:background="@color/item_line" />
 
         <RelativeLayout
@@ -125,7 +125,7 @@
 
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
+            android:layout_height="@dimen/line"
             android:background="@color/item_line" />
 
         <RelativeLayout
@@ -155,7 +155,7 @@
 
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
+            android:layout_height="@dimen/line"
             android:background="@color/item_line" />
 
         <RelativeLayout
@@ -185,7 +185,7 @@
 
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
+            android:layout_height="@dimen/line"
             android:background="@color/item_line" />
         <!--公司-->
         <RelativeLayout
@@ -226,7 +226,7 @@
 
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
+            android:layout_height="@dimen/line"
             android:background="@color/item_line" />
 
         <!--账套-->
@@ -267,7 +267,7 @@
 
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
+            android:layout_height="@dimen/line"
             android:background="@color/item_line" />
 
         <RelativeLayout
@@ -308,7 +308,7 @@
 
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
+            android:layout_height="@dimen/line"
             android:background="@color/item_line" />
 
         <RelativeLayout
@@ -356,7 +356,7 @@
 
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
+            android:layout_height="@dimen/line"
             android:background="@color/item_line" />
 
         <RelativeLayout
@@ -387,7 +387,7 @@
 
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
+            android:layout_height="@dimen/line"
             android:background="@color/item_line" />
     </LinearLayout>
 

+ 8 - 8
WeiChat/src/main/res/layout/fragment_works.xml

@@ -35,12 +35,12 @@
 
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
+            android:layout_height="@dimen/line"
             android:background="@color/item_line" />
 
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
+            android:layout_height="@dimen/line"
             android:layout_marginTop="7dp"
             android:background="@color/item_line" />
 
@@ -81,12 +81,12 @@
 
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
+            android:layout_height="@dimen/line"
             android:background="@color/item_line" />
 
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
+            android:layout_height="@dimen/line"
             android:layout_marginTop="7dp"
             android:background="@color/item_line" />
 
@@ -117,12 +117,12 @@
 
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
+            android:layout_height="@dimen/line"
             android:background="@color/item_line" />
 
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
+            android:layout_height="@dimen/line"
             android:layout_marginTop="7dp"
             android:background="@color/item_line" />
 
@@ -153,7 +153,7 @@
 
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
+            android:layout_height="@dimen/line"
             android:background="@color/item_line" />
 
         <RelativeLayout
@@ -183,7 +183,7 @@
 
         <View
             android:layout_width="match_parent"
-            android:layout_height="1dp"
+            android:layout_height="@dimen/line"
             android:background="@color/item_line" />
     </LinearLayout>
 

+ 1 - 1
WeiChat/src/main/res/layout/from_leave_view.xml

@@ -227,7 +227,7 @@
                 <Button
                     android:id="@+id/bt_save"
                     style="@style/from_button_base_bule"
-                    android:text="提  交" />
+                    android:text="保  存" />
             </LinearLayout>
 
             <include layout="@layout/item_work_view" />

+ 4 - 4
WeiChat/src/main/res/layout/headview_cantacts_menus.xml

@@ -32,7 +32,7 @@
 
     <View
         android:layout_width="match_parent"
-        android:layout_height="1dp"
+        android:layout_height="@dimen/line"
         android:background="@color/item_line"/>
     <RelativeLayout
         android:id="@+id/my_friends_rl"
@@ -60,7 +60,7 @@
     </RelativeLayout>
     <View
         android:layout_width="match_parent"
-        android:layout_height="1dp"
+        android:layout_height="@dimen/line"
         android:background="@color/item_line"/>
 
     <RelativeLayout
@@ -90,7 +90,7 @@
 
     <View
         android:layout_width="match_parent"
-        android:layout_height="1dp"
+        android:layout_height="@dimen/line"
         android:background="@color/item_line"/>
 
     <RelativeLayout
@@ -146,7 +146,7 @@
     </RelativeLayout>
     <View
         android:layout_width="match_parent"
-        android:layout_height="1dp"
+        android:layout_height="@dimen/line"
         android:background="@color/item_line"/>
 </LinearLayout>
 

+ 1 - 2
WeiChat/src/main/res/layout/item_weixin_listview.xml

@@ -20,7 +20,6 @@
          />
 <View
     android:layout_width="match_parent"
-    android:layout_height="1dp"
+    android:layout_height="@dimen/line"
     android:background="@color/item_line"/>
-
 </LinearLayout>

+ 1 - 1
WeiChat/src/main/res/layout/layout_data_load.xml

@@ -2,7 +2,7 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@color/normal_bg"
+    android:background="@drawable/bg_main"
     android:gravity="center"
     android:orientation="vertical" >
 

+ 19 - 5
WeiChat/src/main/res/layout/message_dialog.xml

@@ -3,18 +3,18 @@
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:gravity="center"
-    android:orientation="vertical" >
+    android:orientation="vertical">
 
     <LinearLayout
         android:id="@+id/pop_layout"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:layout_alignParentBottom="true"
-        android:background="@android:color/white"
         android:layout_marginLeft="10dp"
         android:layout_marginRight="10dp"
+        android:background="@android:color/white"
         android:gravity="center_horizontal"
-        android:orientation="vertical" >
+        android:orientation="vertical">
 
         <Button
             android:id="@+id/btn_copy"
@@ -39,7 +39,8 @@
             android:text="转   发"
             android:textColor="@color/btn_textcolor_selector"
             android:textStyle="bold" />
- <Button
+
+        <Button
             android:id="@+id/btn_delete"
             android:layout_width="fill_parent"
             android:layout_height="wrap_content"
@@ -50,14 +51,27 @@
             android:text="删   除"
             android:textColor="@color/btn_textcolor_selector"
             android:textStyle="bold" />
+
         <Button
-            android:id="@+id/btn_cancle"
+            android:id="@+id/btn_more"
             android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:layout_marginLeft="20dip"
             android:layout_marginRight="20dip"
             android:layout_marginTop="15dip"
+            android:background="@drawable/btn_dialog_selector"
+            android:text="更   多"
+            android:textColor="@color/btn_textcolor_selector"
+            android:textStyle="bold" />
+
+        <Button
+            android:id="@+id/btn_cancle"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
             android:layout_marginBottom="20dp"
+            android:layout_marginLeft="20dip"
+            android:layout_marginRight="20dip"
+            android:layout_marginTop="15dip"
             android:background="@drawable/btn_dialog_selector"
             android:text="取   消"
             android:textColor="@color/btn_textcolor_selector"

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

@@ -129,7 +129,7 @@
                 <View
                     android:id="@+id/img_praise_line"
                     android:layout_width="match_parent"
-                    android:layout_height="1dp"
+                    android:layout_height="@dimen/line"
                     android:layout_below="@+id/multi_praise_tv"
                     android:background="@color/item_line" />
 

+ 1 - 1
WeiChat/src/main/res/values/colors.xml

@@ -11,7 +11,7 @@
     <color name="wirtehine">#a3b2cf</color>
     <color name="text_main">#3c3c3c</color>
     <color name="text_hine">#575757</color>
-    <color name="bar_pass">#7bb4dc</color>
+    <color name="bar_pass">#0096e6</color>
     <color name="bar_color">#e6e6e6</color>
     <color name="bg_main">@color/white</color>
     <color name="refresh">@color/black</color>

+ 1 - 0
WeiChat/src/main/res/values/dimens.xml

@@ -1,5 +1,6 @@
 <resources>
     <dimen name="next_width">10.0dip</dimen>
+    <dimen name="line">1px</dimen>
     <dimen name="line_big">7.0dip</dimen>
     <dimen name="line_min">2.0dip</dimen>
     <dimen name="next_height">20.0dip</dimen>

+ 1 - 1
build.gradle

@@ -5,7 +5,7 @@ buildscript {
         jcenter()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:1.3.0'
+        classpath 'com.android.tools.build:gradle:2.0.0'
     }
 }
 

+ 0 - 13
libbdupdatesdk/src/androidTest/java/com/example/administrator/libbdupdatesdk/ApplicationTest.java

@@ -1,13 +0,0 @@
-package com.example.administrator.libbdupdatesdk;
-
-import android.app.Application;
-import android.test.ApplicationTestCase;
-
-/**
- * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
- */
-public class ApplicationTest extends ApplicationTestCase<Application> {
-    public ApplicationTest() {
-        super(Application.class);
-    }
-}

+ 0 - 15
libbdupdatesdk/src/test/java/com/example/administrator/libbdupdatesdk/ExampleUnitTest.java

@@ -1,15 +0,0 @@
-package com.example.administrator.libbdupdatesdk;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * To work on unit tests, switch the Test Artifact in the Build Variants view.
- */
-public class ExampleUnitTest {
-    @Test
-    public void addition_isCorrect() throws Exception {
-        assertEquals(4, 2 + 2);
-    }
-}