Skip to content

Commit

Permalink
优化emoji显示
Browse files Browse the repository at this point in the history
  • Loading branch information
Z-P-J committed Feb 15, 2020
1 parent 5de7220 commit e905744
Show file tree
Hide file tree
Showing 442 changed files with 4,841 additions and 1,789 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
Binary file modified .idea/caches/gradle_models.ser
Binary file not shown.
3 changes: 3 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ dependencies {
implementation project(':richeditor')
implementation project(':richeditor2')
implementation project(':zmarkdown')
implementation project(':emojilib')



Expand All @@ -75,6 +76,8 @@ dependencies {
implementation 'com.lxj:xpopup:1.8.10'
implementation 'com.hoko:hoko-blur:1.3.4'
implementation 'com.lzy.widget:imagepicker:0.5.5'
implementation 'com.rockerhieu.emojicon:library:1.3.1'
// implementation 'com.lqr.emoji:library:1.0.2'

annotationProcessor "com.github.Raizlabs.DBFlow:dbflow-processor:4.2.4"
implementation "com.github.Raizlabs.DBFlow:dbflow-core:4.2.4"
Expand Down
Binary file added app/src/main/assets/sticker/ajmd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd008.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd009.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd010.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd011.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd012.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd013.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd014.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd015.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd016.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd017.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd018.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd019.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd020.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd021.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd022.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd023.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/assets/sticker/ajmd/ajmd025.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd026.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd027.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd028.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd029.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd030.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd031.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd032.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd033.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd034.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd035.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd036.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd037.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd038.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd039.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd040.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd041.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd042.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd043.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd044.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd045.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd046.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd047.png
Binary file added app/src/main/assets/sticker/ajmd/ajmd048.png
Binary file added app/src/main/assets/sticker/lt.png
Binary file added app/src/main/assets/sticker/lt/lt001.png
Binary file added app/src/main/assets/sticker/lt/lt002.png
Binary file added app/src/main/assets/sticker/lt/lt003.png
Binary file added app/src/main/assets/sticker/lt/lt004.png
Binary file added app/src/main/assets/sticker/lt/lt005.png
Binary file added app/src/main/assets/sticker/lt/lt006.png
Binary file added app/src/main/assets/sticker/lt/lt007.png
Binary file added app/src/main/assets/sticker/lt/lt008.png
Binary file added app/src/main/assets/sticker/lt/lt009.png
Binary file added app/src/main/assets/sticker/lt/lt010.png
Binary file added app/src/main/assets/sticker/lt/lt011.png
Binary file added app/src/main/assets/sticker/lt/lt012.png
Binary file added app/src/main/assets/sticker/lt/lt013.png
Binary file added app/src/main/assets/sticker/lt/lt014.png
Binary file added app/src/main/assets/sticker/lt/lt015.png
Binary file added app/src/main/assets/sticker/lt/lt016.png
Binary file added app/src/main/assets/sticker/lt/lt017.png
Binary file added app/src/main/assets/sticker/lt/lt018.png
Binary file added app/src/main/assets/sticker/lt/lt019.png
Binary file added app/src/main/assets/sticker/lt/lt020.png
Binary file added app/src/main/assets/sticker/tsj.png
Binary file added app/src/main/assets/sticker/tsj/tsj_00.gif
Binary file added app/src/main/assets/sticker/tsj/tsj_01.gif
Binary file added app/src/main/assets/sticker/tsj/tsj_02.gif
Binary file added app/src/main/assets/sticker/tsj/tsj_03.gif
Binary file added app/src/main/assets/sticker/tsj/tsj_04.gif
Binary file added app/src/main/assets/sticker/tsj/tsj_05.gif
Binary file added app/src/main/assets/sticker/tsj/tsj_06.gif
Binary file added app/src/main/assets/sticker/tsj/tsj_07.gif
Binary file added app/src/main/assets/sticker/tsj/tsj_08.gif
Binary file added app/src/main/assets/sticker/tsj/tsj_09.gif
Binary file added app/src/main/assets/sticker/tsj/tsj_10.gif
Binary file added app/src/main/assets/sticker/tsj/tsj_11.gif
Binary file added app/src/main/assets/sticker/tsj/tsj_12.gif
Binary file added app/src/main/assets/sticker/tsj/tsj_13.gif
Binary file added app/src/main/assets/sticker/tsj/tsj_14.gif
Binary file added app/src/main/assets/sticker/tsj/tsj_15.gif
Binary file added app/src/main/assets/sticker/xxy.png
Binary file added app/src/main/assets/sticker/xxy/xxy001.png
Binary file added app/src/main/assets/sticker/xxy/xxy002.png
Binary file added app/src/main/assets/sticker/xxy/xxy003.png
Binary file added app/src/main/assets/sticker/xxy/xxy004.png
Binary file added app/src/main/assets/sticker/xxy/xxy005.png
Binary file added app/src/main/assets/sticker/xxy/xxy006.png
Binary file added app/src/main/assets/sticker/xxy/xxy007.png
Binary file added app/src/main/assets/sticker/xxy/xxy008.png
Binary file added app/src/main/assets/sticker/xxy/xxy009.png
Binary file added app/src/main/assets/sticker/xxy/xxy010.png
Binary file added app/src/main/assets/sticker/xxy/xxy011.png
Binary file added app/src/main/assets/sticker/xxy/xxy012.png
Binary file added app/src/main/assets/sticker/xxy/xxy013.png
Binary file added app/src/main/assets/sticker/xxy/xxy014.png
Binary file added app/src/main/assets/sticker/xxy/xxy015.png
Binary file added app/src/main/assets/sticker/xxy/xxy016.png
Binary file added app/src/main/assets/sticker/xxy/xxy017.png
Binary file added app/src/main/assets/sticker/xxy/xxy018.png
Binary file added app/src/main/assets/sticker/xxy/xxy019.png
Binary file added app/src/main/assets/sticker/xxy/xxy020.png
Binary file added app/src/main/assets/sticker/xxy/xxy021.png
Binary file added app/src/main/assets/sticker/xxy/xxy022.png
Binary file added app/src/main/assets/sticker/xxy/xxy023.png
Binary file added app/src/main/assets/sticker/xxy/xxy024.png
Binary file added app/src/main/assets/sticker/xxy/xxy025.png
Binary file added app/src/main/assets/sticker/xxy/xxy026.png
Binary file added app/src/main/assets/sticker/xxy/xxy027.png
Binary file added app/src/main/assets/sticker/xxy/xxy028.png
Binary file added app/src/main/assets/sticker/xxy/xxy029.png
Binary file added app/src/main/assets/sticker/xxy/xxy030.png
Binary file added app/src/main/assets/sticker/xxy/xxy031.png
Binary file added app/src/main/assets/sticker/xxy/xxy032.png
Binary file added app/src/main/assets/sticker/xxy/xxy033.png
Binary file added app/src/main/assets/sticker/xxy/xxy034.png
Binary file added app/src/main/assets/sticker/xxy/xxy035.png
Binary file added app/src/main/assets/sticker/xxy/xxy036.png
Binary file added app/src/main/assets/sticker/xxy/xxy037.png
Binary file added app/src/main/assets/sticker/xxy/xxy038.png
Binary file added app/src/main/assets/sticker/xxy/xxy039.png
Binary file added app/src/main/assets/sticker/xxy/xxy040.png
12 changes: 12 additions & 0 deletions app/src/main/java/com/zpj/shouji/market/App.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
package com.zpj.shouji.market;

import android.app.Application;
import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.target.ViewTarget;
import com.felix.atoast.library.AToast;
import com.lqr.emoji.IImageLoader;
import com.lqr.emoji.LQREmotionKit;
import com.raizlabs.android.dbflow.config.FlowManager;
import com.zpj.downloader.ZDownloader;

Expand All @@ -16,6 +22,12 @@ public void onCreate() {
AToast.onInit(this);
ZDownloader.init(this);
ViewTarget.setTagId(R.id.glide_tag_id);
LQREmotionKit.init(this, new IImageLoader() {
@Override
public void displayImage(Context context, String path, ImageView imageView) {
Glide.with(context).load(path).centerCrop().into(imageView);
}
});
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import com.zpj.recyclerview.IEasy;
import com.zpj.shouji.market.R;
import com.zpj.shouji.market.model.DiscoverInfo;
import com.zpj.shouji.market.utils.ImageLoader;
import com.zpj.shouji.market.ui.widget.BottomListPopupMenu;
import com.zpj.shouji.market.utils.PopupImageLoader;
import com.zpj.shouji.market.ui.widget.popup.BottomListPopupMenu;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -58,7 +58,7 @@ public void onSrcViewUpdate(ImageViewerPopupView popupView, int position) {
ImageView view = (ImageView) nineGridImageView.getChildAt(position);
popupView.updateSrcView(view);
}
}, new ImageLoader())
}, new PopupImageLoader())
.show();

