Przeglądaj źródła

通讯录添加查找

gongpm 10 lat temu
rodzic
commit
f82731956b
74 zmienionych plików z 331 dodań i 237 usunięć
  1. 5 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/adapter/FriendSortAdapter.java
  2. 10 4
      WeiChat/src/main/java/com/xzjmyk/pm/activity/db/dao/ChatMessageDao.java
  3. 73 19
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/LinksManFragment.java
  4. 0 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/message/MucChatActivity.java
  5. 0 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/nearby/UserListActivity.java
  6. 1 2
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/nearby/UserSearchActivity.java
  7. 201 194
      WeiChat/src/main/java/com/xzjmyk/pm/activity/util/SmileyParser.java
  8. 0 2
      WeiChat/src/main/java/com/xzjmyk/pm/activity/video/VideoRecordActivity.java
  9. 0 0
      WeiChat/src/main/res/drawable-hdpi/chat_bg_blue_press.9.png
  10. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_001.png
  11. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_002.png
  12. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_003.png
  13. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_004.png
  14. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_005.png
  15. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_006.png
  16. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_007.png
  17. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_008.png
  18. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_009.png
  19. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_010.png
  20. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_011.png
  21. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_012.png
  22. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_013.png
  23. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_014.png
  24. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_015.png
  25. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_016.png
  26. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_017.png
  27. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_018.png
  28. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_019.png
  29. BIN
      WeiChat/src/main/res/drawable-hdpi/emoji_020.png
  30. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_000.png
  31. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_001.png
  32. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_002.png
  33. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_003.png
  34. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_004.png
  35. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_005.png
  36. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_006.png
  37. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_007.png
  38. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_008.png
  39. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_009.png
  40. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_010.png
  41. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_011.png
  42. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_012.png
  43. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_013.png
  44. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_014.png
  45. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_015.png
  46. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_016.png
  47. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_017.png
  48. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_018.png
  49. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_019.png
  50. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_020.png
  51. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_021.png
  52. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_022.png
  53. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_023.png
  54. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_024.png
  55. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_025.png
  56. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_026.png
  57. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_027.png
  58. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_028.png
  59. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_029.png
  60. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_030.png
  61. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_031.png
  62. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_032.png
  63. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_033.png
  64. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_034.png
  65. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_035.png
  66. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_036.png
  67. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_037.png
  68. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_038.png
  69. BIN
      WeiChat/src/main/res/drawable-hdpi/f_static_039.png
  70. BIN
      WeiChat/src/main/res/drawable-xxhdpi/login_btn.png
  71. 2 1
      WeiChat/src/main/res/layout/chat_bottom.xml
  72. 6 7
      WeiChat/src/main/res/layout/fragment_friend.xml
  73. 33 4
      WeiChat/src/main/res/layout/headview_cantacts_menus.xml
  74. 0 2
      WeiChat/src/main/res/values/styles.xml

+ 5 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/adapter/FriendSortAdapter.java

@@ -34,6 +34,11 @@ public class FriendSortAdapter extends BaseAdapter implements SectionIndexer {
         isLog = new HashMap<>();
     }
 
