feat:修改启动背景图
feat:修改Application类名
This commit is contained in:
@@ -146,7 +146,7 @@ android {
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
def server_url_debug = '"http://beta.api.pikolive.fun/"'
|
||||
def server_url_debug = '"http://api.pikolive.fun/"'
|
||||
def server_url_release = '"https://api.pikolive.fun/"'
|
||||
|
||||
debug {
|
||||
|
@@ -84,7 +84,7 @@
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||
|
||||
<application
|
||||
android:name="com.bingchuang.app.application.XChatApplication"
|
||||
android:name="com.bingchuang.app.application.App"
|
||||
android:allowBackup="false"
|
||||
android:icon="@mipmap/app_logo"
|
||||
android:label="@string/app_name"
|
||||
|
@@ -42,12 +42,11 @@ import com.bingchuang.core.settings.SettingsModel;
|
||||
import com.trello.rxlifecycle3.android.ActivityEvent;
|
||||
import com.bingchuang.app.application.IReportConstants;
|
||||
import com.bingchuang.app.application.ReportManager;
|
||||
import com.bingchuang.app.application.XChatApplication;
|
||||
import com.bingchuang.app.application.App;
|
||||
import com.bingchuang.app.avroom.activity.AVRoomActivity;
|
||||
import com.bingchuang.app.base.BaseMvpActivity;
|
||||
import com.bingchuang.app.common.widget.CircleImageView;
|
||||
import com.bingchuang.app.common.widget.DragLayout;
|
||||
import com.bingchuang.app.R;
|
||||
import com.bingchuang.app.community.dynamic.view.DynamicDetailActivity;
|
||||
import com.bingchuang.app.community.publish.view.PublishActivity;
|
||||
import com.bingchuang.app.community.square.SquareFragment;
|
||||
@@ -861,7 +860,7 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onImPushMsgPmLimitTimeEvent(ImPushMsgPmLimitTimeEvent event) {
|
||||
//先判断Avroom存不存在,存在的话则不处理,avroom会处理
|
||||
Activity reference = XChatApplication.gStack.getAvRoomActivity();
|
||||
Activity reference = App.gStack.getAvRoomActivity();
|
||||
if (reference != null) {
|
||||
return;
|
||||
}
|
||||
|
@@ -112,8 +112,8 @@ import io.realm.RealmConfiguration;
|
||||
* @date 2017/2/11
|
||||
*/
|
||||
|
||||
public class XChatApplication extends BaseApp {
|
||||
public static final String TAG = "XChatApplication";
|
||||
public class App extends BaseApp {
|
||||
public static final String TAG = "App";
|
||||
public static Application gContext;
|
||||
private static final MessageNotifierCustomization messageNotifierCustomization = new MessageNotifierCustomization() {
|
||||
@Override
|
||||
@@ -127,7 +127,7 @@ public class XChatApplication extends BaseApp {
|
||||
}
|
||||
}
|
||||
// 采用SDK默认文案
|
||||
return ResUtil.getString(R.string.erban_application_xchatapplication_01);
|
||||
return ResUtil.getString(R.string.erban_application_01);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -143,7 +143,7 @@ public class XChatApplication extends BaseApp {
|
||||
}
|
||||
}
|
||||
// 采用SDK默认文案
|
||||
return ResUtil.getString(R.string.erban_application_xchatapplication_02);
|
||||
return ResUtil.getString(R.string.erban_application_02);
|
||||
}
|
||||
|
||||
private String getContentFromOpenSignIn(CustomAttachment attachment) {
|
||||
@@ -155,7 +155,7 @@ public class XChatApplication extends BaseApp {
|
||||
}
|
||||
}
|
||||
if (TextUtils.isEmpty(result)) {
|
||||
result = ResUtil.getString(R.string.erban_application_xchatapplication_03);
|
||||
result = ResUtil.getString(R.string.erban_application_03);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -170,7 +170,7 @@ public class XChatApplication extends BaseApp {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
private static XChatApplication instance;
|
||||
private static App instance;
|
||||
//生命周期监听
|
||||
private static AppLifeCycleHelper lifeCycleHelper;
|
||||
public static ActivityStack gStack = new ActivityStack();
|
||||
@@ -189,7 +189,7 @@ public class XChatApplication extends BaseApp {
|
||||
(context, layout) -> new ClassicsFooter(context).setDrawableSize(20));
|
||||
}
|
||||
|
||||
public static XChatApplication instance() {
|
||||
public static App instance() {
|
||||
return instance;
|
||||
}
|
||||
|
@@ -50,7 +50,7 @@ public class GlobalHandleManager {
|
||||
}
|
||||
|
||||
public Activity getActivity() {
|
||||
return XChatApplication.gStack.getTopActivity();
|
||||
return App.gStack.getTopActivity();
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
|
@@ -28,7 +28,7 @@ import com.netease.nim.uikit.common.util.sys.ScreenUtil;
|
||||
import com.netease.nim.uikit.support.glide.GlideApp;
|
||||
import com.opensource.svgaplayer.SVGADynamicEntity;
|
||||
import com.bingchuang.app.R;
|
||||
import com.bingchuang.app.application.XChatApplication;
|
||||
import com.bingchuang.app.application.App;
|
||||
|
||||
public class AnimHelper {
|
||||
|
||||
@@ -88,7 +88,7 @@ public class AnimHelper {
|
||||
LogUtils.e("addDynamicImage: url or forKey is null or empty");
|
||||
return;
|
||||
}
|
||||
GlideApp.with(XChatApplication.instance())
|
||||
GlideApp.with(App.instance())
|
||||
.asBitmap()
|
||||
.circleCrop()
|
||||
.load(url)
|
||||
|
@@ -17,7 +17,7 @@ import androidx.recyclerview.widget.OrientationHelper;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.bingchuang.app.application.XChatApplication;
|
||||
import com.bingchuang.app.application.App;
|
||||
|
||||
/**
|
||||
* A custom LayoutManager to build a {@link android.widget.Gallery} or a {@link ViewPager}like {@link RecyclerView} and
|
||||
@@ -107,7 +107,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
|
||||
@Override
|
||||
public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.d(TAG, "onLayoutChildren() called with: state = [" + state + "]");
|
||||
}
|
||||
if (getItemCount() == 0) {
|
||||
@@ -119,7 +119,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
return;
|
||||
}
|
||||
if (state.getItemCount() != 0 && !state.didStructureChange()) {
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.d(TAG, "onLayoutChildren: ignore extra layout step");
|
||||
}
|
||||
return;
|
||||
@@ -137,7 +137,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
|
||||
|
||||
private void reset() {
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.d(TAG, "reset: ");
|
||||
}
|
||||
if (mState != null) {
|
||||
@@ -165,7 +165,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
firstFillWithVertical(recycler, state);
|
||||
}
|
||||
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.d(TAG, "firstFillCover finish:first: " + mFirstVisiblePosition + ",last:" + mLastVisiblePos);
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
int distance = calculateDistanceCenter(child, pendingOffset);
|
||||
int childLength = mOrientation == GalleryLayoutManager.HORIZONTAL ? child.getWidth() : child.getHeight();
|
||||
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.d(TAG, "calculateToCenterFraction: distance:" + distance + ",childLength:" + childLength);
|
||||
}
|
||||
return Math.max(-1.f, Math.min(1.f, distance * 1.f / childLength));
|
||||
@@ -448,7 +448,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
* @param dy
|
||||
*/
|
||||
private void fillWithVertical(RecyclerView.Recycler recycler, RecyclerView.State state, int dy) {
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.d(TAG, "fillWithVertical: dy:" + dy);
|
||||
}
|
||||
int topEdge = getOrientationHelper().getStartAfterPadding();
|
||||
@@ -463,14 +463,14 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
for (int i = 0; i < getChildCount(); i++) {
|
||||
child = getChildAt(i + fixIndex);
|
||||
if (getDecoratedBottom(child) - dy < topEdge) {
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.v(TAG, "fillWithVertical: removeAndRecycleView:" + getPosition(child) + ",bottom:" + getDecoratedBottom(child));
|
||||
}
|
||||
removeAndRecycleView(child, recycler);
|
||||
mFirstVisiblePosition++;
|
||||
fixIndex--;
|
||||
} else {
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.d(TAG, "fillWithVertical: break:" + getPosition(child) + ",bottom:" + getDecoratedBottom(child));
|
||||
}
|
||||
break;
|
||||
@@ -481,7 +481,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
for (int i = getChildCount() - 1; i >= 0; i--) {
|
||||
child = getChildAt(i);
|
||||
if (getDecoratedTop(child) - dy > bottomEdge) {
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.v(TAG, "fillWithVertical: removeAndRecycleView:" + getPosition(child));
|
||||
}
|
||||
removeAndRecycleView(child, recycler);
|
||||
@@ -529,7 +529,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
layoutDecorated(scrap, scrapRect.left, scrapRect.top, scrapRect.right, scrapRect.bottom);
|
||||
startOffset = scrapRect.bottom;
|
||||
mLastVisiblePos = i;
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.d(TAG, "fillWithVertical: add view:" + i + ",startOffset:" + startOffset + ",mLastVisiblePos:" + mLastVisiblePos + ",bottomEdge" + bottomEdge);
|
||||
}
|
||||
}
|
||||
@@ -568,7 +568,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
private void fillWithHorizontal(RecyclerView.Recycler recycler, RecyclerView.State state, int dx) {
|
||||
int leftEdge = getOrientationHelper().getStartAfterPadding();
|
||||
int rightEdge = getOrientationHelper().getEndAfterPadding();
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.v(TAG, "fillWithHorizontal() called with: dx = [" + dx + "],leftEdge:" + leftEdge + ",rightEdge:" + rightEdge);
|
||||
}
|
||||
//1.remove and recycle the view that disappear in screen
|
||||
@@ -583,7 +583,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
removeAndRecycleView(child, recycler);
|
||||
mFirstVisiblePosition++;
|
||||
fixIndex--;
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.v(TAG, "fillWithHorizontal:removeAndRecycleView:" + getPosition(child) + " mFirstVisiblePosition change to:" + mFirstVisiblePosition);
|
||||
}
|
||||
} else {
|
||||
@@ -597,7 +597,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
if (getDecoratedLeft(child) - dx > rightEdge) {
|
||||
removeAndRecycleView(child, recycler);
|
||||
mLastVisiblePos--;
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.v(TAG, "fillWithHorizontal:removeAndRecycleView:" + getPosition(child) + "mLastVisiblePos change to:" + mLastVisiblePos);
|
||||
}
|
||||
}
|
||||
@@ -618,7 +618,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
View lastView = getChildAt(getChildCount() - 1);
|
||||
startPosition = getPosition(lastView) + 1; //start layout from next position item
|
||||
startOffset = getDecoratedRight(lastView);
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.d(TAG, "fillWithHorizontal:to right startPosition:" + startPosition + ",startOffset:" + startOffset + ",rightEdge:" + rightEdge);
|
||||
}
|
||||
}
|
||||
@@ -644,7 +644,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
layoutDecorated(scrap, scrapRect.left, scrapRect.top, scrapRect.right, scrapRect.bottom);
|
||||
startOffset = scrapRect.right;
|
||||
mLastVisiblePos = i;
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.d(TAG, "fillWithHorizontal,layout:mLastVisiblePos: " + mLastVisiblePos);
|
||||
}
|
||||
}
|
||||
@@ -654,7 +654,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
View firstView = getChildAt(0);
|
||||
startPosition = getPosition(firstView) - 1; //start layout from previous position item
|
||||
startOffset = getDecoratedLeft(firstView);
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.d(TAG, "fillWithHorizontal:to left startPosition:" + startPosition + ",startOffset:" + startOffset + ",leftEdge:" + leftEdge + ",child count:" + getChildCount());
|
||||
}
|
||||
}
|
||||
@@ -773,7 +773,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
delta = -Math.min(0, Math.max(dx, ((child.getRight() - child.getLeft()) / 2 + child.getLeft()) - parentCenter));
|
||||
}
|
||||
}
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.d(TAG, "scrollHorizontallyBy: dx:" + dx + ",fixed:" + delta);
|
||||
}
|
||||
getState().mScrollDelta = -delta;
|
||||
@@ -803,7 +803,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
delta = -Math.min(0, Math.max(dy, (getDecoratedBottom(child) - getDecoratedTop(child)) / 2 + getDecoratedTop(child) - parentCenter));
|
||||
}
|
||||
}
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.d(TAG, "scrollVerticallyBy: dy:" + dy + ",fixed:" + delta);
|
||||
}
|
||||
getState().mScrollDelta = -delta;
|
||||
@@ -948,7 +948,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
mCurSelectedView.setSelected(true);
|
||||
mCurSelectedPosition = selectedPosition;
|
||||
if (!mCallbackInFling && mState != SCROLL_STATE_IDLE) {
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.v(TAG, "ignore selection change callback when fling ");
|
||||
}
|
||||
mCallbackOnIdle = true;
|
||||
@@ -959,7 +959,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
}
|
||||
}
|
||||
}
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.v(TAG, "onScrolled: dx:" + dx + ",dy:" + dy);
|
||||
}
|
||||
}
|
||||
@@ -968,7 +968,7 @@ public class GalleryLayoutManager extends RecyclerView.LayoutManager implements
|
||||
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
|
||||
super.onScrollStateChanged(recyclerView, newState);
|
||||
mState = newState;
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
Log.v(TAG, "onScrollStateChanged: " + newState);
|
||||
}
|
||||
if (mState == SCROLL_STATE_IDLE) {
|
||||
|
@@ -65,7 +65,7 @@ import com.bingchuang.app.NimMiddleActivity;
|
||||
import com.bingchuang.app.R;
|
||||
import com.bingchuang.app.application.IReportConstants;
|
||||
import com.bingchuang.app.application.ReportManager;
|
||||
import com.bingchuang.app.application.XChatApplication;
|
||||
import com.bingchuang.app.application.App;
|
||||
import com.bingchuang.app.avroom.activity.AVRoomActivity;
|
||||
import com.bingchuang.app.avroom.firstcharge.FirstChargeDialog;
|
||||
import com.bingchuang.app.avroom.redpackage.RedPackageGoRoomDialog;
|
||||
@@ -906,7 +906,7 @@ public abstract class BaseActivity extends RxAppCompatActivity
|
||||
if (second == CUSTOM_MESS_SUB_OPENNOBLE || second == CUSTOM_MESS_SUB_RENEWNOBLE) {
|
||||
NobleProtocol.DataBean data = JSON.parseObject(String.valueOf(baseProtocol.getData()), NobleProtocol.DataBean.class);
|
||||
NobleInfo nobleInfo;
|
||||
if (data == null || (nobleInfo = data.getNobleInfo()) == null || (data.getUid() < DEBUG_MAX_UID && !XChatApplication.isDebug()))
|
||||
if (data == null || (nobleInfo = data.getNobleInfo()) == null || (data.getUid() < DEBUG_MAX_UID && !App.isDebug()))
|
||||
return;
|
||||
|
||||
int type = data.getType();
|
||||
|
@@ -3,7 +3,7 @@ package com.bingchuang.app.common.app;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
|
||||
import com.bingchuang.app.application.XChatApplication;
|
||||
import com.bingchuang.app.application.App;
|
||||
import com.bingchuang.app.avroom.activity.AVRoomActivity;
|
||||
import com.bingchuang.app.utils.ActWhiteListMrg;
|
||||
import com.bingchuang.core.utils.Logger;
|
||||
@@ -57,7 +57,7 @@ public class ActivityStack {
|
||||
context = mActivity.get(mActivity.size() - 1).get();
|
||||
}
|
||||
if (context == null) {
|
||||
context = XChatApplication.gContext;
|
||||
context = App.gContext;
|
||||
}
|
||||
}
|
||||
return context;
|
||||
|
@@ -12,7 +12,7 @@ import android.view.Window
|
||||
import android.view.WindowManager
|
||||
import com.hjq.toast.ToastUtils
|
||||
import com.bingchuang.app.R
|
||||
import com.bingchuang.app.application.XChatApplication
|
||||
import com.bingchuang.app.application.App
|
||||
import com.bingchuang.app.databinding.PhotoDialogBinding
|
||||
import com.bingchuang.app.ui.widget.dialog.CommonTipDialog
|
||||
import com.bingchuang.library.common.base.BaseDialogFragment
|
||||
@@ -74,7 +74,7 @@ class PhotoDialog : BaseDialogFragment<PhotoDialogBinding>(), EasyPermissions.Pe
|
||||
|
||||
private fun checkStoragePermission1() {
|
||||
if (!EasyPermissions.hasPermissions(
|
||||
XChatApplication.gContext, if (Build.VERSION.SDK_INT >= 33) Manifest.permission.READ_MEDIA_IMAGES else Manifest.permission.READ_EXTERNAL_STORAGE
|
||||
App.gContext, if (Build.VERSION.SDK_INT >= 33) Manifest.permission.READ_MEDIA_IMAGES else Manifest.permission.READ_EXTERNAL_STORAGE
|
||||
)
|
||||
) {
|
||||
EasyPermissions.requestPermissions(
|
||||
@@ -90,7 +90,7 @@ class PhotoDialog : BaseDialogFragment<PhotoDialogBinding>(), EasyPermissions.Pe
|
||||
|
||||
private fun checkCameraPermission() {
|
||||
if (!EasyPermissions.hasPermissions(
|
||||
XChatApplication.gContext,
|
||||
App.gContext,
|
||||
Manifest.permission.CAMERA
|
||||
)
|
||||
) {
|
||||
@@ -107,7 +107,7 @@ class PhotoDialog : BaseDialogFragment<PhotoDialogBinding>(), EasyPermissions.Pe
|
||||
|
||||
private fun checkStoragePermission2() {
|
||||
if (!EasyPermissions.hasPermissions(
|
||||
XChatApplication.gContext, if (Build.VERSION.SDK_INT >= 33)
|
||||
App.gContext, if (Build.VERSION.SDK_INT >= 33)
|
||||
Manifest.permission.READ_MEDIA_IMAGES else Manifest.permission.READ_EXTERNAL_STORAGE
|
||||
)
|
||||
) {
|
||||
@@ -213,7 +213,7 @@ class PhotoDialog : BaseDialogFragment<PhotoDialogBinding>(), EasyPermissions.Pe
|
||||
if (!TextUtils.isEmpty(path)) {
|
||||
mJob?.cancel()
|
||||
mJob = PhotoCompressUtil.compress(
|
||||
XChatApplication.gContext,
|
||||
App.gContext,
|
||||
path,
|
||||
PhotoCompressUtil.getCompressCachePath(),
|
||||
object : PhotoCompressCallback {
|
||||
@@ -240,7 +240,7 @@ class PhotoDialog : BaseDialogFragment<PhotoDialogBinding>(), EasyPermissions.Pe
|
||||
} else {
|
||||
mJob?.cancel()
|
||||
mJob = PhotoCompressUtil.compress(
|
||||
XChatApplication.gContext,
|
||||
App.gContext,
|
||||
paths,
|
||||
PhotoCompressUtil.getCompressCachePath(),
|
||||
object : PhotosCompressCallback {
|
||||
|
@@ -6,7 +6,7 @@ import android.os.Bundle;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.bingchuang.app.application.XChatApplication;
|
||||
import com.bingchuang.app.application.App;
|
||||
import com.bingchuang.core.auth.AuthModel;
|
||||
|
||||
import com.bingchuang.library.common.util.CoreUtils;
|
||||
@@ -22,7 +22,7 @@ public class AppLifeCycleHelper implements Application.ActivityLifecycleCallback
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(@NonNull Activity activity, @Nullable Bundle bundle) {
|
||||
XChatApplication.gStack.onActivityCreated(activity);
|
||||
App.gStack.onActivityCreated(activity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -39,7 +39,7 @@ public class AppLifeCycleHelper implements Application.ActivityLifecycleCallback
|
||||
|
||||
@Override
|
||||
public void onActivityResumed(@NonNull Activity activity) {
|
||||
XChatApplication.gStack.onActivityResumed(activity);
|
||||
App.gStack.onActivityResumed(activity);
|
||||
// Adjust.onResume();
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class AppLifeCycleHelper implements Application.ActivityLifecycleCallback
|
||||
|
||||
@Override
|
||||
public void onActivityDestroyed(@NonNull Activity activity) {
|
||||
XChatApplication.gStack.onActivityDestroyed(activity);
|
||||
App.gStack.onActivityDestroyed(activity);
|
||||
}
|
||||
|
||||
private static void onForeground() {
|
||||
|
@@ -6,7 +6,7 @@ import android.graphics.Matrix;
|
||||
import android.graphics.Point;
|
||||
import android.net.Uri;
|
||||
|
||||
import com.bingchuang.app.application.XChatApplication;
|
||||
import com.bingchuang.app.application.App;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileDescriptor;
|
||||
@@ -108,7 +108,7 @@ public class BitmapUtil {
|
||||
options.inPreferredConfig = inPreferredConfig;
|
||||
}
|
||||
try {
|
||||
InputStream stream = XChatApplication.gContext.getContentResolver().openInputStream(imageUri);
|
||||
InputStream stream = App.gContext.getContentResolver().openInputStream(imageUri);
|
||||
BitmapFactory.decodeStream(stream, null, options);
|
||||
switch (options.inPreferredConfig) {
|
||||
case ALPHA_8:
|
||||
@@ -133,7 +133,7 @@ public class BitmapUtil {
|
||||
if (bitmap == null) {
|
||||
return null;
|
||||
}
|
||||
float density = XChatApplication.gContext.getResources().getDisplayMetrics().density;
|
||||
float density = App.gContext.getResources().getDisplayMetrics().density;
|
||||
return BitmapUtil.setImgSize(bitmap, bitmap.getWidth() * density / 3.0f, bitmap.getHeight() * density / 3.0f);
|
||||
}
|
||||
|
||||
|
@@ -28,7 +28,7 @@ import com.trello.rxlifecycle3.android.ActivityEvent
|
||||
import com.yalantis.ucrop.UCrop
|
||||
import com.bingchuang.app.R
|
||||
import com.bingchuang.app.UIHelper
|
||||
import com.bingchuang.app.application.XChatApplication
|
||||
import com.bingchuang.app.application.App
|
||||
import com.bingchuang.app.audio.SoundSignatureActivity
|
||||
import com.bingchuang.app.base.BaseViewBindingActivity
|
||||
import com.bingchuang.app.common.util.BitmapUtil
|
||||
@@ -633,13 +633,13 @@ class UserInfoModifyActivity : BaseViewBindingActivity<ActivityUserInfoModifyBin
|
||||
setShowCropGrid(false)
|
||||
setToolbarColor(
|
||||
ContextCompat.getColor(
|
||||
XChatApplication.gContext,
|
||||
App.gContext,
|
||||
android.R.color.black
|
||||
)
|
||||
)
|
||||
setStatusBarColor(
|
||||
ContextCompat.getColor(
|
||||
XChatApplication.gContext,
|
||||
App.gContext,
|
||||
android.R.color.black
|
||||
)
|
||||
)
|
||||
@@ -649,7 +649,7 @@ class UserInfoModifyActivity : BaseViewBindingActivity<ActivityUserInfoModifyBin
|
||||
setToolbarCropDrawable(R.drawable.user_ucrop_ic_sure)
|
||||
setToolbarWidgetColor(
|
||||
ContextCompat.getColor(
|
||||
XChatApplication.gContext,
|
||||
App.gContext,
|
||||
R.color.color_white
|
||||
)
|
||||
)
|
||||
|
@@ -18,7 +18,7 @@ import com.netease.nim.uikit.StatusBarUtil
|
||||
import com.trello.rxlifecycle3.android.ActivityEvent
|
||||
import com.yalantis.ucrop.UCrop
|
||||
import com.bingchuang.app.R
|
||||
import com.bingchuang.app.application.XChatApplication
|
||||
import com.bingchuang.app.application.App
|
||||
import com.bingchuang.app.base.TitleBar
|
||||
import com.bingchuang.app.common.util.BitmapUtil
|
||||
import com.bingchuang.app.ui.user.adapter.UserModifyPhotosAdapter
|
||||
@@ -262,7 +262,7 @@ class UserModifyPhotosActivity : TakePhotoActivity(), PhotoItemClickListener,
|
||||
try {
|
||||
mJob?.cancel()
|
||||
mJob = PhotoCompressUtil.compress(
|
||||
XChatApplication.gContext,
|
||||
App.gContext,
|
||||
it,
|
||||
PhotoCompressUtil.getCompressCachePath(),
|
||||
object : PhotoCompressCallback {
|
||||
@@ -322,13 +322,13 @@ class UserModifyPhotosActivity : TakePhotoActivity(), PhotoItemClickListener,
|
||||
setShowCropGrid(false)
|
||||
setToolbarColor(
|
||||
ContextCompat.getColor(
|
||||
XChatApplication.gContext,
|
||||
App.gContext,
|
||||
android.R.color.black
|
||||
)
|
||||
)
|
||||
setStatusBarColor(
|
||||
ContextCompat.getColor(
|
||||
XChatApplication.gContext,
|
||||
App.gContext,
|
||||
android.R.color.black
|
||||
)
|
||||
)
|
||||
@@ -338,7 +338,7 @@ class UserModifyPhotosActivity : TakePhotoActivity(), PhotoItemClickListener,
|
||||
setToolbarCropDrawable(R.drawable.user_ucrop_ic_sure)
|
||||
setToolbarWidgetColor(
|
||||
ContextCompat.getColor(
|
||||
XChatApplication.gContext,
|
||||
App.gContext,
|
||||
R.color.color_white
|
||||
)
|
||||
)
|
||||
|
@@ -41,7 +41,7 @@ import com.bingchuang.app.ui.webview.event.ShowNavEvent;
|
||||
import com.bingchuang.app.ui.webview.event.TaroPayResultEvent;
|
||||
import com.trello.rxlifecycle3.android.ActivityEvent;
|
||||
import com.bingchuang.app.R;
|
||||
import com.bingchuang.app.application.XChatApplication;
|
||||
import com.bingchuang.app.application.App;
|
||||
import com.bingchuang.app.base.BaseActivity;
|
||||
import com.bingchuang.app.ui.im.RouterHandler;
|
||||
import com.bingchuang.app.ui.widget.ShareDialog;
|
||||
@@ -177,7 +177,7 @@ public class CommonWebViewActivity extends BaseActivity implements ShareDialog.O
|
||||
.subscribe(shareH5Event -> {
|
||||
WebJsBeanInfo webJsBeanInfo = shareH5Event.getWebJsBeanInfo();
|
||||
if (webJsBeanInfo != null) {
|
||||
if (XChatApplication.isDebug()) {
|
||||
if (App.isDebug()) {
|
||||
toast("WebJsBeanInfo->" + new Gson().toJson(webJsBeanInfo));
|
||||
}
|
||||
mWebJsBeanInfo = webJsBeanInfo;
|
||||
|
@@ -9,7 +9,7 @@ import android.webkit.JavascriptInterface;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.orhanobut.logger.Logger;
|
||||
import com.tencent.vasdolly.helper.ChannelReaderUtil;
|
||||
import com.bingchuang.app.application.XChatApplication;
|
||||
import com.bingchuang.app.application.App;
|
||||
import com.bingchuang.core2.XChatConstants;
|
||||
import com.bingchuang.core.Constants;
|
||||
import com.bingchuang.library.utils.AppUtils;
|
||||
@@ -89,7 +89,7 @@ public class SimpleJSInterface {
|
||||
@JavascriptInterface
|
||||
public String getChannel() {
|
||||
String channel;
|
||||
channel = ChannelReaderUtil.getChannel(XChatApplication.instance());
|
||||
channel = ChannelReaderUtil.getChannel(App.instance());
|
||||
if (TextUtils.isEmpty(channel)) {
|
||||
channel = Constants.GOOGLE;
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ import android.util.Log;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.bingchuang.app.application.XChatApplication;
|
||||
import com.bingchuang.app.application.App;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
@@ -33,7 +33,7 @@ public class ClipboardUtils {
|
||||
*/
|
||||
public static void copyText(final CharSequence text) {
|
||||
try {
|
||||
ClipboardManager cm = (ClipboardManager) XChatApplication.getApplication().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
ClipboardManager cm = (ClipboardManager) App.getApplication().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
cm.setPrimaryClip(ClipData.newPlainText("text", text));
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "copyText", e);
|
||||
@@ -102,7 +102,7 @@ public class ClipboardUtils {
|
||||
*/
|
||||
private static String getTextFromClip() {
|
||||
try {
|
||||
ClipboardManager clipboardManager = (ClipboardManager) XChatApplication.getApplication().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
ClipboardManager clipboardManager = (ClipboardManager) App.getApplication().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
if (null == clipboardManager || !clipboardManager.hasPrimaryClip()) {
|
||||
return "";
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@ import android.view.Gravity;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.bingchuang.app.application.XChatApplication;
|
||||
import com.bingchuang.app.application.App;
|
||||
import com.bingchuang.app.ui.widget.MarqueeLayout;
|
||||
import com.bingchuang.library.utils.SizeUtils;
|
||||
|
||||
@@ -31,7 +31,7 @@ public class FloatManager {
|
||||
}
|
||||
|
||||
private FloatManager() {
|
||||
mWindowManager = (WindowManager) XChatApplication.instance().getSystemService(Context.WINDOW_SERVICE);
|
||||
mWindowManager = (WindowManager) App.instance().getSystemService(Context.WINDOW_SERVICE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 69 KiB |
@@ -3,12 +3,12 @@
|
||||
<item>
|
||||
<bitmap
|
||||
android:gravity="fill"
|
||||
android:src="@drawable/splash_bg" />
|
||||
android:src="@drawable/login_bg" />
|
||||
</item>
|
||||
|
||||
<item android:top="200dp">
|
||||
<bitmap
|
||||
android:gravity="center_horizontal|top"
|
||||
android:src="@drawable/splash_logo" />
|
||||
android:src="@mipmap/app_logo" />
|
||||
</item>
|
||||
</layer-list>
|
||||
|
@@ -1129,10 +1129,10 @@
|
||||
<string name="takephoto_permission_permissionmanager_05">沒有拍照權限</string>
|
||||
<string name="takephoto_permission_permissionmanager_06">沒有讀寫SD卡權限</string>
|
||||
<string name="takephoto_uitl_timagefiles_01">InputStream 寫入文件出錯:</string>
|
||||
<string name="erban_application_xchatapplication_01">收到一條消息</string>
|
||||
<string name="erban_application_xchatapplication_02">收到一條消息</string>
|
||||
<string name="erban_application_xchatapplication_03">收到一條消息</string>
|
||||
<string name="erban_application_xchatapplication_04">應用啟動</string>
|
||||
<string name="erban_application_01">收到一條消息</string>
|
||||
<string name="erban_application_02">收到一條消息</string>
|
||||
<string name="erban_application_03">收到一條消息</string>
|
||||
<string name="erban_application_04">應用啟動</string>
|
||||
<string name="audio_adapter_myvoicelistadapter_01">%d人聽過</string>
|
||||
<string name="audio_adapter_myvoicelistadapter_02">%d人喜歡</string>
|
||||
<string name="erban_audio_audiorecordactivity_01">當前正在房間無法錄音,是否關閉房間?</string>
|
||||
|
@@ -53,7 +53,7 @@ public final class RxNetManager {
|
||||
|
||||
mBuilder = new OkHttpClient.Builder();
|
||||
|
||||
if (RxNetLog.DEBUG) {
|
||||
// if (RxNetLog.DEBUG) {
|
||||
//正式环境千万不要加这玩意,为了方便日志查看,拦截器里面加了synchronized关键字,接口请求是串行的
|
||||
HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(new HttpLoggingInterceptor.Logger() {
|
||||
@Override
|
||||
@@ -65,7 +65,7 @@ public final class RxNetManager {
|
||||
mBuilder.addInterceptor(loggingInterceptor);
|
||||
|
||||
mBuilder.addNetworkInterceptor(new StethoInterceptor());
|
||||
}
|
||||
// }
|
||||
|
||||
for (Interceptor interceptor : interceptors) {
|
||||
mBuilder.addInterceptor(interceptor);
|
||||
|
Reference in New Issue
Block a user