// ImageTrans.with(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import com.lxj.xpopup.core.ImageViewerPopupView;
import com.lxj.xpopup.interfaces.OnSrcViewUpdateListener;
import com.zpj.shouji.market.R;
import com.zpj.shouji.market.utils.ImageLoader;
import com.zpj.shouji.market.utils.PopupImageLoader;
import com.zpj.utils.ScreenUtil;

import java.util.ArrayList;
Expand Down Expand Up @@ -99,7 +99,7 @@ public void onSrcViewUpdate(ImageViewerPopupView popupView, int pos) {
}
popupView.updateSrcView(imageView);
}
}, new ImageLoader())
}, new PopupImageLoader())
.show();
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ public class NineGridImageAdapter extends NineGridImageViewAdapter<String> {
@Override
protected void onDisplayImage(Context context, ImageView imageView, String s) {
if (s.toLowerCase().endsWith(".gif")) {
Log.d("ImageLoader", "gif");
Log.d("PopupImageLoader", "gif");
GlideApp.with(context).asGif().load(s)
.apply(new RequestOptions().centerCrop().placeholder(R.drawable.bga_pp_ic_holder_light).error(R.drawable.bga_pp_ic_holder_light).override(Target.SIZE_ORIGINAL)).into(imageView);
} else {
Log.d("ImageLoader", "png");
Log.d("PopupImageLoader", "png");
Glide.with(context).load(s).apply(new RequestOptions().centerCrop().placeholder(R.drawable.bga_pp_ic_holder_light).error(R.drawable.bga_pp_ic_holder_light).override(Target.SIZE_ORIGINAL).dontAnimate()).into(imageView);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import com.lxj.xpopup.XPopup;
import com.zpj.popupmenuview.popup.EverywherePopup;
import com.zpj.shouji.market.R;
import com.zpj.shouji.market.utils.ImageLoader;
import com.zpj.shouji.market.utils.PopupImageLoader;
import com.zpj.shouji.market.model.AppInfo;
import com.zpj.shouji.market.model.article.ArticleDetailInfo;
import com.zpj.shouji.market.model.article.ArticleInfo;
Expand Down Expand Up @@ -223,7 +223,7 @@ public void onClick(View v) {
.asImageViewer(ivImage,
0,
objects, (popupView, position) -> popupView.updateSrcView(ivImage),
new ImageLoader())
new PopupImageLoader())
.show();
});
contentWrapper.addView(view);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
import com.zpj.shouji.market.R;
import com.zpj.shouji.market.model.WallpaperInfo;
import com.zpj.shouji.market.model.WallpaperTag;
import com.zpj.shouji.market.utils.ImageLoader;
import com.zpj.shouji.market.utils.PopupImageLoader;
import com.zpj.shouji.market.ui.fragment.base.NextUrlFragment;
import com.zpj.shouji.market.ui.widget.RecyclerPopup;
import com.zpj.shouji.market.ui.widget.popup.RecyclerPopup;
import com.zpj.utils.ScreenUtil;

import java.util.ArrayList;
Expand Down Expand Up @@ -125,7 +125,7 @@ public void onClick(EasyViewHolder holder, View view, WallpaperInfo data) {
public void onSrcViewUpdate(ImageViewerPopupView popupView, int position) {
popupView.updateSrcView(wallpaper);
}
}, new ImageLoader())
}, new PopupImageLoader())
.show();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
import android.view.View;
import android.view.ViewGroup;

