AndroidX
This commit is contained in:
@@ -184,7 +184,7 @@ dependencies {
|
||||
api fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.2.0', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
|
||||
|
@@ -6,11 +6,13 @@ import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.opensource.svgaplayer.SVGADrawable;
|
||||
import com.opensource.svgaplayer.SVGAParser;
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
||||
import io.reactivex.Single;
|
||||
import io.reactivex.SingleOnSubscribe;
|
||||
@@ -99,7 +101,7 @@ public class SvgaCacheManager {
|
||||
String path = isBottle ? "svga/svga_voice_bottle.svga" : "svga/svga_voice_bubble.svga";
|
||||
parser.decodeFromAssets(path, new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onComplete(@NotNull SVGAVideoEntity svgaVideoEntity) {
|
||||
public void onComplete(@NonNull SVGAVideoEntity svgaVideoEntity) {
|
||||
if (isBig) {
|
||||
if (isBottle) {
|
||||
bigBottleSvga = new SVGADrawable(svgaVideoEntity);
|
||||
|
@@ -47,7 +47,7 @@ public class RoomImposeDialog extends BottomSheetDialog implements View.OnClickL
|
||||
binding = DataBindingUtil.bind(findViewById(R.id.dialog_container));
|
||||
binding.setClick(this);
|
||||
|
||||
FrameLayout bottomSheet = findViewById(android.support.design.R.id.design_bottom_sheet);
|
||||
FrameLayout bottomSheet = findViewById(R.id.design_bottom_sheet);
|
||||
if (bottomSheet != null) {
|
||||
BottomSheetBehavior.from(bottomSheet).setSkipCollapsed(false);
|
||||
BottomSheetBehavior.from(bottomSheet).setPeekHeight(
|
||||
|
@@ -3,6 +3,8 @@ package com.yizhuan.erban.avroom.fragment;
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.ViewModelProviders;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
@@ -188,7 +190,7 @@ import com.yizhuan.xchat_android_library.utils.config.BasicConfig;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
@@ -3099,7 +3101,7 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notInWorld(@NotNull MiniWorldInWorldInfo miniWorldInWorldInfo) {
|
||||
public void notInWorld(@NonNull MiniWorldInWorldInfo miniWorldInWorldInfo) {
|
||||
messageView.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@@ -1,5 +1,7 @@
|
||||
package com.yizhuan.erban.avroom.view;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.netease.nimlib.sdk.chatroom.model.ChatRoomMember;
|
||||
import com.yizhuan.erban.avroom.widget.ViewItem;
|
||||
import com.yizhuan.xchat_android_core.bean.RoomMicInfo;
|
||||
@@ -7,8 +9,6 @@ import com.yizhuan.xchat_android_core.miniworld.bean.MiniWorldInWorldInfo;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
|
||||
import com.yizhuan.xchat_android_library.base.IMvpBaseView;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -89,7 +89,7 @@ public interface IHomePartyView extends IMvpBaseView {
|
||||
*
|
||||
* @param miniWorldInWorldInfo
|
||||
*/
|
||||
void notInWorld(@NotNull MiniWorldInWorldInfo miniWorldInWorldInfo);
|
||||
void notInWorld(@NonNull MiniWorldInWorldInfo miniWorldInWorldInfo);
|
||||
|
||||
/**
|
||||
* 关注成功
|
||||
|
@@ -19,6 +19,8 @@ import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.netease.nim.uikit.common.util.string.StringUtil;
|
||||
import com.opensource.svgaplayer.SVGACallback;
|
||||
import com.opensource.svgaplayer.SVGADrawable;
|
||||
@@ -37,7 +39,7 @@ import com.yizhuan.xchat_android_core.gift.bean.GiftReceiver;
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_library.utils.ResolutionUtils;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.net.MalformedURLException;
|
||||
@@ -189,7 +191,7 @@ public class GiftEffectView extends RelativeLayout implements SVGACallback {
|
||||
SVGAParser parser = new SVGAParser(getContext());
|
||||
parser.parse(new URL(url), new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onComplete(@NotNull SVGAVideoEntity videoItem) {
|
||||
public void onComplete(@NonNull SVGAVideoEntity videoItem) {
|
||||
SVGADrawable drawable = new SVGADrawable(videoItem);
|
||||
svgaImageView.setImageDrawable(drawable);
|
||||
svgaImageView.startAnimation();
|
||||
|
@@ -9,6 +9,8 @@ import android.view.View;
|
||||
import android.view.animation.AccelerateDecelerateInterpolator;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.netease.nim.uikit.common.util.string.StringUtil;
|
||||
import com.opensource.svgaplayer.SVGACallback;
|
||||
import com.opensource.svgaplayer.SVGADrawable;
|
||||
@@ -23,7 +25,7 @@ import com.yizhuan.erban.ui.gift.widget.GiftDataInfo;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.GiftInfo;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.GiftReceiveInfo;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
@@ -149,7 +151,7 @@ public class GiftView extends RelativeLayout implements SVGACallback {
|
||||
SVGAParser parser = new SVGAParser(getContext());
|
||||
parser.parse(new URL(url), new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onComplete(@NotNull SVGAVideoEntity videoItem) {
|
||||
public void onComplete(@NonNull SVGAVideoEntity videoItem) {
|
||||
SVGADrawable drawable = new SVGADrawable(videoItem);
|
||||
svgaImageView.setImageDrawable(drawable);
|
||||
svgaImageView.startAnimation();
|
||||
|
@@ -33,7 +33,7 @@ public abstract class BaseBsDialog extends BottomSheetDialog {
|
||||
setContentView(getDialogLayout());
|
||||
ButterKnife.bind(this);
|
||||
setCanceledOnTouchOutside(isCanceledOnTouchOutside());
|
||||
FrameLayout bottomSheet = (FrameLayout) findViewById(android.support.design.R.id.design_bottom_sheet);
|
||||
FrameLayout bottomSheet = (FrameLayout) findViewById(R.id.design_bottom_sheet);
|
||||
if (bottomSheet != null) {
|
||||
BottomSheetBehavior.from(bottomSheet).setSkipCollapsed(false);
|
||||
}
|
||||
|
@@ -4,6 +4,8 @@ import android.annotation.TargetApi;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -14,9 +16,6 @@ import com.yizhuan.xchat_android_library.utils.NetworkUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.log.MLog;
|
||||
import com.yizhuan.erban.R;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
||||
/**
|
||||
* Created by xujiexing on 14-4-9.
|
||||
*/
|
||||
@@ -47,7 +46,7 @@ public class ReloadFragment extends AbsStatusFragment {
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NotNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_reload, container, false);
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
|
@@ -106,7 +106,7 @@ public class CommonPopupDialog extends BottomSheetDialog implements OnClickListe
|
||||
mCancelBtn.setVisibility(View.VISIBLE);
|
||||
mCancelBtn.setText(bottomButton.mText);
|
||||
}
|
||||
FrameLayout bottomSheet = findViewById(android.support.design.R.id.design_bottom_sheet);
|
||||
FrameLayout bottomSheet = findViewById(R.id.design_bottom_sheet);
|
||||
if (bottomSheet != null) {
|
||||
BottomSheetBehavior.from(bottomSheet).setSkipCollapsed(false);
|
||||
BottomSheetBehavior.from(bottomSheet).setPeekHeight(
|
||||
|
@@ -35,7 +35,7 @@ public class CarShopAdapter extends BaseAdapter<CarInfo> {
|
||||
ItemCarShopBinding binding = (ItemCarShopBinding) helper.getBinding();
|
||||
boolean isSelect = selectPosition == helper.getAdapterPosition();
|
||||
binding.llCarHolder.setSelected(isSelect);
|
||||
binding.setSelectPosition(isSelect);
|
||||
// binding.setSelectPosition(isSelect);
|
||||
|
||||
if (item.getLabelType() == CarInfo.TAG_TYPE_NORMAL) {
|
||||
binding.ivTag.setVisibility(View.GONE);
|
||||
|
@@ -37,7 +37,7 @@ public class HeadWearShopAdapter extends BaseAdapter<HeadWearInfo> {
|
||||
ItemHeadWearBinding binding = (ItemHeadWearBinding) helper.getBinding();
|
||||
binding.llRoot.setSelected(selectPosition == helper.getAdapterPosition());
|
||||
NobleUtil.loadHeadWears(item.getPic(), binding.ivHeadWear);
|
||||
binding.setSelectPosition(selectPosition == helper.getAdapterPosition());
|
||||
// binding.setSelectPosition(selectPosition == helper.getAdapterPosition());
|
||||
|
||||
if (item.getLabelType() == HeadWearInfo.LABEL_TYPE_NORMAL) {
|
||||
binding.ivTag.setVisibility(View.GONE);
|
||||
|
@@ -71,7 +71,7 @@ import com.yizhuan.xchat_android_core.user.bean.UserInfo;
|
||||
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.StringUtils;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
@@ -537,7 +537,7 @@ public class HomeFragmentAdapter extends BaseMultiItemQuickAdapter<HomeItem, Bas
|
||||
try {
|
||||
svgaParser.decodeFromURL(new URL(badge), new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onComplete(@NotNull SVGAVideoEntity svgaVideoEntity) {
|
||||
public void onComplete(@NonNull SVGAVideoEntity svgaVideoEntity) {
|
||||
SVGADrawable drawable = new SVGADrawable(svgaVideoEntity);
|
||||
ivTabLabel.setImageDrawable(drawable);
|
||||
ivTabLabel.startAnimation();
|
||||
|
@@ -111,7 +111,6 @@ import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.util.ArrayList;
|
||||
@@ -237,7 +236,7 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
|
||||
@Override
|
||||
public void onSetListener() {
|
||||
mBinding.setClick(this);
|
||||
mBinding.setOpenVisible(true);
|
||||
// mBinding.setOpenVisible(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -753,7 +752,7 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
|
||||
/**
|
||||
* 转换成带箭头的文本
|
||||
*/
|
||||
@NotNull
|
||||
@NonNull
|
||||
private SpannableString getArrowSpannableString(boolean isUp, String text) {
|
||||
if (!text.endsWith("[arrow]")) {
|
||||
text = text + " [arrow]";
|
||||
@@ -934,7 +933,7 @@ public class GameHomeFragment extends BaseMvpFragment<IMainFragmentView, MainFra
|
||||
startLocation();
|
||||
|
||||
// 超管不展示开房按钮
|
||||
mBinding.setOpenVisible(!(userInfo != null && userInfo.getPlatformRole() == 1));
|
||||
// mBinding.setOpenVisible(!(userInfo != null && userInfo.getPlatformRole() == 1));
|
||||
}
|
||||
|
||||
public List<View> getHomeBanner(int num) {
|
||||
|
@@ -3,15 +3,15 @@ package com.yizhuan.erban.push;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.netease.nimlib.sdk.mixpush.HWPushMessageReceiver;
|
||||
import com.netease.nimlib.sdk.mixpush.HWPushMessageService;
|
||||
import com.orhanobut.logger.Logger;
|
||||
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
|
||||
|
||||
public class HwPushMessageReceiver extends HWPushMessageReceiver {
|
||||
public class HwPushMessageReceiver extends HWPushMessageService {
|
||||
|
||||
@Override
|
||||
public void onToken(Context context, String token, Bundle extras) {
|
||||
super.onToken(context, token, extras);
|
||||
public void onNewToken(String token) {
|
||||
super.onNewToken(token);
|
||||
StatisticManager.Instance().logToLocalFile("华为推送token:" + token);
|
||||
}
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ public final class Preconditions {
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> T checkNotNull(T value, String message) {
|
||||
public static <T> T checkNonNull(T value, String message) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException(message);
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ import java.security.MessageDigest;
|
||||
*/
|
||||
public class GlideCircleTransform extends BitmapTransformation {
|
||||
public GlideCircleTransform(Context context) {
|
||||
super(context);
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -164,7 +164,7 @@ public class CustSlidingTabLayout extends HorizontalScrollView implements ViewPa
|
||||
mDividerPadding = ta.getDimension(R.styleable.CustSlidingTabLayout_tl_divider_padding, dp2px(12));
|
||||
|
||||
mTextsize = ta.getDimension(R.styleable.CustSlidingTabLayout_tl_textsize, sp2px(14));
|
||||
mTextSizeNormal = ta.getDimension(R.styleable.CustSlidingTabLayout_tl_textsize_normal, mTextsize);
|
||||
// mTextSizeNormal = ta.getDimension(R.styleable.CustSlidingTabLayout_tl_textsize_normal, mTextsize);
|
||||
|
||||
mTextSelectColor = ta.getColor(R.styleable.CustSlidingTabLayout_tl_textSelectColor, Color.parseColor("#ffffff"));
|
||||
mTextUnselectColor = ta.getColor(R.styleable.CustSlidingTabLayout_tl_textUnselectColor, Color.parseColor("#AAffffff"));
|
||||
|
@@ -284,7 +284,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
setContentView(R.layout.dialog_bottom_gift);
|
||||
compositeDisposable = new CompositeDisposable();
|
||||
init(findViewById(R.id.ll_dialog_bottom_gift));
|
||||
FrameLayout bottomSheet = findViewById(android.support.design.R.id.design_bottom_sheet);
|
||||
FrameLayout bottomSheet = findViewById(R.id.design_bottom_sheet);
|
||||
if (bottomSheet != null) {
|
||||
BottomSheetBehavior.from(bottomSheet).setSkipCollapsed(false);
|
||||
BottomSheetBehavior.from(bottomSheet).setHideable(false);
|
||||
|
@@ -78,7 +78,7 @@ public class ShareDialog extends BottomSheetDialog implements View.OnClickListen
|
||||
tvQqZone.setOnClickListener(this);
|
||||
tvCancel.setOnClickListener(this);
|
||||
findViewById(R.id.tv_qq_game).setOnClickListener(this);
|
||||
FrameLayout bottomSheet = (FrameLayout) findViewById(android.support.design.R.id.design_bottom_sheet);
|
||||
FrameLayout bottomSheet = (FrameLayout) findViewById(R.id.design_bottom_sheet);
|
||||
if (bottomSheet != null) {
|
||||
BottomSheetBehavior.from(bottomSheet).setSkipCollapsed(false);
|
||||
}
|
||||
|
@@ -67,7 +67,7 @@ public class DynamicFaceDialog extends BottomSheetDialog
|
||||
setContentView(R.layout.dialog_bottom_face);
|
||||
EventBus.getDefault().register(this);
|
||||
init(findViewById(R.id.rl_dynamic_face_dialog_root));
|
||||
FrameLayout bottomSheet = (FrameLayout) findViewById(android.support.design.R.id.design_bottom_sheet);
|
||||
FrameLayout bottomSheet = (FrameLayout) findViewById(R.id.design_bottom_sheet);
|
||||
if (bottomSheet != null) {
|
||||
BottomSheetBehavior.from(bottomSheet).setSkipCollapsed(false);
|
||||
BottomSheetBehavior.from(bottomSheet).setPeekHeight(
|
||||
|
@@ -10,7 +10,7 @@
|
||||
name="headWearInfo"
|
||||
type="com.yizhuan.xchat_android_core.decoration.headwear.bean.HeadWearInfo" />
|
||||
<variable
|
||||
name="select_position"
|
||||
name="clickPosition"
|
||||
type="Boolean" />
|
||||
</data>
|
||||
|
||||
|
@@ -254,7 +254,7 @@
|
||||
<attr name="tl_textUnselectColor"/>
|
||||
<attr name="tl_textBold"/>
|
||||
<attr name="tl_textAllCaps"/>
|
||||
<attr name="tl_textsize_normal"/>
|
||||
<!-- <attr name="tl_textsize_normal"/>-->
|
||||
</declare-styleable>
|
||||
<declare-styleable name="LimitEditText">
|
||||
<attr name="let_app_cursor" format="boolean" />
|
||||
|
@@ -53,7 +53,7 @@ public class VoiceSeekDialog extends BottomSheetDialog implements SeekBar.OnSeek
|
||||
musicVoiceNum.setText(PlayerModel.get().getCurrentVolume()+"%");
|
||||
voiceNum.setText(PlayerModel.get().getCurrentRecordingVolume()+"%");
|
||||
|
||||
FrameLayout bottomSheet = findViewById(android.support.design.R.id.design_bottom_sheet);
|
||||
FrameLayout bottomSheet = findViewById(R.id.design_bottom_sheet);
|
||||
if (bottomSheet != null) {
|
||||
BottomSheetBehavior.from(bottomSheet).setSkipCollapsed(false);
|
||||
BottomSheetBehavior.from(bottomSheet).setPeekHeight(
|
||||
|
@@ -12,6 +12,8 @@ import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.opensource.svgaplayer.SVGADrawable;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.opensource.svgaplayer.SVGAParser;
|
||||
@@ -26,7 +28,7 @@ import com.yizhuan.xchat_android_core.gift.bean.GiftInfo;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.GiftReceiveInfo;
|
||||
import com.yizhuan.xchat_android_core.utils.ActivityUtil;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
@@ -106,7 +108,7 @@ public class PublicChatHallGiftAnimationDialog extends BaseSdDialog {
|
||||
try {
|
||||
svgaParser.parse(new URL("https://img.erbanyy.com/public_chat_spring.svga"), new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onComplete(@NotNull SVGAVideoEntity svgaVideoEntity) {
|
||||
public void onComplete(@NonNull SVGAVideoEntity svgaVideoEntity) {
|
||||
SVGADrawable drawable = new SVGADrawable(svgaVideoEntity);
|
||||
svgaImageView.setImageDrawable(drawable);
|
||||
svgaImageView.startAnimation();
|
||||
|
Reference in New Issue
Block a user