+    public void setData(List<BaseSortModel<Friend>> mSortFriends) {
+        this.mSortFriends = mSortFriends;
+        notifyDataSetChanged();
+    }
+
     public void setisRefeshed(boolean isRefeshed) {
         this.isRefeshed = isRefeshed;
         isLog.clear();

+ 10 - 4
WeiChat/src/main/java/com/xzjmyk/pm/activity/db/dao/ChatMessageDao.java

@@ -100,10 +100,16 @@ public class ChatMessageDao {
             return false;
         }
         try {
-            List<ChatMessage> chatMessages = dao.queryForEq("packetId", messages.get(0).getPacketId());
-            if (chatMessages != null && chatMessages.size() > 0) {
-                dao.delete(messages);
-                return true;
+            List<ChatMessage> chatMessages = null;
+            try {
+                chatMessages = dao.queryForEq("packetId", messages.get(0).getPacketId());
+            } catch (ArrayIndexOutOfBoundsException e) {
+                e.printStackTrace();
+            } finally {
+                if (chatMessages != null && chatMessages.size() > 0) {
+                    dao.delete(messages);
+                    return true;
+                }
             }
         } catch (SQLException e) {
             e.printStackTrace();

+ 73 - 19
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/LinksManFragment.java

@@ -13,8 +13,10 @@ import android.content.ServiceConnection;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.IBinder;
+import android.text.Editable;
 import android.text.InputFilter;
 import android.text.TextUtils;
+import android.text.TextWatcher;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.Menu;
@@ -33,44 +35,45 @@ import com.android.volley.VolleyError;
 import com.handmark.pulltorefresh.library.PullToRefreshBase;
 import com.handmark.pulltorefresh.library.PullToRefreshListView;
 import com.lidroid.xutils.view.annotation.ViewInject;
-import com.xzjmyk.pm.activity.adapter.FriendSortAdapter;
-import com.xzjmyk.pm.activity.bean.message.NewFriendMessage;
-import com.xzjmyk.pm.activity.db.dao.FriendDao;
-import com.xzjmyk.pm.activity.sortlist.BaseComparator;
-import com.xzjmyk.pm.activity.sortlist.BaseSortModel;
-import com.xzjmyk.pm.activity.sortlist.PingYinUtil;
-import com.xzjmyk.pm.activity.ui.circle.BasicInfoActivity;
-import com.xzjmyk.pm.activity.ui.erp.activity.CommonFragmentActivity;
-import com.xzjmyk.pm.activity.ui.erp.db.DBManager;
-import com.xzjmyk.pm.activity.ui.nearby.UserSearchActivity;
-import com.xzjmyk.pm.activity.util.ProgressDialogUtil;
-import com.xzjmyk.pm.activity.util.StringUtils;
-import com.xzjmyk.pm.activity.volley.ArrayResult;
-import com.xzjmyk.pm.activity.volley.StringJsonArrayRequest;
-import com.xzjmyk.pm.activity.xmpp.CoreService;
 import com.xzjmyk.pm.activity.AppConstant;
 import com.xzjmyk.pm.activity.MyApplication;
 import com.xzjmyk.pm.activity.R;
+import com.xzjmyk.pm.activity.adapter.FriendSortAdapter;
 import com.xzjmyk.pm.activity.bean.AttentionUser;
 import com.xzjmyk.pm.activity.bean.Friend;
+import com.xzjmyk.pm.activity.bean.message.NewFriendMessage;
 import com.xzjmyk.pm.activity.bean.message.XmppMessage;
 import com.xzjmyk.pm.activity.broadcast.MsgBroadcast;
+import com.xzjmyk.pm.activity.db.dao.FriendDao;
 import com.xzjmyk.pm.activity.db.dao.OnCompleteListener;
 import com.xzjmyk.pm.activity.helper.FriendHelper;
+import com.xzjmyk.pm.activity.sortlist.BaseComparator;
+import com.xzjmyk.pm.activity.sortlist.BaseSortModel;
+import com.xzjmyk.pm.activity.sortlist.PingYinUtil;
 import com.xzjmyk.pm.activity.sortlist.SideBar;
 import com.xzjmyk.pm.activity.ui.MainActivity;
 import com.xzjmyk.pm.activity.ui.base.XutilsFragment;
+import com.xzjmyk.pm.activity.ui.circle.BasicInfoActivity;
+import com.xzjmyk.pm.activity.ui.erp.activity.CommonFragmentActivity;
 import com.xzjmyk.pm.activity.ui.erp.activity.CompanyContactsActivity;
 import com.xzjmyk.pm.activity.ui.erp.activity.MyFriendActivity;
+import com.xzjmyk.pm.activity.ui.erp.db.DBManager;
 import com.xzjmyk.pm.activity.ui.erp.entity.EmployeesEntity;
 import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 import com.xzjmyk.pm.activity.ui.message.ChatActivity;
 import com.xzjmyk.pm.activity.ui.message.NewFriendActivity;
+import com.xzjmyk.pm.activity.ui.nearby.UserSearchActivity;
+import com.xzjmyk.pm.activity.util.ProgressDialogUtil;
+import com.xzjmyk.pm.activity.util.StringUtils;
 import com.xzjmyk.pm.activity.util.TimeUtils;
 import com.xzjmyk.pm.activity.util.ToastUtil;
+import com.xzjmyk.pm.activity.view.ClearEditText;
+import com.xzjmyk.pm.activity.volley.ArrayResult;
 import com.xzjmyk.pm.activity.volley.ObjectResult;
 import com.xzjmyk.pm.activity.volley.Result;
+import com.xzjmyk.pm.activity.volley.StringJsonArrayRequest;
 import com.xzjmyk.pm.activity.volley.StringJsonObjectRequest;
+import com.xzjmyk.pm.activity.xmpp.CoreService;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -98,6 +101,7 @@ public class LinksManFragment extends XutilsFragment implements View.OnClickList
     private SideBar mSideBar;
     private ProgressDialog mProgressDialog;
     private List<BaseSortModel<Friend>> mSortFriends;
+    private List<BaseSortModel<Friend>> sortFrientSeach;
     private BaseComparator<Friend> mBaseComparator;
     private FriendSortAdapter mAdapter;
     private String mLoginUserId;
@@ -112,15 +116,17 @@ public class LinksManFragment extends XutilsFragment implements View.OnClickList
         @Override
         public void onReceive(Context context, Intent intent) {
             if ("home".equals(intent.getStringExtra("falg"))) {
-                Log.i("gongpengming","onReceive");
+                Log.i("gongpengming", "onReceive");
                 upDataFriend();
                 loadData();
             }
         }
     };
+    private ClearEditText search_edit;
+    private View headview;
 
     public void onResult() {
-        Log.i("gongpengming","onResult");
+        Log.i("gongpengming", "onResult");
         upDataFriend();
         loadData();
     }
@@ -147,6 +153,7 @@ public class LinksManFragment extends XutilsFragment implements View.OnClickList
 
     public LinksManFragment() {
         mSortFriends = new ArrayList<BaseSortModel<Friend>>();
+        sortFrientSeach = new ArrayList<BaseSortModel<Friend>>();
         mBaseComparator = new BaseComparator<Friend>();
         mLoginUserId = MyApplication.getInstance().mLoginUser.getUserId();
     }
@@ -257,12 +264,12 @@ public class LinksManFragment extends XutilsFragment implements View.OnClickList
 
     private void initView() {
         mBind = getActivity().bindService(CoreService.getIntent(), mServiceConnection, Activity.BIND_AUTO_CREATE);
-        View headview = LayoutInflater.from(ct).inflate(R.layout.headview_cantacts_menus, null);
+        headview = LayoutInflater.from(ct).inflate(R.layout.headview_cantacts_menus, null);
 
         mPullToRefreshListView = (PullToRefreshListView) findViewById(R.id.pull_refresh_list);
         Log.i("wang", "headview:" + headview);
         mPullToRefreshListView.getRefreshableView().addHeaderView(headview);
-
+        search_edit = (ClearEditText) findViewById(R.id.search_edit);
         my_friend_rl = (RelativeLayout) headview.findViewById(R.id.my_friend_rl);
         my_data_rl = (RelativeLayout) headview.findViewById(R.id.my_data_rl);
         my_friends_rl = (RelativeLayout) headview.findViewById(R.id.my_friends_rl);
@@ -280,6 +287,39 @@ public class LinksManFragment extends XutilsFragment implements View.OnClickList
         mSideBar = (SideBar) findViewById(R.id.sidebar);
         mSideBar.setTextView(mTextDialog);
 
+        //查好友
+        search_edit.addTextChangedListener(new TextWatcher() {
+            @Override
+            public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+
+            }
+
+            @Override
+            public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+
+            }
+
+            @Override
+            public void afterTextChanged(Editable editable) {
+                sortFrientSeach.clear();
+                String filter = search_edit.getText().toString().trim().toUpperCase();
+                if (filter.length() > 0) {
+                    for (int i = 0; i < mSortFriends.size(); i++) {
+                        BaseSortModel<Friend> mode = mSortFriends.get(i);
+                        // 获取筛选的数据
+                        if (TextUtils.isEmpty(filter) || mode.getSimpleSpell().startsWith(filter) || mode.getWholeSpell().startsWith(filter)
+                                || mode.getBean().getShowName().startsWith(filter)) {
+                            sortFrientSeach.add(mode);
+                        }
+                    }
+                    goneView(true);
+                    mAdapter.setData(sortFrientSeach);
+                } else {
+                    goneView(false);
+                    mAdapter.setData(mSortFriends);
+                }
+            }
+        });
         mSideBar.setOnTouchingLetterChangedListener(new SideBar.OnTouchingLetterChangedListener() {
             @Override
             public void onTouchingLetterChanged(String s) {
@@ -357,6 +397,20 @@ public class LinksManFragment extends XutilsFragment implements View.OnClickList
         mProgressDialog = ProgressDialogUtil.init(getActivity(), null, getString(R.string.please_wait));
     }
 
+    private void goneView(boolean b) {
+        if (b) {
+            my_data_rl.setVisibility(View.GONE);
+            my_friends_rl.setVisibility(View.GONE);
+            my_friend_rl.setVisibility(View.GONE);
+            local_video_rl.setVisibility(View.GONE);
+        } else {
+            my_data_rl.setVisibility(View.VISIBLE);
+            my_friends_rl.setVisibility(View.VISIBLE);
+            my_friend_rl.setVisibility(View.VISIBLE);
+            local_video_rl.setVisibility(View.VISIBLE);
+        }
+    }
+
     public void update() {
         if (isResumed()) {
             loadData();

+ 0 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/message/MucChatActivity.java

@@ -285,7 +285,6 @@ public class MucChatActivity extends ActionBackActivity
         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);

+ 0 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/nearby/UserListActivity.java

@@ -133,7 +133,6 @@ public class UserListActivity extends BaseActivity {
                 boolean success = Result.defaultParser(mContext, result, true);
                 if (success) {
                     mPageIndex++;
-
                     if (isPullDwonToRefersh) {
                         mUsers.clear();
                     }

+ 1 - 2
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/nearby/UserSearchActivity.java

@@ -38,7 +38,7 @@ public class UserSearchActivity extends ActionBackActivity implements View.OnCli
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        getSupportActionBar().setTitle(R.string.search);
+        getSupportActionBar().setTitle("添加还有");
         setContentView(R.layout.activity_user_search);
         initView();
     }
@@ -105,7 +105,6 @@ public class UserSearchActivity extends ActionBackActivity implements View.OnCli
                 }
                 Intent intent = new Intent(mContext, UserListActivity.class);
                 intent.putExtra("key_word", mKeyWordEdit.getText().toString());
-
                 intent.putExtra("sex", mSex);
                 intent.putExtra("min_age", mMinAge);
                 intent.putExtra("max_age", mMaxAge);

+ 201 - 194
WeiChat/src/main/java/com/xzjmyk/pm/activity/util/SmileyParser.java

@@ -34,199 +34,206 @@ import java.util.regex.Pattern;
  * A class for annotating a CharSequence with spans to convert textual emoticons to graphical ones.
  */
 public class SmileyParser {
-	private static SmileyParser sInstance;
-
-	public static SmileyParser getInstance(Context context) {
-		if (sInstance == null) {
-			synchronized (SmileyParser.class) {
-				if (sInstance == null) {
-					sInstance = new SmileyParser(context);
-				}
-			}
-		}
-		return sInstance;
-	}
-
-	private final Context mContext;
-	private final Pattern mPattern;
-	private final Pattern mHtmlPattern;
-
-	private SmileyParser(Context context) {
-		mContext = context;
-		mPattern = buildPattern();
-		mHtmlPattern = buildHtmlPattern();
-	}
-
-	public static class Smilies {
-		public static int[][] getIds() {
-			return IDS;
-		}
-
-		public static String[][] getTexts() {
-			return TEXTS;
-		}
-
-		public static int textMapId(String text) {
-			if (MAPS.containsKey(text)) {
-				return MAPS.get(text);
-			} else {
-				return -1;
-			}
-		}
-
-		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 }};
-
-		private static final String[][] TEXTS = { { "[微笑]", "[得意]", "[害羞]", "[汗]", "[奸笑]", "[惊呆了]", "[开心]", "[哭]", "[呕吐]", "[亲亲]", "[色眯眯]", "[生病]",
-				"[生气]", "[爽]", "[委屈]", "[严肃]", "[疑问]", "[晕]" }   };
-
-		private static final Map<String, Integer> MAPS = new HashMap<String, Integer>();
-		static {
-			// 取最小的长度,防止长度不一致出错
-			int length = IDS.length > TEXTS.length ? TEXTS.length : IDS.length;
-			for (int i = 0; i < length; i++) {
-				int[] subIds = IDS[i];
-				String[] subTexts = TEXTS[i];
-				if (subIds == null || subTexts == null) {
-					continue;
-				}
-				int subLength = subIds.length > subTexts.length ? subTexts.length : subIds.length;
-				for (int j = 0; j < subLength; j++) {
-					MAPS.put(TEXTS[i][j], IDS[i][j]);
-				}
-			}
-		}
-	}
-
-	public static class Gifs {
-		public static int[][] getIds() {
-			return IDS;
-		}
-
-		public static String[][] getTexts() {
-			return TEXTS;
-		}
-
-		public static int textMapId(String text) {
-			if (MAPS.containsKey(text)) {
-				return MAPS.get(text);
-			} else {
-				return -1;
-			}
-		}
-
-		private static final int[][] IDS = {
-				{ R.drawable.gif_001, R.drawable.gif_002, R.drawable.gif_003, R.drawable.gif_004, R.drawable.gif_005, R.drawable.gif_006,
-						R.drawable.gif_007, R.drawable.gif_008 },
-				{ R.drawable.gif_009, R.drawable.gif_010, R.drawable.gif_011, R.drawable.gif_012, R.drawable.gif_013, R.drawable.gif_014,
-						R.drawable.gif_015, R.drawable.gif_016 },
-				{ R.drawable.gif_017, R.drawable.gif_018, R.drawable.gif_019, R.drawable.gif_020, R.drawable.gif_021, R.drawable.gif_022,
-						R.drawable.gif_023, R.drawable.gif_024 },
-				{ R.drawable.gif_025, R.drawable.gif_026, R.drawable.gif_027, R.drawable.gif_028, R.drawable.gif_029, R.drawable.gif_030,
-						R.drawable.gif_031, R.drawable.gif_032 },
-				{ R.drawable.gif_033, R.drawable.gif_034, R.drawable.gif_035, R.drawable.gif_036, R.drawable.gif_037, R.drawable.gif_038,
-						R.drawable.gif_039, R.drawable.gif_040 },
-				{ R.drawable.gif_041, R.drawable.gif_042, R.drawable.gif_043, R.drawable.gif_044, R.drawable.gif_045 } };
-		private static final String[][] TEXTS = {
-				{ "bad手势.gif", "come手势.gif", "fuck手势.gif", "good手势.gif", "nono手势.gif", "ok手势.gif", "yeh手势.gif", "爱你.gif" },
-				{ "抱抱.gif", "鄙视.gif", "闭嘴.gif", "吃惊.gif", "打哈秋.gif", "鼓掌.gif", "哈哈.gif", "害羞.gif" },
-				{ "好吃.gif", "呵呵.gif", "哼.gif", "花心.gif", "奸笑.gif", "见钱开眼.gif", "可爱.gif", "困.gif" },
-				{ "流汗.gif", "流泪.gif", "怒.gif", "抛媚眼.gif", "亲亲.gif", "傻眼.gif", "生病.gif", "失望.gif" },
-				{ "睡觉.gif", "思考.gif", "送花.gif", "调皮.gif", "偷笑.gif", "吐白沫.gif", "委屈.gif", "嘻嘻.gif" },
-				{ "喜欢.gif", "兴奋.gif", "嘘!安静.gif", "疑问.gif", "再见.gif" } };
-		private static final Map<String, Integer> MAPS = new HashMap<String, Integer>();
-		static {
-			// 取最小的长度,防止长度不一致出错
-			int length = IDS.length > TEXTS.length ? TEXTS.length : IDS.length;
-			for (int i = 0; i < length; i++) {
-				int[] subIds = IDS[i];
-				String[] subTexts = TEXTS[i];
-				if (subIds == null || subTexts == null) {
-					continue;
-				}
-				int subLength = subIds.length > subTexts.length ? subTexts.length : subIds.length;
-				for (int j = 0; j < subLength; j++) {
-					MAPS.put(TEXTS[i][j], IDS[i][j]);
-				}
-			}
-		}
-	}
-
-	/**
-	 * Builds the regular expression we use to find smileys in {@link #addSmileySpans}.
-	 */
-	private Pattern buildPattern() {
-		// Set the StringBuilder capacity with the assumption that the average
-		// smiley is 3 characters long.
-		StringBuilder patternString = new StringBuilder();
-
-		// Build a regex that looks like (:-)|:-(|...), but escaping the smilies
-		// properly so they will be interpreted literally by the regex matcher.
-		patternString.append('(');
-		for (int i = 0; i < Smilies.TEXTS.length; i++) {
-			for (int j = 0; j < Smilies.TEXTS[i].length; j++) {
-				patternString.append(Pattern.quote(Smilies.TEXTS[i][j]));
-				patternString.append('|');
-			}
-		}
-
-		// Replace the extra '|' with a ')'
-		patternString.replace(patternString.length() - 1, patternString.length(), ")");
-
-		return Pattern.compile(patternString.toString());
-	}
-
-	private Pattern buildHtmlPattern() {
-		// Set the StringBuilder capacity with the assumption that the average
-		// smiley is 3 characters long.
-		// StringBuilder patternString = new StringBuilder();
-
-		// Build a regex that looks like (:-)|:-(|...), but escaping the smilies
-		// properly so they will be interpreted literally by the regex matcher.
-		// patternString.append('(');
-		// patternString.append(Pattern.quote("(<a)(\\w)+(?=</a>)"));
-		// // Replace the extra '|' with a ')'
-		// patternString.replace(patternString.length() - 1,
-		// patternString.length(), ")");
-
-		return Pattern.compile("(http://(\\S+?)(\\s))|(www.(\\S+?)(\\s))");
-	}
-
-	/**
-	 * Adds ImageSpans to a CharSequence that replace textual emoticons such as :-) with a graphical version.
-	 * 
-	 * @param text
-	 *            A CharSequence possibly containing emoticons
-	 * @return A CharSequence annotated with ImageSpans covering any recognized emoticons.
-	 */
-	public CharSequence addSmileySpans(CharSequence text, boolean canClick) {
-
-		SpannableStringBuilder builder = new SpannableStringBuilder(text);
-		Matcher matcher = mPattern.matcher(text);
-		while (matcher.find()) {
-			int resId = Smilies.textMapId(matcher.group());
-			if (resId != -1) {
-				builder.setSpan(new MyImageSpan(mContext, resId), matcher.start(), matcher.end(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
-			}
-		}
-		if (canClick) {
-			Matcher htmlmatcher = mHtmlPattern.matcher(text);
-			while (htmlmatcher.find()) {
-				builder.setSpan(new URLSpan(htmlmatcher.group()), htmlmatcher.start(), htmlmatcher.end(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
-			}
-		}
-		return builder;
-	}
-
-	ImageGetter imgGetter = new ImageGetter() {
-		public Drawable getDrawable(String source) {
-			Drawable drawable = null;
-			drawable = Drawable.createFromPath(source); // 显示本地图片
-			drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
-			return drawable;
-		}
-	};
+    private static SmileyParser sInstance;
+
+    public static SmileyParser getInstance(Context context) {
+        if (sInstance == null) {
+            synchronized (SmileyParser.class) {
+                if (sInstance == null) {
+                    sInstance = new SmileyParser(context);
+                }
+            }
+        }
+        return sInstance;
+    }
+
+    private final Context mContext;
+    private final Pattern mPattern;
+    private final Pattern mHtmlPattern;
+
+    private SmileyParser(Context context) {
+        mContext = context;
+        mPattern = buildPattern();
+        mHtmlPattern = buildHtmlPattern();
+    }
+
+    public static class Smilies {
+        public static int[][] getIds() {
+            return IDS;
+        }
+
+        public static String[][] getTexts() {
+            return TEXTS;
+        }
+
+        public static int textMapId(String text) {
+            if (MAPS.containsKey(text)) {
+                return MAPS.get(text);
+            } else {
+                return -1;
+            }
+        }
+
+
+        private static final int[][] IDS = {
+                {R.drawable.emoji_019, R.drawable.emoji_020, R.drawable.f_static_000, R.drawable.f_static_001,
+                        R.drawable.f_static_002, R.drawable.f_static_003, R.drawable.f_static_004, R.drawable.f_static_005, R.drawable.f_static_006, R.drawable.f_static_007,
+                        R.drawable.f_static_008, R.drawable.f_static_009, R.drawable.f_static_010, R.drawable.f_static_011, R.drawable.f_static_012, R.drawable.f_static_013,
+                        R.drawable.f_static_014, R.drawable.f_static_015}
+
+        };
+
+        private static final String[][] TEXTS = {{"[龇牙笑]", "[顽皮]", "[流汗]", "[汗]", "[奸笑]", "[惊呆了]", "[开心]", "[哭]", "[呕吐]", "[亲亲]", "[色眯眯]", "[生病]",
+                "[生气]", "[爽]", "[委屈]", "[严肃]", "[疑问]", "[晕]"}, {"[微笑]", "[得意]", "[害羞]", "[汗]", "[奸笑]", "[惊呆了]", "[开心]", "[哭]", "[呕吐]", "[亲亲]", "[色眯眯]", "[生病]",
+                "[生气]", "[爽]", "[委屈]", "[严肃]", "[疑问]", "[晕]"}};
+
+        private static final Map<String, Integer> MAPS = new HashMap<String, Integer>();
+
+        static {
+            // 取最小的长度,防止长度不一致出错
+            int length = IDS.length > TEXTS.length ? TEXTS.length : IDS.length;
+            for (int i = 0; i < length; i++) {
+                int[] subIds = IDS[i];
+                String[] subTexts = TEXTS[i];
+                if (subIds == null || subTexts == null) {
+                    continue;
+                }
+                int subLength = subIds.length > subTexts.length ? subTexts.length : subIds.length;
+                for (int j = 0; j < subLength; j++) {
+                    MAPS.put(TEXTS[i][j], IDS[i][j]);
+                }
+            }
+        }
+    }
+
+    public static class Gifs {
+        public static int[][] getIds() {
+            return IDS;
+        }
+
+        public static String[][] getTexts() {
+            return TEXTS;
+        }
+
+        public static int textMapId(String text) {
+            if (MAPS.containsKey(text)) {
+                return MAPS.get(text);
+            } else {
+                return -1;
+            }
+        }
+
+        //动态表情
+        private static final int[][] IDS = {
+                {R.drawable.gif_001, R.drawable.gif_002, R.drawable.gif_003, R.drawable.gif_004, R.drawable.gif_005, R.drawable.gif_006,
+                        R.drawable.gif_007, R.drawable.gif_008},
+                {R.drawable.gif_009, R.drawable.gif_010, R.drawable.gif_011, R.drawable.gif_012, R.drawable.gif_013, R.drawable.gif_014,
+                        R.drawable.gif_015, R.drawable.gif_016},
+                {R.drawable.gif_017, R.drawable.gif_018, R.drawable.gif_019, R.drawable.gif_020, R.drawable.gif_021, R.drawable.gif_022,
+                        R.drawable.gif_023, R.drawable.gif_024},
+                {R.drawable.gif_025, R.drawable.gif_026, R.drawable.gif_027, R.drawable.gif_028, R.drawable.gif_029, R.drawable.gif_030,
+                        R.drawable.gif_031, R.drawable.gif_032},
+                {R.drawable.gif_033, R.drawable.gif_034, R.drawable.gif_035, R.drawable.gif_036, R.drawable.gif_037, R.drawable.gif_038,
+                        R.drawable.gif_039, R.drawable.gif_040},
+                {R.drawable.gif_041, R.drawable.gif_042, R.drawable.gif_043, R.drawable.gif_044, R.drawable.gif_045}};
+        private static final String[][] TEXTS = {
+                {"bad手势.gif", "come手势.gif", "fuck手势.gif", "good手势.gif", "nono手势.gif", "ok手势.gif", "yeh手势.gif", "爱你.gif"},
+                {"抱抱.gif", "鄙视.gif", "闭嘴.gif", "吃惊.gif", "打哈秋.gif", "鼓掌.gif", "哈哈.gif", "害羞.gif"},
+                {"好吃.gif", "呵呵.gif", "哼.gif", "花心.gif", "奸笑.gif", "见钱开眼.gif", "可爱.gif", "困.gif"},
+                {"流汗.gif", "流泪.gif", "怒.gif", "抛媚眼.gif", "亲亲.gif", "傻眼.gif", "生病.gif", "失望.gif"},
+                {"睡觉.gif", "思考.gif", "送花.gif", "调皮.gif", "偷笑.gif", "吐白沫.gif", "委屈.gif", "嘻嘻.gif"},
+                {"喜欢.gif", "兴奋.gif", "嘘!安静.gif", "疑问.gif", "再见.gif"}};
+        private static final Map<String, Integer> MAPS = new HashMap<String, Integer>();
+
+        static {
+            // 取最小的长度,防止长度不一致出错
+            int length = IDS.length > TEXTS.length ? TEXTS.length : IDS.length;
+            for (int i = 0; i < length; i++) {
+                int[] subIds = IDS[i];
+                String[] subTexts = TEXTS[i];
+                if (subIds == null || subTexts == null) {
+                    continue;
+                }
+                int subLength = subIds.length > subTexts.length ? subTexts.length : subIds.length;
+                for (int j = 0; j < subLength; j++) {
+                    MAPS.put(TEXTS[i][j], IDS[i][j]);
+                }
+            }
+        }
+    }
+
+    /**
+     * Builds the regular expression we use to find smileys in {@link #addSmileySpans}.
+     */
+    private Pattern buildPattern() {
+        // Set the StringBuilder capacity with the assumption that the average
+        // smiley is 3 characters long.
+        StringBuilder patternString = new StringBuilder();
+
+        // Build a regex that looks like (:-)|:-(|...), but escaping the smilies
+        // properly so they will be interpreted literally by the regex matcher.
+        patternString.append('(');
+        for (int i = 0; i < Smilies.TEXTS.length; i++) {
+            for (int j = 0; j < Smilies.TEXTS[i].length; j++) {
+                patternString.append(Pattern.quote(Smilies.TEXTS[i][j]));
+                patternString.append('|');
+            }
+        }
+
+        // Replace the extra '|' with a ')'
+        patternString.replace(patternString.length() - 1, patternString.length(), ")");
+
+        return Pattern.compile(patternString.toString());
+    }
+
+    private Pattern buildHtmlPattern() {
+        // Set the StringBuilder capacity with the assumption that the average
+        // smiley is 3 characters long.
+        // StringBuilder patternString = new StringBuilder();
+
+        // Build a regex that looks like (:-)|:-(|...), but escaping the smilies
+        // properly so they will be interpreted literally by the regex matcher.
+        // patternString.append('(');
+        // patternString.append(Pattern.quote("(<a)(\\w)+(?=</a>)"));
+        // // Replace the extra '|' with a ')'
+        // patternString.replace(patternString.length() - 1,
+        // patternString.length(), ")");
+
+        return Pattern.compile("(http://(\\S+?)(\\s))|(www.(\\S+?)(\\s))");
+    }
+
+    /**
+     * Adds ImageSpans to a CharSequence that replace textual emoticons such as :-) with a graphical version.
+     *
+     * @param text A CharSequence possibly containing emoticons
+     * @return A CharSequence annotated with ImageSpans covering any recognized emoticons.
+     */
+    public CharSequence addSmileySpans(CharSequence text, boolean canClick) {
+
+        SpannableStringBuilder builder = new SpannableStringBuilder(text);
+        Matcher matcher = mPattern.matcher(text);
+        while (matcher.find()) {
+            int resId = Smilies.textMapId(matcher.group());
+            if (resId != -1) {
+                builder.setSpan(new MyImageSpan(mContext, resId), matcher.start(), matcher.end(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+            }
+        }
+        if (canClick) {
+            Matcher htmlmatcher = mHtmlPattern.matcher(text);
+            while (htmlmatcher.find()) {
+                builder.setSpan(new URLSpan(htmlmatcher.group()), htmlmatcher.start(), htmlmatcher.end(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+            }
+        }
+        return builder;
+    }
+
+    ImageGetter imgGetter = new ImageGetter() {
+        public Drawable getDrawable(String source) {
+            Drawable drawable = null;
+            drawable = Drawable.createFromPath(source); // 显示本地图片
+            drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
+            return drawable;
+        }
+    };
 
 }

+ 0 - 2
WeiChat/src/main/java/com/xzjmyk/pm/activity/video/VideoRecordActivity.java

@@ -35,7 +35,6 @@ public class VideoRecordActivity extends Activity {
 	public static final String EXTRA_RESULT_FILE_SIZE = "result_file_size";
 	private Button mTakeVideoBtn;
 	private Button mSwitchCameraBtn;
-
 	private MyPreView mMyPreView;
 
 	private SensorManager mSensorManager = null;
@@ -51,7 +50,6 @@ public class VideoRecordActivity extends Activity {
 		this.requestWindowFeature(Window.FEATURE_NO_TITLE);// 去掉标题栏
 		this.getWindow().setFlags(LayoutParams.FLAG_FULLSCREEN, LayoutParams.FLAG_FULLSCREEN);// 去掉信息栏
 		getWindow().addFlags(LayoutParams.FLAG_KEEP_SCREEN_ON);
-
 		setContentView(R.layout.activity_video_record);
 
 		mMyPreView = new MyPreView(this);

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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

@@ -111,7 +111,8 @@
         android:layout_width="fill_parent"
         android:layout_height="wrap_content">
 
-        <com.xzjmyk.pm.activity.view.ChatFaceView xmlns:chatface="http://schemas.android.com/apk/res-auto"
+        <com.xzjmyk.pm.activity.view.ChatFaceView
+            xmlns:chatface="http://schemas.android.com/apk/res-auto"
             android:id="@+id/chat_face_view"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"

+ 6 - 7
WeiChat/src/main/res/layout/fragment_friend.xml

@@ -1,13 +1,12 @@
 <!--<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"--><!--xmlns:tools="http://schemas.android.com/tools"--><!--android:layout_width="match_parent"--><!--android:layout_height="match_parent" >-->
-<RelativeLayout
-    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:background="@drawable/bg_main"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:background="@drawable/bg_main">
 
 
-    <com.handmark.pulltorefresh.library.PullToRefreshListView
-        xmlns:ptr="http://schemas.android.com/apk/res-auto"
+
+    <com.handmark.pulltorefresh.library.PullToRefreshListView xmlns:ptr="http://schemas.android.com/apk/res-auto"
         android:id="@+id/pull_refresh_list"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
@@ -22,7 +21,7 @@
         ptr:ptrOverScroll="false"
         ptr:ptrScrollingWhileRefreshingEnabled="true"
         ptr:ptrShowIndicator="false" />
-<!--</ScrollView>-->
+    <!--</ScrollView>-->
 
     <TextView
         android:id="@+id/text_dialog"

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

@@ -6,9 +6,35 @@
     android:layout_height="wrap_content"
     android:orientation="vertical">
 
+    <RelativeLayout
+        android:id="@+id/seach_top"
+        android:layout_width="match_parent"
+        android:layout_height="48dp"
+        android:background="@drawable/bg_bar"
+        android:orientation="horizontal"
+        android:paddingBottom="5dp"
+        android:paddingLeft="15dp"
+        android:paddingRight="15dp"
+        android:paddingTop="5dp">
+
+        <com.xzjmyk.pm.activity.view.ClearEditText
+            android:id="@+id/search_edit"
+            android:layout_width="fill_parent"
+            android:layout_height="fill_parent"
+            android:layout_centerVertical="true"
+            android:background="@drawable/search_input"
+            android:drawableLeft="@drawable/search"
+            android:drawableRight="@drawable/search_clear"
+            android:hint="@string/search"
+            android:textColor="@color/dark_grey"
+            android:textColorHint="@color/grey"
+            android:textSize="15sp" />
+    </RelativeLayout>
+
     <RelativeLayout
         android:id="@+id/my_data_rl"
         style="@style/IMTbleLine_UP">
+
         <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
@@ -33,7 +59,8 @@
     <View
         android:layout_width="match_parent"
         android:layout_height="@dimen/line"
-        android:background="@color/item_line"/>
+        android:background="@color/item_line" />
+
     <RelativeLayout
         android:id="@+id/my_friends_rl"
         style="@style/IMTbleLine_UP">
@@ -58,10 +85,11 @@
             android:contentDescription="@string/app_name"
             android:visibility="gone" />
     </RelativeLayout>
+
     <View
         android:layout_width="match_parent"
         android:layout_height="@dimen/line"
-        android:background="@color/item_line"/>
+        android:background="@color/item_line" />
 
     <RelativeLayout
         android:id="@+id/my_friend_rl"
@@ -91,7 +119,7 @@
     <View
         android:layout_width="match_parent"
         android:layout_height="@dimen/line"
-        android:background="@color/item_line"/>
+        android:background="@color/item_line" />
 
     <RelativeLayout
         android:id="@+id/local_video_rl"
@@ -144,9 +172,10 @@
             android:contentDescription="@string/app_name"
             android:visibility="gone" />
     </RelativeLayout>
+
     <View
         android:layout_width="match_parent"
         android:layout_height="@dimen/line"
-        android:background="@color/item_line"/>
+        android:background="@color/item_line" />
 </LinearLayout>
 

+ 0 - 2
WeiChat/src/main/res/values/styles.xml

@@ -146,7 +146,6 @@
         <item name="android:background">@color/item_color1</item>
         <item name="android:layout_width">match_parent</item>
         <item name="android:layout_height">@dimen/item_height</item>
-        <item name="android:minHeight">55dp</item>
         <item name="android:paddingLeft">9dp</item>
         <item name="android:paddingRight">5dp</item>
     </style>
@@ -171,7 +170,6 @@
         <item name="android:background">@color/item_color2</item>
         <item name="android:layout_width">match_parent</item>
         <item name="android:layout_height">@dimen/item_height</item>
-        <item name="android:minHeight">55dp</item>
         <item name="android:paddingLeft">10dp</item>
         <item name="android:paddingRight">5dp</item>
     </style>