import com.zpj.markdown.MarkdownEditorFragment;
import com.zpj.shouji.market.R;
import com.zpj.shouji.market.ui.adapter.FragmentsPagerAdapter;
import com.zpj.shouji.market.ui.fragment.base.BaseFragment;
import com.zpj.shouji.market.ui.fragment.chat.ChatFragment;
import com.zpj.shouji.market.ui.fragment.chat.ChatFragment2;
import com.zpj.shouji.market.ui.fragment.homepage.HomeFragment;
import com.zpj.shouji.market.ui.fragment.profile.MeFragment;
import com.zpj.shouji.market.ui.fragment.recommond.GameRecommendFragment;
Expand Down Expand Up @@ -193,6 +192,6 @@ public void onWallpaperItemClick() {

@Override
public void onChatWithFriendItemClick() {
_mActivity.start(new ChatFragment());
_mActivity.start(new ChatFragment2());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void onClick(View v) {
}

/**
* ImageLoader for insert Image
* PopupImageLoader for insert Image
*/
private void initImageLoader() {
ImagePicker imagePicker = ImagePicker.getInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
*/

public class ChatConst {
public static final String LISTVIEW_DATABASE_NAME = "listview.db";
public static final String RECYCLER_DATABASE_NAME = "recycler.db";

public static final int SENDING = 0;
public static final int COMPLETED = 1;
public static final int SENDERROR = 2;
Expand Down
Loading

0 comments on commit e905744

Please sign in to comment.