Commit dbd4a432 by gao.chao

代码整理

parent 0f2a0b2f
......@@ -58,5 +58,6 @@ dependencies {
api project(':fastDevelop')
api project(':web')
api project(':map')
api project(':other')
implementation 'com.google.android.material:material:1.0.0'
}
......@@ -6,8 +6,8 @@ import android.view.View;
import androidx.annotation.Nullable;
import com.mayi.demo.R;
import com.mayi.fastdevelop.bean.AppConfig;
import com.mayi.fastdevelop.commonpage.UpdateDownLoadAPKActvity;
import com.mayi.fastdevelop.commonpage.updateAPP.DownLoadAPKConfig;
import com.mayi.fastdevelop.commonpage.updateAPP.UpdateDownLoadAPKActvity;
public class DownLoadAPKActivity extends UpdateDownLoadAPKActvity {
......@@ -31,7 +31,7 @@ public class DownLoadAPKActivity extends UpdateDownLoadAPKActvity {
private void forceUpdateDownLoadAPK() {
AppConfig appConfig = new AppConfig();
DownLoadAPKConfig appConfig = new DownLoadAPKConfig();
appConfig.setServerVersion(3);
appConfig.setFileSize("40");
appConfig.setForceUpdate(true);
......@@ -42,7 +42,7 @@ public class DownLoadAPKActivity extends UpdateDownLoadAPKActvity {
}
private void UpdateDownLoadAPK() {
AppConfig appConfig = new AppConfig();
DownLoadAPKConfig appConfig = new DownLoadAPKConfig();
appConfig.setNeedUpdate(true);
appConfig.setServerVersion(3);
appConfig.setFileSize("40");
......
......@@ -5,7 +5,7 @@ import android.os.Bundle;
import com.mayi.demo.R;
import com.mayi.fastdevelop.base.BaseActivity;
import com.mayi.fastdevelop.view.AppPlayerView;
import com.mayi.other.AppPlayerView;
public class PlayerActivtiy2 extends BaseActivity {
......
......@@ -4,7 +4,7 @@
android:layout_height="match_parent"
android:orientation="vertical">
<com.mayi.fastdevelop.view.AppPlayerView
<com.mayi.other.AppPlayerView
android:id="@+id/player"
android:layout_width="match_parent"
android:layout_height="match_parent" />
......
......@@ -49,6 +49,5 @@ dependencies {
api 'com.alibaba:fastjson:1.2.12'
api files('libs/zixing-core-3.2.0.jar')
api 'com.gc:call:1.0.0'
api 'com.google.android.exoplayer:exoplayer:2.10.5'
api 'com.tencent:mmkv:1.0.23'
}
\ No newline at end of file
......@@ -2,7 +2,6 @@ package com.mayi.fastdevelop.base;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AlphaAnimation;
......@@ -133,7 +132,6 @@ public abstract class BaseListActivity<T, VH extends BaseViewHolder<T>> extends
handler.post(new Runnable() {
@Override
public void run() {
Log.i("11111", "loading");
if (!isLoadMore && recyclerView.getScrollState() == RecyclerView.SCROLL_STATE_IDLE) {
if (manager.findLastVisibleItemPosition() + 5 > recyclerView.getAdapter().getItemCount()) {
isLoadMore = true;
......
package com.mayi.fastdevelop.view.installapk;
package com.mayi.fastdevelop.commonpage.updateAPP;
import android.Manifest;
import android.content.Context;
......@@ -9,7 +9,6 @@ import android.widget.ProgressBar;
import android.widget.TextView;
import com.mayi.fastdevelop.R;
import com.mayi.fastdevelop.bean.AppConfig;
import com.mayi.fastdevelop.comnon.Key;
import com.mayi.fastdevelop.util.ActivitysManager;
import com.mayi.fastdevelop.util.DownLoadUtil;
......@@ -42,7 +41,7 @@ public class AppUpgradeManager {
/**
* 显示更新提示
*/
public void showUpdateTipDialog(final AppConfig info) {
public void showUpdateTipDialog(final DownLoadAPKConfig info) {
if (!info.isNeedUpdate()) {
return;
}
......
package com.mayi.fastdevelop.bean;
package com.mayi.fastdevelop.commonpage.updateAPP;
import java.io.Serializable;
/**
* app 启动 - 配置信息
* 下载APK - 配置信息
*/
public class AppConfig implements Serializable {
public class DownLoadAPKConfig implements Serializable {
/**
* 是否需要更新.
*/
......
package com.mayi.fastdevelop.commonpage;
package com.mayi.fastdevelop.commonpage.updateAPP;
import android.app.DownloadManager;
import android.content.BroadcastReceiver;
......@@ -13,14 +13,12 @@ import android.provider.Settings;
import androidx.annotation.Nullable;
import com.mayi.fastdevelop.base.BaseActivity;
import com.mayi.fastdevelop.bean.AppConfig;
import com.mayi.fastdevelop.comnon.Key;
import com.mayi.fastdevelop.comnon.RequestCode;
import com.mayi.fastdevelop.util.DownLoadUtil;
import com.mayi.fastdevelop.util.PermissionUtil;
import com.mayi.fastdevelop.util.SpUtil;
import com.mayi.fastdevelop.util.ToastUtil;
import com.mayi.fastdevelop.view.installapk.AppUpgradeManager;
/**
* 下载安装Activity
......@@ -40,7 +38,7 @@ public abstract class UpdateDownLoadAPKActvity extends BaseActivity {
registerReceiver(receiver, filter);
}
public void downLoadAPK(AppConfig appConfig) {
public void downLoadAPK(DownLoadAPKConfig appConfig) {
AppUpgradeManager appUpgradeManager = new AppUpgradeManager(this);
appUpgradeManager.showUpdateTipDialog(appConfig);
}
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/white" android:state_enabled="true"/>
<item android:color="@color/txt_grey_light" android:state_enabled="false"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/alpha_75_white">
<item
android:id="@android:id/mask"
android:drawable="@color/alpha_05_white"/>
</ripple>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/ripple">
<item android:drawable="@color/white"/>
</ripple>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="@dimen/size_5"
android:textSize="@dimen/text_size_14"
android:textColor="@color/black"
android:text="加载中。。。" />
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppThemeNoActionBar" parent="FastdevelopAppTheme">
<item name="android:windowBackground">@color/background_quanju</item>
</style>
</resources>
\ No newline at end of file
......@@ -5,7 +5,6 @@ import com.gc.call.CallParticipationBean;
import com.gc.call.CallReturnBean;
import com.gc.call.CallTimeHandTarget;
import com.gc.call.CallTimeHandlerListener;
import com.mayi.fastdevelop.bean.LocationBean;
public class LocationCallTarget extends CallTimeHandTarget {
@Override
......
......@@ -6,7 +6,6 @@ import com.amap.api.location.AMapLocation;
import com.amap.api.location.AMapLocationClient;
import com.amap.api.location.AMapLocationClientOption;
import com.amap.api.location.AMapLocationListener;
import com.mayi.fastdevelop.bean.LocationBean;
import com.mayi.fastdevelop.util.LogUtils;
public class LocationUtils {
......
apply plugin: 'com.android.library'
android {
compileSdkVersion build_versions.compile_sdk
defaultConfig {
minSdkVersion build_versions.min_sdk
targetSdkVersion build_versions.target_sdk
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
api 'androidx.appcompat:appcompat:1.1.0'
api 'com.google.android.exoplayer:exoplayer:2.10.5'
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package com.mayi.other;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.mayi.player.test", appContext.getPackageName());
}
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mayi.other" />
package com.mayi.fastdevelop.view;
package com.mayi.other;
import android.content.Context;
import android.net.Uri;
......
<resources>
<string name="app_name">player</string>
</resources>
package com.mayi.other;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
include ':app', ':fastDevelop', ':map', ':web', ':jetpacksample'
\ No newline at end of file
include ':app', ':fastDevelop', ':map', ':web', ':jetpacksample', ':other'
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment