Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fastdevelop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高超
fastdevelop
Commits
e18f1c69
Commit
e18f1c69
authored
Oct 10, 2019
by
gao.chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
web优化升级为androidX,导入 exoplayer
parent
21b5253f
Show whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
239 additions
and
197 deletions
+239
-197
app/build.gradle
+10
-7
app/src/androidTest/java/com/mayi/demo/ExampleInstrumentedTest.java
+0
-26
app/src/main/AndroidManifest.xml
+4
-1
app/src/main/java/com/mayi/demo/BannerActivity.java
+2
-1
app/src/main/java/com/mayi/demo/CutPicturesActivity.java
+2
-1
app/src/main/java/com/mayi/demo/DownLoadAPKActivity.java
+2
-1
app/src/main/java/com/mayi/demo/FragmentInteractiveActivity.java
+3
-2
app/src/main/java/com/mayi/demo/FragmentInteractiveActivity2.java
+2
-1
app/src/main/java/com/mayi/demo/FunctionActivity.java
+2
-1
app/src/main/java/com/mayi/demo/LoadingPicturesActivity.java
+2
-1
app/src/main/java/com/mayi/demo/MainActivity.java
+5
-4
app/src/main/java/com/mayi/demo/MyApplication.java
+4
-8
app/src/main/java/com/mayi/demo/MyFragment.java
+3
-2
app/src/main/java/com/mayi/demo/OnMultiClickActivity.java
+2
-1
app/src/main/java/com/mayi/demo/PageActivity.java
+2
-1
app/src/main/java/com/mayi/demo/PermissionActivity.java
+2
-1
app/src/main/java/com/mayi/demo/QRActivity.java
+2
-1
app/src/main/java/com/mayi/demo/SmartRefreshLayoutActivity.java
+6
-5
app/src/main/java/com/mayi/demo/TitleActivity.java
+2
-1
app/src/main/java/com/mayi/demo/ViewActviity.java
+2
-1
app/src/main/res/layout/activity_fragment_interactive.xml
+1
-1
app/src/main/res/layout/activity_main.xml
+1
-1
app/src/main/res/layout/activity_smartrefreshlayout.xml
+1
-1
build.gradle
+1
-3
fastDevelop/build.gradle
+9
-4
fastDevelop/src/androidTest/java/com/mayi/fastdevelop/ExampleInstrumentedTest.java
+0
-26
fastDevelop/src/main/AndroidManifest.xml
+1
-1
fastDevelop/src/main/java/com/mayi/fastdevelop/base/BaseActivity.java
+2
-1
fastDevelop/src/main/java/com/mayi/fastdevelop/base/BaseCutPicturesActivity.java
+2
-1
fastDevelop/src/main/java/com/mayi/fastdevelop/base/BaseFragment.java
+3
-2
fastDevelop/src/main/java/com/mayi/fastdevelop/base/BaseFragmentActivity.java
+6
-5
fastDevelop/src/main/java/com/mayi/fastdevelop/commonpage/BaseStartActivity.java
+2
-1
fastDevelop/src/main/java/com/mayi/fastdevelop/commonpage/UpdateDownLoadAPKActvity.java
+2
-1
fastDevelop/src/main/java/com/mayi/fastdevelop/commonpage/zxing/BaseScanActivity.java
+2
-1
fastDevelop/src/main/java/com/mayi/fastdevelop/util/SystemUtil.java
+2
-1
fastDevelop/src/main/java/com/mayi/fastdevelop/view/AppPlayerView.java
+127
-0
fastDevelop/src/main/java/com/mayi/fastdevelop/view/CustomTitleBar.java
+2
-1
fastDevelop/src/main/java/com/mayi/fastdevelop/view/dialog/BaseDialog.java
+4
-3
fastDevelop/src/main/java/com/mayi/fastdevelop/view/dialog/DialogViewHolder.java
+2
-1
gradle.properties
+3
-0
gradle/wrapper/gradle-wrapper.properties
+2
-2
map/build.gradle
+1
-8
map/src/androidTest/java/com/mayi/fastdevelop/map/ExampleInstrumentedTest.java
+0
-26
settings.gradle
+3
-2
web/build.gradle
+1
-11
web/src/androidTest/java/com/mayi/fastdevelop/web/ExampleInstrumentedTest.java
+0
-26
No files found.
app/build.gradle
View file @
e18f1c69
...
...
@@ -4,11 +4,11 @@ android {
compileSdkVersion
28
defaultConfig
{
applicationId
"com.mayi.demo"
minSdkVersion
19
minSdkVersion
20
targetSdkVersion
28
versionCode
1
versionName
"1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
//
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
signingConfigs
{
...
...
@@ -36,6 +36,12 @@ android {
proguardFiles
getDefaultProguardFile
(
'proguard-android.txt'
),
'proguard-rules.pro'
}
}
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
targetCompatibility
JavaVersion
.
VERSION_1_8
}
}
repositories
{
...
...
@@ -46,13 +52,10 @@ repositories{
dependencies
{
api
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
api
'com.android.support:appcompat-v7:28.0.0'
api
'com.android.support.constraint:constraint-layout:1.1.3'
api
"com.tencent.bugly:crashreport_upgrade:1.3.4"
api
'com.tencent.bugly:nativecrashreport:3.6.0.1'
// api(name:'fastDevelop-release', ext:'aar')
api
project
(
':fastDevelop'
)
api
project
(
':web'
)
api
project
(
':map'
)
//
api project(':web')
//
api project(':map')
}
app/src/androidTest/java/com/mayi/demo/ExampleInstrumentedTest.java
deleted
100644 → 0
View file @
21b5253f
package
com
.
mayi
.
demo
;
import
android.content.Context
;
import
android.support.test.InstrumentationRegistry
;
import
android.support.test.runner.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
.
getTargetContext
();
assertEquals
(
"com.mayi.demo"
,
appContext
.
getPackageName
());
}
}
app/src/main/AndroidManifest.xml
View file @
e18f1c69
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
package=
"com.mayi.demo"
>
<!-- CAMERA动态权限 -->
...
...
@@ -23,7 +24,9 @@
android:label=
"@string/app_name"
android:roundIcon=
"@mipmap/ic_launcher_round"
android:supportsRtl=
"true"
android:theme=
"@style/Theme.AppCompat.Light.NoActionBar"
>
android:theme=
"@style/Theme.AppCompat.Light.NoActionBar"
tools:replace=
"android:appComponentFactory"
android:appComponentFactory=
"androidx.core.app.CoreComponentFactory"
>
<meta-data
...
...
app/src/main/java/com/mayi/demo/BannerActivity.java
View file @
e18f1c69
package
com
.
mayi
.
demo
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.view.PicassoImageLoader
;
...
...
app/src/main/java/com/mayi/demo/CutPicturesActivity.java
View file @
e18f1c69
package
com
.
mayi
.
demo
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.view.View
;
import
android.widget.ImageView
;
import
androidx.annotation.Nullable
;
import
com.mayi.fastdevelop.base.BaseCutPicturesActivity
;
import
com.mayi.fastdevelop.util.BitmapUtil
;
...
...
app/src/main/java/com/mayi/demo/DownLoadAPKActivity.java
View file @
e18f1c69
package
com
.
mayi
.
demo
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.view.View
;
import
androidx.annotation.Nullable
;
import
com.mayi.fastdevelop.bean.AppConfig
;
import
com.mayi.fastdevelop.commonpage.UpdateDownLoadAPKActvity
;
...
...
app/src/main/java/com/mayi/demo/FragmentInteractiveActivity.java
View file @
e18f1c69
...
...
@@ -3,10 +3,11 @@ package com.mayi.demo;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Looper
;
import
android.support.annotation.Nullable
;
import
android.support.v4.view.ViewPager
;
import
android.widget.TextView
;
import
androidx.annotation.Nullable
;
import
androidx.viewpager.widget.ViewPager
;
import
com.mayi.fastdevelop.base.BaseFragment
;
import
com.mayi.fastdevelop.base.BaseFragmentActivity
;
import
com.mayi.fastdevelop.comnon.AppCallback
;
...
...
app/src/main/java/com/mayi/demo/FragmentInteractiveActivity2.java
View file @
e18f1c69
...
...
@@ -3,10 +3,11 @@ package com.mayi.demo;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Looper
;
import
android.support.annotation.Nullable
;
import
android.view.View
;
import
android.widget.TextView
;
import
androidx.annotation.Nullable
;
import
com.mayi.fastdevelop.base.BaseFragment
;
import
com.mayi.fastdevelop.base.BaseFragmentActivity
;
import
com.mayi.fastdevelop.comnon.AppCallback
;
...
...
app/src/main/java/com/mayi/demo/FunctionActivity.java
View file @
e18f1c69
package
com
.
mayi
.
demo
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.view.View
;
import
androidx.annotation.Nullable
;
import
com.alibaba.fastjson.JSON
;
import
com.gc.call.CallConstant
;
import
com.gc.call.CallManage
;
...
...
app/src/main/java/com/mayi/demo/LoadingPicturesActivity.java
View file @
e18f1c69
...
...
@@ -2,9 +2,10 @@ package com.mayi.demo;
import
android.os.Bundle
;
import
android.os.Environment
;
import
android.support.annotation.Nullable
;
import
android.widget.ImageView
;
import
androidx.annotation.Nullable
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.view.LoadingPictures
;
...
...
app/src/main/java/com/mayi/demo/MainActivity.java
View file @
e18f1c69
...
...
@@ -2,13 +2,14 @@ package com.mayi.demo;
import
android.os.Bundle
;
import
android.support.annotation.NonNull
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.Button
;
import
androidx.annotation.NonNull
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.util.DrawableUtils
;
...
...
@@ -22,7 +23,7 @@ public class MainActivity extends BaseActivity {
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_main
);
RecyclerView
listView
=
findViewById
(
R
.
id
.
list
);
listView
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
LinearLayoutManager
.
VERTICAL
,
false
));
listView
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
final
List
<
ItemBean
>
list
=
new
ArrayList
<>();
list
.
add
(
new
ItemBean
(
"常用控件"
,
new
View
.
OnClickListener
()
{
@Override
...
...
app/src/main/java/com/mayi/demo/MyApplication.java
View file @
e18f1c69
...
...
@@ -7,20 +7,16 @@ import com.gc.call.CallParticipationBean;
import
com.mayi.fastdevelop.base.BaseApplication
;
import
com.mayi.fastdevelop.comnon.Configure
;
import
com.mayi.fastdevelop.comnon.CrashHandler
;
import
com.mayi.fastdevelop.map.GoMapLocationCallTarget
;
import
com.mayi.fastdevelop.map.LocationCallTarget
;
import
com.mayi.fastdevelop.web.InitWebCallTarget
;
import
com.mayi.fastdevelop.web.GoWebCallTarget
;
public
class
MyApplication
extends
BaseApplication
{
@Override
public
void
onCreate
()
{
super
.
onCreate
();
CallManage
.
getInstance
().
addTarget
(
new
LocationCallTarget
());
CallManage
.
getInstance
().
addTarget
(
new
GoMapLocationCallTarget
());
CallManage
.
getInstance
().
addTarget
(
new
GoWebCallTarget
());
CallManage
.
getInstance
().
addTarget
(
new
InitWebCallTarget
());
//
CallManage.getInstance().addTarget(new LocationCallTarget());
//
CallManage.getInstance().addTarget(new GoMapLocationCallTarget());
//
CallManage.getInstance().addTarget(new GoWebCallTarget());
//
CallManage.getInstance().addTarget(new InitWebCallTarget());
CallParticipationBean
bean
=
new
CallParticipationBean
(
"web_initWeb"
);
CallManage
.
getInstance
().
handleTarget
(
bean
);
initBugly
(
"cb8018da1b"
,
true
);
...
...
app/src/main/java/com/mayi/demo/MyFragment.java
View file @
e18f1c69
...
...
@@ -2,13 +2,14 @@ package com.mayi.demo;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.Nullable
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.TextView
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
com.mayi.fastdevelop.base.BaseFragment
;
import
com.mayi.fastdevelop.comnon.AppCallback
;
import
com.mayi.fastdevelop.comnon.Constant
;
...
...
app/src/main/java/com/mayi/demo/OnMultiClickActivity.java
View file @
e18f1c69
package
com
.
mayi
.
demo
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.view.View
;
import
android.widget.Button
;
import
androidx.annotation.Nullable
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.view.OnMultiClickListener
;
...
...
app/src/main/java/com/mayi/demo/PageActivity.java
View file @
e18f1c69
...
...
@@ -3,9 +3,10 @@ package com.mayi.demo;
import
android.app.Activity
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.view.View
;
import
androidx.annotation.Nullable
;
import
com.gc.call.CallConstant
;
import
com.gc.call.CallManage
;
import
com.gc.call.CallParticipationBean
;
...
...
app/src/main/java/com/mayi/demo/PermissionActivity.java
View file @
e18f1c69
package
com
.
mayi
.
demo
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.TextView
;
import
androidx.annotation.Nullable
;
import
com.alibaba.fastjson.JSON
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.util.PermissionUtil
;
...
...
app/src/main/java/com/mayi/demo/QRActivity.java
View file @
e18f1c69
package
com
.
mayi
.
demo
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
androidx.annotation.Nullable
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.util.BitmapUtil
;
import
com.mayi.fastdevelop.util.QrUtil
;
...
...
app/src/main/java/com/mayi/demo/SmartRefreshLayoutActivity.java
View file @
e18f1c69
...
...
@@ -2,14 +2,15 @@ package com.mayi.demo;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.Nullable
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.TextView
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.scwang.smartrefresh.layout.SmartRefreshLayout
;
import
com.scwang.smartrefresh.layout.api.RefreshLayout
;
...
...
@@ -32,7 +33,7 @@ public class SmartRefreshLayoutActivity extends BaseActivity {
handler
=
new
Handler
();
final
SmartRefreshLayout
layout
=
findViewById
(
R
.
id
.
layout
);
final
RecyclerView
list
=
findViewById
(
R
.
id
.
list
);
list
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
LinearLayoutManager
.
VERTICAL
,
false
));
list
.
setLayoutManager
(
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
));
list
.
setAdapter
(
new
MyAdapter
());
layout
.
setEnableRefresh
(
true
);
...
...
app/src/main/java/com/mayi/demo/TitleActivity.java
View file @
e18f1c69
package
com
.
mayi
.
demo
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.view.View
;
import
androidx.annotation.Nullable
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.util.ToastUtil
;
import
com.mayi.fastdevelop.view.CustomTitleBar
;
...
...
app/src/main/java/com/mayi/demo/ViewActviity.java
View file @
e18f1c69
package
com
.
mayi
.
demo
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.view.View
;
import
androidx.annotation.Nullable
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.util.DialogUtils
;
import
com.mayi.fastdevelop.util.ToastUtil
;
...
...
app/src/main/res/layout/activity_fragment_interactive.xml
View file @
e18f1c69
...
...
@@ -10,7 +10,7 @@
android:layout_height=
"@dimen/im_dp_40"
/>
<android
.support.v4.view
.ViewPager
<android
x.viewpager.widget
.ViewPager
android:id=
"@+id/viewpager"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
...
...
app/src/main/res/layout/activity_main.xml
View file @
e18f1c69
<?xml version="1.0" encoding="utf-8"?>
<android
.support.v7
.widget.RecyclerView
xmlns:android=
"http://schemas.android.com/apk/res/android"
<android
x.recyclerview
.widget.RecyclerView
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/list"
android:layout_width=
"match_parent"
...
...
app/src/main/res/layout/activity_smartrefreshlayout.xml
View file @
e18f1c69
...
...
@@ -4,7 +4,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<android
.support.v7
.widget.RecyclerView
<android
x.recyclerview
.widget.RecyclerView
android:id=
"@+id/list"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
...
...
build.gradle
View file @
e18f1c69
...
...
@@ -7,9 +7,7 @@ buildscript {
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:3.0.1'
classpath
'com.android.tools.build:gradle:3.4.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
...
...
fastDevelop/build.gradle
View file @
e18f1c69
...
...
@@ -4,11 +4,11 @@ android {
compileSdkVersion
28
defaultConfig
{
minSdkVersion
19
minSdkVersion
20
targetSdkVersion
28
versionCode
2
versionName
"1.1"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
//
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
ndk
{
// 设置支持的SO库架构
abiFilters
'armeabi'
,
'x86'
,
'armeabi-v7a'
,
'x86_64'
,
'arm64-v8a'
...
...
@@ -22,6 +22,11 @@ android {
}
}
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
targetCompatibility
JavaVersion
.
VERSION_1_8
}
}
dependencies
{
...
...
@@ -35,10 +40,10 @@ dependencies {
api
'com.tencent.bugly:nativecrashreport:3.6.0.1'
api
'com.orhanobut:logger:2.2.0'
api
'com.alibaba:fastjson:1.2.12'
api
'com.android.support:recyclerview-v7:28.0.0'
api
'com.android.support:appcompat-v7:28.0.0'
api
'androidx.recyclerview:recyclerview:1.0.0'
api
files
(
'libs/zixing-core-3.2.0.jar'
)
// api project(':call')
api
'com.gc:call:1.0.0'
api
'com.google.android.exoplayer:exoplayer:2.10.5'
}
fastDevelop/src/androidTest/java/com/mayi/fastdevelop/ExampleInstrumentedTest.java
deleted
100644 → 0
View file @
21b5253f
package
com
.
mayi
.
fastdevelop
;
import
android.content.Context
;
import
android.support.test.InstrumentationRegistry
;
import
android.support.test.runner.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
.
getTargetContext
();
assertEquals
(
"com.mayi.fastdevelop.test"
,
appContext
.
getPackageName
());
}
}
fastDevelop/src/main/AndroidManifest.xml
View file @
e18f1c69
...
...
@@ -19,7 +19,7 @@
<!-- 解决 Android N 7.0 上 报错:android.os.FileUriExposedException -->
<provider
android:name=
"android
.support.v4
.content.FileProvider"
android:name=
"android
x.core
.content.FileProvider"
android:authorities=
"${applicationId}.uri"
android:exported=
"false"
android:grantUriPermissions=
"true"
...
...
fastDevelop/src/main/java/com/mayi/fastdevelop/base/BaseActivity.java
View file @
e18f1c69
...
...
@@ -4,7 +4,8 @@ import android.app.Dialog;
import
android.content.Intent
;
import
android.content.pm.ActivityInfo
;
import
android.os.Bundle
;
import
android.support.v7.app.AppCompatActivity
;
import
androidx.appcompat.app.AppCompatActivity
;
import
com.mayi.fastdevelop.util.ToastUtil
;
import
com.mayi.fastdevelop.view.LoadingDialog
;
...
...
fastDevelop/src/main/java/com/mayi/fastdevelop/base/BaseCutPicturesActivity.java
View file @
e18f1c69
...
...
@@ -8,9 +8,10 @@ import android.os.Build;
import
android.os.Bundle
;
import
android.os.Environment
;
import
android.provider.MediaStore
;
import
android.support.v4.content.FileProvider
;
import
androidx.core.content.FileProvider
;
import
com.mayi.fastdevelop.util.PermissionUtil
;
import
java.io.File
;
...
...
fastDevelop/src/main/java/com/mayi/fastdevelop/base/BaseFragment.java
View file @
e18f1c69
...
...
@@ -4,8 +4,9 @@ import android.app.Activity;
import
android.app.Dialog
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.FragmentActivity
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.FragmentActivity
;
import
com.mayi.fastdevelop.comnon.AppCallback
;
import
com.mayi.fastdevelop.util.ToastUtil
;
...
...
fastDevelop/src/main/java/com/mayi/fastdevelop/base/BaseFragmentActivity.java
View file @
e18f1c69
...
...
@@ -3,13 +3,14 @@ package com.mayi.fastdevelop.base;
import
android.app.Dialog
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.FragmentActivity
;
import
android.support.v4.app.FragmentPagerAdapter
;
import
android.support.v4.app.FragmentTransaction
;
import
android.support.v4.view.ViewPager
;
import
android.text.TextUtils
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.FragmentActivity
;
import
androidx.fragment.app.FragmentPagerAdapter
;
import
androidx.fragment.app.FragmentTransaction
;
import
androidx.viewpager.widget.ViewPager
;
import
com.mayi.fastdevelop.comnon.AppCallback
;
import
com.mayi.fastdevelop.comnon.Constant
;
import
com.mayi.fastdevelop.util.ToastUtil
;
...
...
fastDevelop/src/main/java/com/mayi/fastdevelop/commonpage/BaseStartActivity.java
View file @
e18f1c69
...
...
@@ -2,9 +2,10 @@ package com.mayi.fastdevelop.commonpage;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.support.annotation.Nullable
;
import
android.text.TextUtils
;
import
androidx.annotation.Nullable
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.comnon.Key
;
import
com.mayi.fastdevelop.comnon.UserManager
;
...
...
fastDevelop/src/main/java/com/mayi/fastdevelop/commonpage/UpdateDownLoadAPKActvity.java
View file @
e18f1c69
...
...
@@ -9,7 +9,8 @@ import android.net.Uri;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.provider.Settings
;
import
android.support.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.bean.AppConfig
;
...
...
fastDevelop/src/main/java/com/mayi/fastdevelop/commonpage/zxing/BaseScanActivity.java
View file @
e18f1c69
...
...
@@ -4,7 +4,6 @@ import android.os.Bundle;
import
android.os.Handler
;
import
android.os.Message
;
import
android.os.Vibrator
;
import
android.support.annotation.Nullable
;
import
android.view.SurfaceHolder
;
import
android.view.SurfaceHolder.Callback
;
import
android.view.SurfaceView
;
...
...
@@ -12,6 +11,8 @@ import android.view.View;
import
android.view.WindowManager
;
import
android.widget.Toast
;
import
androidx.annotation.Nullable
;
import
com.google.zxing.Result
;
import
com.mayi.fastdevelop.R
;
import
com.mayi.fastdevelop.base.BaseActivity
;
...
...
fastDevelop/src/main/java/com/mayi/fastdevelop/util/SystemUtil.java
View file @
e18f1c69
...
...
@@ -17,7 +17,6 @@ import android.location.LocationManager;
import
android.net.Uri
;
import
android.os.Build
;
import
android.provider.MediaStore
;
import
android.support.annotation.FloatRange
;
import
android.telephony.TelephonyManager
;
import
android.text.method.HideReturnsTransformationMethod
;
import
android.text.method.PasswordTransformationMethod
;
...
...
@@ -28,6 +27,8 @@ import android.view.WindowManager;
import
android.view.inputmethod.InputMethodManager
;
import
android.widget.EditText
;
import
androidx.annotation.FloatRange
;
import
com.mayi.fastdevelop.R
;
import
java.io.File
;
...
...
fastDevelop/src/main/java/com/mayi/fastdevelop/view/AppPlayerView.java
0 → 100644
View file @
e18f1c69
package
com
.
mayi
.
fastdevelop
.
view
;
import
android.content.Context
;
import
android.net.Uri
;
import
android.util.AttributeSet
;
import
com.google.android.exoplayer2.ExoPlayerFactory
;
import
com.google.android.exoplayer2.PlaybackPreparer
;
import
com.google.android.exoplayer2.SimpleExoPlayer
;
import
com.google.android.exoplayer2.database.DatabaseProvider
;
import
com.google.android.exoplayer2.database.ExoDatabaseProvider
;
import
com.google.android.exoplayer2.source.LoopingMediaSource
;
import
com.google.android.exoplayer2.source.MediaSource
;
import
com.google.android.exoplayer2.source.ProgressiveMediaSource
;
import
com.google.android.exoplayer2.ui.PlayerView
;
import
com.google.android.exoplayer2.upstream.DataSink
;
import
com.google.android.exoplayer2.upstream.DefaultBandwidthMeter
;
import
com.google.android.exoplayer2.upstream.DefaultDataSourceFactory
;
import
com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory
;
import
com.google.android.exoplayer2.upstream.FileDataSourceFactory
;
import
com.google.android.exoplayer2.upstream.TransferListener
;
import
com.google.android.exoplayer2.upstream.cache.Cache
;
import
com.google.android.exoplayer2.upstream.cache.CacheDataSinkFactory
;
import
com.google.android.exoplayer2.upstream.cache.CacheDataSource
;
import
com.google.android.exoplayer2.upstream.cache.CacheDataSourceFactory
;
import
com.google.android.exoplayer2.upstream.cache.NoOpCacheEvictor
;
import
com.google.android.exoplayer2.upstream.cache.SimpleCache
;
import
com.google.android.exoplayer2.util.Util
;
import
java.io.File
;
public
class
AppPlayerView
extends
PlayerView
implements
PlaybackPreparer
{
private
static
final
String
DOWNLOAD_CONTENT_DIRECTORY
=
"downloads"
;
private
SimpleExoPlayer
player
;
private
DatabaseProvider
databaseProvider
;
private
File
downloadDirectory
;
private
Cache
downloadCache
;
public
AppPlayerView
(
Context
context
)
{
super
(
context
);
}
public
AppPlayerView
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
}
public
AppPlayerView
(
Context
context
,
AttributeSet
attrs
,
int
defStyleAttr
)
{
super
(
context
,
attrs
,
defStyleAttr
);
}
public
void
setUrl
(
String
url
,
boolean
isLooping
)
{
if
(
player
==
null
)
{
player
=
ExoPlayerFactory
.
newSimpleInstance
(
getContext
());
setPlayer
(
player
);
player
.
setPlayWhenReady
(
true
);
setPlaybackPreparer
(
this
);
}
// 测量播放带宽,如果不需要可以传null
TransferListener
listener
=
new
DefaultBandwidthMeter
();
DefaultDataSourceFactory
upstreamFactory
=
new
DefaultDataSourceFactory
(
getContext
(),
listener
,
new
DefaultHttpDataSourceFactory
(
getContext
().
getPackageName
(),
listener
));
// 获取缓存文件夹
// File file = CachesUtil.getMediaCacheFile(CachesUtil.VIDEO,this);
// Cache cache = new SimpleCache(file, new NoOpCacheEvictor(), getDatabaseProvider());
DataSink
.
Factory
cacheWriteDataSinkFactory
=
new
CacheDataSinkFactory
(
getDownloadCache
(),
Long
.
MAX_VALUE
);
CacheDataSourceFactory
dataSourceFactory
=
new
CacheDataSourceFactory
(
getDownloadCache
(),
upstreamFactory
,
new
FileDataSourceFactory
(),
cacheWriteDataSinkFactory
,
CacheDataSource
.
FLAG_BLOCK_ON_CACHE
|
CacheDataSource
.
FLAG_IGNORE_CACHE_ON_ERROR
,
null
);
Uri
uri
=
Uri
.
parse
(
url
);
MediaSource
mediaSource
=
new
ProgressiveMediaSource
.
Factory
(
dataSourceFactory
).
createMediaSource
(
uri
);
if
(
isLooping
){
//循环播放
LoopingMediaSource
loopingMediaSource
=
new
LoopingMediaSource
(
mediaSource
);
//使用资源准备播放器
player
.
prepare
(
loopingMediaSource
);
}
else
{
//使用资源准备播放器
player
.
prepare
(
mediaSource
);
}
}
protected
synchronized
Cache
getDownloadCache
()
{
if
(
downloadCache
==
null
)
{
File
downloadContentDirectory
=
new
File
(
getDownloadDirectory
(),
DOWNLOAD_CONTENT_DIRECTORY
);
downloadCache
=
new
SimpleCache
(
downloadContentDirectory
,
new
NoOpCacheEvictor
(),
getDatabaseProvider
());
}
return
downloadCache
;
}
private
void
releasePlayer
()
{
if
(
downloadCache
!=
null
){
downloadCache
.
release
();
}
if
(
Util
.
SDK_INT
<=
23
)
{
onPause
();
releasePlayer
();
}
if
(
player
!=
null
){
player
.
release
();
}
}
private
File
getDownloadDirectory
()
{
if
(
downloadDirectory
==
null
)
{
downloadDirectory
=
getContext
().
getExternalFilesDir
(
null
);
if
(
downloadDirectory
==
null
)
{
downloadDirectory
=
getContext
().
getFilesDir
();
}
}
return
downloadDirectory
;
}
private
DatabaseProvider
getDatabaseProvider
()
{
if
(
databaseProvider
==
null
)
{
databaseProvider
=
new
ExoDatabaseProvider
(
getContext
());
}
return
databaseProvider
;
}
@Override
public
void
preparePlayback
()
{
player
.
retry
();
}
}
fastDevelop/src/main/java/com/mayi/fastdevelop/view/CustomTitleBar.java
View file @
e18f1c69
...
...
@@ -2,7 +2,6 @@ package com.mayi.fastdevelop.view;
import
android.content.Context
;
import
android.graphics.drawable.Drawable
;
import
android.support.annotation.DrawableRes
;
import
android.text.Html
;
import
android.text.TextUtils
;
import
android.util.AttributeSet
;
...
...
@@ -13,6 +12,8 @@ import android.widget.ImageView;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
androidx.annotation.DrawableRes
;
import
com.mayi.fastdevelop.R
;
import
com.mayi.fastdevelop.util.DisplayUtil
;
...
...
fastDevelop/src/main/java/com/mayi/fastdevelop/view/dialog/BaseDialog.java
View file @
e18f1c69
...
...
@@ -4,15 +4,16 @@ import android.annotation.SuppressLint;
import
android.app.Dialog
;
import
android.content.Context
;
import
android.content.DialogInterface
;
import
android.support.annotation.FloatRange
;
import
android.support.annotation.StyleRes
;
import
android.support.v7.app.AlertDialog
;
import
android.view.Gravity
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
androidx.annotation.FloatRange
;
import
androidx.annotation.StyleRes
;
import
androidx.appcompat.app.AlertDialog
;
import
com.mayi.fastdevelop.R
;
...
...
fastDevelop/src/main/java/com/mayi/fastdevelop/view/dialog/DialogViewHolder.java
View file @
e18f1c69
package
com
.
mayi
.
fastdevelop
.
view
.
dialog
;
import
android.content.Context
;
import
android.support.annotation.StringRes
;
import
android.util.SparseArray
;
import
android.view.View
;
import
android.widget.TextView
;
import
androidx.annotation.StringRes
;
public
class
DialogViewHolder
{
private
final
SparseArray
<
View
>
mViews
;
private
View
mDialogView
;
...
...
gradle.properties
View file @
e18f1c69
...
...
@@ -11,3 +11,6 @@ org.gradle.jvmargs=-Xmx1536m
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
android.useAndroidX
=
true
android.enableJetifier
=
true
gradle/wrapper/gradle-wrapper.properties
View file @
e18f1c69
#
Fri Jan 04 11:28:23 GMT+08:00
2019
#
Wed Oct 09 13:46:21 CST
2019
distributionBase
=
GRADLE_USER_HOME
distributionPath
=
wrapper/dists
zipStoreBase
=
GRADLE_USER_HOME
zipStorePath
=
wrapper/dists
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
4.4
-all.zip
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
5.1.1
-all.zip
map/build.gradle
View file @
e18f1c69
...
...
@@ -2,17 +2,11 @@ apply plugin: 'com.android.library'
android
{
compileSdkVersion
28
defaultConfig
{
minSdkVersion
19
minSdkVersion
20
targetSdkVersion
28
versionCode
1
versionName
"1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes
{
...
...
@@ -26,7 +20,6 @@ android {
dependencies
{
api
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
api
'com.android.support:appcompat-v7:28.0.0'
api
project
(
':fastDevelop'
)
//高德地图
api
'com.amap.api:location:latest.integration'
...
...
map/src/androidTest/java/com/mayi/fastdevelop/map/ExampleInstrumentedTest.java
deleted
100644 → 0
View file @
21b5253f
package
com
.
mayi
.
fastdevelop
.
map
;
import
android.content.Context
;
import
android.support.test.InstrumentationRegistry
;
import
android.support.test.runner.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
.
getTargetContext
();
assertEquals
(
"com.mayi.fastdevelop.map.test"
,
appContext
.
getPackageName
());
}
}
settings.gradle
View file @
e18f1c69
include
':app'
,
':fastDevelop'
,
':web'
,
':map'
\ No newline at end of file
include
':app'
,
':fastDevelop'
//, ':web', ':map'
\ No newline at end of file
web/build.gradle
View file @
e18f1c69
...
...
@@ -2,17 +2,11 @@ apply plugin: 'com.android.library'
android
{
compileSdkVersion
28
defaultConfig
{
minSdkVersion
15
minSdkVersion
20
targetSdkVersion
28
versionCode
1
versionName
"1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes
{
...
...
@@ -26,10 +20,6 @@ android {
dependencies
{
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
implementation
'com.android.support:appcompat-v7:28.0.0'
implementation
'com.android.support.constraint:constraint-layout:1.1.3'
implementation
'com.android.support:design:28.0.0'
api
project
(
':fastDevelop'
)
implementation
files
(
'libs/tbs_sdk_thirdapp_v3.6.0.1371_43624_sharewithdownload_withoutGame_obfs_20181106_121046.jar'
)
//腾讯X5浏览器
}
web/src/androidTest/java/com/mayi/fastdevelop/web/ExampleInstrumentedTest.java
deleted
100644 → 0
View file @
21b5253f
package
com
.
mayi
.
fastdevelop
.
web
;
import
android.content.Context
;
import
android.support.test.InstrumentationRegistry
;
import
android.support.test.runner.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
.
getTargetContext
();
assertEquals
(
"com.mayi.fastdevelop.web.test"
,
appContext
.
getPackageName
());
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment