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
a663a955
Commit
a663a955
authored
Dec 09, 2019
by
gao.chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
滑动置顶,加载更多,下拉刷新demo
parent
904f6c18
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
264 additions
and
55 deletions
+264
-55
app/build.gradle
+3
-0
app/src/main/AndroidManifest.xml
+22
-21
app/src/main/java/com/mayi/demo/function/DownLoadAPKActivity.java
+2
-1
app/src/main/java/com/mayi/demo/function/FunctionActivity.java
+4
-1
app/src/main/java/com/mayi/demo/function/PermissionActivity.java
+2
-1
app/src/main/java/com/mayi/demo/function/PlayerActivity.java
+2
-1
app/src/main/java/com/mayi/demo/function/PlayerActivtiy2.java
+2
-1
app/src/main/java/com/mayi/demo/function/QRActivity.java
+2
-1
app/src/main/java/com/mayi/demo/page/FragmentInteractiveActivity.java
+3
-1
app/src/main/java/com/mayi/demo/page/FragmentInteractiveActivity2.java
+3
-1
app/src/main/java/com/mayi/demo/page/MainActivity.java
+6
-1
app/src/main/java/com/mayi/demo/page/MyScanActivity.java
+1
-1
app/src/main/java/com/mayi/demo/page/PageActivity.java
+8
-1
app/src/main/java/com/mayi/demo/page/SlidingRoofPlacementActivity.java
+91
-0
app/src/main/java/com/mayi/demo/page/StartActivity.java
+2
-1
app/src/main/java/com/mayi/demo/view/BannerActivity.java
+2
-1
app/src/main/java/com/mayi/demo/view/ListLazyLoadingActivity.java
+3
-1
app/src/main/java/com/mayi/demo/view/ListLazyLoadingActivity2.java
+3
-1
app/src/main/java/com/mayi/demo/view/LoadingPicturesActivity.java
+2
-1
app/src/main/java/com/mayi/demo/view/OnMultiClickActivity.java
+2
-1
app/src/main/java/com/mayi/demo/view/SmartRefreshLayoutActivity.java
+2
-1
app/src/main/java/com/mayi/demo/view/TestListLazyLoadingActivity.java
+2
-1
app/src/main/java/com/mayi/demo/view/TitleActivity.java
+2
-1
app/src/main/java/com/mayi/demo/view/ViewActviity.java
+2
-11
app/src/main/res/layout/activity_main.xml
+1
-1
app/src/main/res/layout/activity_page.xml
+7
-0
app/src/main/res/layout/activity_slidingroofplacement.xml
+71
-0
app/src/main/res/layout/item_slidingroofplacement.xml
+7
-0
fastDevelop/build.gradle
+2
-1
fastDevelop/src/main/java/com/mayi/fastdevelop/base/BaseApplication.java
+3
-1
No files found.
app/build.gradle
View file @
a663a955
...
@@ -8,6 +8,8 @@ android {
...
@@ -8,6 +8,8 @@ android {
targetSdkVersion
28
targetSdkVersion
28
versionCode
1
versionCode
1
versionName
"1.0"
versionName
"1.0"
// 2、启用Multidex
multiDexEnabled
true
}
}
signingConfigs
{
signingConfigs
{
...
@@ -57,4 +59,5 @@ dependencies {
...
@@ -57,4 +59,5 @@ dependencies {
api
project
(
':fastDevelop'
)
api
project
(
':fastDevelop'
)
api
project
(
':web'
)
api
project
(
':web'
)
api
project
(
':map'
)
api
project
(
':map'
)
implementation
'com.google.android.material:material:1.0.0'
}
}
app/src/main/AndroidManifest.xml
View file @
a663a955
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
android:value=
"d78a6d571c700f3ad33f374d81fed6a2"
/>
android:value=
"d78a6d571c700f3ad33f374d81fed6a2"
/>
<activity
<activity
android:name=
".MainActivity"
android:name=
".
page.
MainActivity"
android:screenOrientation=
"portrait"
>
android:screenOrientation=
"portrait"
>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<action
android:name=
"android.intent.action.MAIN"
/>
...
@@ -43,28 +43,29 @@
...
@@ -43,28 +43,29 @@
</intent-filter>
</intent-filter>
</activity>
</activity>
<activity
<activity
android:name=
".StartActivity"
android:name=
".
page.
StartActivity"
android:theme=
"@style/AppThemeLaunch"
/>
android:theme=
"@style/AppThemeLaunch"
/>
<activity
android:name=
".ListLazyLoadingActivity2"
/>
<activity
android:name=
".page.SlidingRoofPlacementActivity"
/>
<activity
android:name=
".ListLazyLoadingActivity"
/>
<activity
android:name=
".view.ListLazyLoadingActivity2"
/>
<activity
android:name=
".TestListLazyLoadingActivity"
/>
<activity
android:name=
".view.ListLazyLoadingActivity"
/>
<activity
android:name=
".PlayerActivity"
/>
<activity
android:name=
".view.TestListLazyLoadingActivity"
/>
<activity
android:name=
".PlayerActivtiy2"
/>
<activity
android:name=
".function.PlayerActivity"
/>
<activity
android:name=
".FunctionActivity"
/>
<activity
android:name=
".function.PlayerActivtiy2"
/>
<activity
android:name=
".OnMultiClickActivity"
/>
<activity
android:name=
".function.FunctionActivity"
/>
<activity
android:name=
".PermissionActivity"
/>
<activity
android:name=
".view.OnMultiClickActivity"
/>
<activity
android:name=
".SmartRefreshLayoutActivity"
/>
<activity
android:name=
".function.PermissionActivity"
/>
<activity
android:name=
".LoadingPicturesActivity"
/>
<activity
android:name=
".view.SmartRefreshLayoutActivity"
/>
<activity
android:name=
".BannerActivity"
/>
<activity
android:name=
".view.LoadingPicturesActivity"
/>
<activity
android:name=
".ViewActviity"
/>
<activity
android:name=
".view.BannerActivity"
/>
<activity
android:name=
".QRActivity"
/>
<activity
android:name=
".view.ViewActviity"
/>
<activity
android:name=
".TitleActivity"
/>
<activity
android:name=
".function.QRActivity"
/>
<activity
android:name=
".DownLoadAPKActivity"
/>
<activity
android:name=
".view.TitleActivity"
/>
<activity
android:name=
".FragmentInteractiveActivity"
/>
<activity
android:name=
".function.DownLoadAPKActivity"
/>
<activity
android:name=
".FragmentInteractiveActivity2"
/>
<activity
android:name=
".page.FragmentInteractiveActivity"
/>
<activity
android:name=
".PageActivity"
/>
<activity
android:name=
".page.FragmentInteractiveActivity2"
/>
<activity
android:name=
".MyScanActivity"
/>
<activity
android:name=
".page.PageActivity"
/>
<activity
android:name=
".page.MyScanActivity"
/>
<activity
android:name=
".web.CallJavascriptActivity"
/>
<activity
android:name=
".web.CallJavascriptActivity"
/>
<activity
android:name=
".web.JavascriptCallNativeActivity"
/>
<activity
android:name=
".web.JavascriptCallNativeActivity"
/>
<activity
android:name=
".web.WrokWithFlyioTestActivity"
/>
<activity
android:name=
".web.WrokWithFlyioTestActivity"
/>
...
...
app/src/main/java/com/mayi/demo/DownLoadAPKActivity.java
→
app/src/main/java/com/mayi/demo/
function/
DownLoadAPKActivity.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
function
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.view.View
;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.mayi.demo.R
;
import
com.mayi.fastdevelop.bean.AppConfig
;
import
com.mayi.fastdevelop.bean.AppConfig
;
import
com.mayi.fastdevelop.commonpage.UpdateDownLoadAPKActvity
;
import
com.mayi.fastdevelop.commonpage.UpdateDownLoadAPKActvity
;
...
...
app/src/main/java/com/mayi/demo/FunctionActivity.java
→
app/src/main/java/com/mayi/demo/
function/
FunctionActivity.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
function
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.net.Uri
;
import
android.net.Uri
;
...
@@ -15,6 +15,9 @@ import com.gc.call.CallManage;
...
@@ -15,6 +15,9 @@ import com.gc.call.CallManage;
import
com.gc.call.CallParticipationBean
;
import
com.gc.call.CallParticipationBean
;
import
com.gc.call.CallReturnBean
;
import
com.gc.call.CallReturnBean
;
import
com.gc.call.CallReturnListener
;
import
com.gc.call.CallReturnListener
;
import
com.mayi.demo.R
;
import
com.mayi.demo.page.FragmentInteractiveActivity
;
import
com.mayi.demo.page.FragmentInteractiveActivity2
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.bean.UserInfo
;
import
com.mayi.fastdevelop.bean.UserInfo
;
import
com.mayi.fastdevelop.comnon.Constant
;
import
com.mayi.fastdevelop.comnon.Constant
;
...
...
app/src/main/java/com/mayi/demo/PermissionActivity.java
→
app/src/main/java/com/mayi/demo/
function/
PermissionActivity.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
function
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.view.View
;
...
@@ -8,6 +8,7 @@ import android.widget.TextView;
...
@@ -8,6 +8,7 @@ import android.widget.TextView;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.mayi.demo.R
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.util.PermissionUtil
;
import
com.mayi.fastdevelop.util.PermissionUtil
;
import
com.mayi.fastdevelop.view.OnMultiClickListener
;
import
com.mayi.fastdevelop.view.OnMultiClickListener
;
...
...
app/src/main/java/com/mayi/demo/PlayerActivity.java
→
app/src/main/java/com/mayi/demo/
function/
PlayerActivity.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
function
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.view.View
;
import
com.mayi.demo.R
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.base.BaseActivity
;
...
...
app/src/main/java/com/mayi/demo/PlayerActivtiy2.java
→
app/src/main/java/com/mayi/demo/
function/
PlayerActivtiy2.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
function
;
import
android.content.pm.ActivityInfo
;
import
android.content.pm.ActivityInfo
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
com.mayi.demo.R
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.view.AppPlayerView
;
import
com.mayi.fastdevelop.view.AppPlayerView
;
...
...
app/src/main/java/com/mayi/demo/QRActivity.java
→
app/src/main/java/com/mayi/demo/
function/
QRActivity.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
function
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.view.View
;
...
@@ -9,6 +9,7 @@ import android.widget.TextView;
...
@@ -9,6 +9,7 @@ import android.widget.TextView;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.mayi.demo.R
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.util.BitmapUtil
;
import
com.mayi.fastdevelop.util.BitmapUtil
;
import
com.mayi.fastdevelop.util.QrUtil
;
import
com.mayi.fastdevelop.util.QrUtil
;
...
...
app/src/main/java/com/mayi/demo/FragmentInteractiveActivity.java
→
app/src/main/java/com/mayi/demo/
page/
FragmentInteractiveActivity.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
page
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Handler
;
...
@@ -8,6 +8,8 @@ import android.widget.TextView;
...
@@ -8,6 +8,8 @@ import android.widget.TextView;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
androidx.viewpager.widget.ViewPager
;
import
androidx.viewpager.widget.ViewPager
;
import
com.mayi.demo.MyFragment
;
import
com.mayi.demo.R
;
import
com.mayi.fastdevelop.base.BaseFragment
;
import
com.mayi.fastdevelop.base.BaseFragment
;
import
com.mayi.fastdevelop.base.BaseFragmentActivity
;
import
com.mayi.fastdevelop.base.BaseFragmentActivity
;
import
com.mayi.fastdevelop.comnon.AppCallback
;
import
com.mayi.fastdevelop.comnon.AppCallback
;
...
...
app/src/main/java/com/mayi/demo/FragmentInteractiveActivity2.java
→
app/src/main/java/com/mayi/demo/
page/
FragmentInteractiveActivity2.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
page
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Handler
;
...
@@ -8,6 +8,8 @@ import android.widget.TextView;
...
@@ -8,6 +8,8 @@ import android.widget.TextView;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.mayi.demo.MyFragment
;
import
com.mayi.demo.R
;
import
com.mayi.fastdevelop.base.BaseFragment
;
import
com.mayi.fastdevelop.base.BaseFragment
;
import
com.mayi.fastdevelop.base.BaseFragmentActivity
;
import
com.mayi.fastdevelop.base.BaseFragmentActivity
;
import
com.mayi.fastdevelop.comnon.AppCallback
;
import
com.mayi.fastdevelop.comnon.AppCallback
;
...
...
app/src/main/java/com/mayi/demo/MainActivity.java
→
app/src/main/java/com/mayi/demo/
page/
MainActivity.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
page
;
import
android.os.Bundle
;
import
android.os.Bundle
;
...
@@ -10,6 +10,11 @@ import androidx.annotation.NonNull;
...
@@ -10,6 +10,11 @@ import androidx.annotation.NonNull;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
androidx.recyclerview.widget.RecyclerView
;
import
com.mayi.demo.CutPicturesActivity
;
import
com.mayi.demo.function.FunctionActivity
;
import
com.mayi.demo.ItemBean
;
import
com.mayi.demo.R
;
import
com.mayi.demo.view.ViewActviity
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.util.DrawableUtils
;
import
com.mayi.fastdevelop.util.DrawableUtils
;
...
...
app/src/main/java/com/mayi/demo/MyScanActivity.java
→
app/src/main/java/com/mayi/demo/
page/
MyScanActivity.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
page
;
import
com.mayi.fastdevelop.commonpage.zxing.BaseScanActivity
;
import
com.mayi.fastdevelop.commonpage.zxing.BaseScanActivity
;
...
...
app/src/main/java/com/mayi/demo/PageActivity.java
→
app/src/main/java/com/mayi/demo/
page/
PageActivity.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
page
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.Intent
;
import
android.content.Intent
;
...
@@ -10,6 +10,7 @@ import androidx.annotation.Nullable;
...
@@ -10,6 +10,7 @@ import androidx.annotation.Nullable;
import
com.gc.call.CallConstant
;
import
com.gc.call.CallConstant
;
import
com.gc.call.CallManage
;
import
com.gc.call.CallManage
;
import
com.gc.call.CallParticipationBean
;
import
com.gc.call.CallParticipationBean
;
import
com.mayi.demo.R
;
import
com.mayi.demo.web.MainActivity
;
import
com.mayi.demo.web.MainActivity
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.comnon.Key
;
import
com.mayi.fastdevelop.comnon.Key
;
...
@@ -80,6 +81,12 @@ public class PageActivity extends BaseActivity {
...
@@ -80,6 +81,12 @@ public class PageActivity extends BaseActivity {
CallManage
.
getInstance
().
handleTarget
(
bean
);
CallManage
.
getInstance
().
handleTarget
(
bean
);
}
}
});
});
findViewById
(
R
.
id
.
b8
).
setOnClickListener
(
new
OnMultiClickListener
()
{
@Override
public
void
onMultiClick
(
View
v
)
{
gotoActivity
(
SlidingRoofPlacementActivity
.
class
);
}
});
}
}
@Override
@Override
...
...
app/src/main/java/com/mayi/demo/page/SlidingRoofPlacementActivity.java
0 → 100644
View file @
a663a955
package
com
.
mayi
.
demo
.
page
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.util.Log
;
import
android.view.LayoutInflater
;
import
android.view.ViewGroup
;
import
android.widget.TextView
;
import
androidx.annotation.NonNull
;
import
androidx.coordinatorlayout.widget.CoordinatorLayout
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
com.google.android.material.appbar.AppBarLayout
;
import
com.mayi.demo.R
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.scwang.smartrefresh.layout.SmartRefreshLayout
;
import
com.scwang.smartrefresh.layout.api.RefreshLayout
;
import
com.scwang.smartrefresh.layout.listener.OnRefreshListener
;
//滑动置顶,加载更多,下拉刷新
public
class
SlidingRoofPlacementActivity
extends
BaseActivity
{
private
CoordinatorLayout
coordinatorLayout
;
private
AppBarLayout
appBarLayout
;
private
Handler
handler
;
private
int
size
=
100
;
private
LinearLayoutManager
manager
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_slidingroofplacement
);
RecyclerView
rvlist
=
findViewById
(
R
.
id
.
rv_list
);
coordinatorLayout
=
findViewById
(
R
.
id
.
scrollView
);
appBarLayout
=
findViewById
(
R
.
id
.
appBarLayout
);
manager
=
new
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
);
rvlist
.
setLayoutManager
(
manager
);
rvlist
.
setAdapter
(
new
RecyclerView
.
Adapter
()
{
@NonNull
@Override
public
RecyclerView
.
ViewHolder
onCreateViewHolder
(
@NonNull
ViewGroup
parent
,
int
viewType
)
{
return
new
RecyclerView
.
ViewHolder
(
LayoutInflater
.
from
(
parent
.
getContext
()).
inflate
(
R
.
layout
.
item_slidingroofplacement
,
parent
,
false
))
{
};
}
@Override
public
void
onBindViewHolder
(
@NonNull
RecyclerView
.
ViewHolder
holder
,
int
position
)
{
// Log.i("coordinatorLayout", " Adapter position=" + position);
((
TextView
)
holder
.
itemView
).
setText
(
""
+
position
);
}
@Override
public
int
getItemCount
()
{
return
size
;
}
});
handler
=
new
Handler
();
final
SmartRefreshLayout
layout
=
findViewById
(
R
.
id
.
layout
);
layout
.
setEnableRefresh
(
true
);
layout
.
setEnableLoadmore
(
false
);
layout
.
setOnRefreshListener
(
new
OnRefreshListener
()
{
@Override
public
void
onRefresh
(
RefreshLayout
refreshlayout
)
{
handler
.
postDelayed
(
new
Runnable
()
{
@Override
public
void
run
()
{
size
=
100
;
rvlist
.
getAdapter
().
notifyDataSetChanged
();
layout
.
finishRefresh
();
//完成刷新
}
},
1000
);
}
});
handler
.
postDelayed
(
new
Runnable
()
{
@Override
public
void
run
()
{
if
(
rvlist
.
getScrollState
()
==
RecyclerView
.
SCROLL_STATE_IDLE
)
{
if
(
manager
.
findLastVisibleItemPosition
()
+
10
>
size
)
{
Log
.
i
(
"coordinatorLayout"
,
" notifyDataSetChanged size="
+
size
);
size
=
size
+
10
;
rvlist
.
getAdapter
().
notifyDataSetChanged
();
}
}
handler
.
postDelayed
(
this
,
1000
);
}
},
1000
);
}
}
app/src/main/java/com/mayi/demo/StartActivity.java
→
app/src/main/java/com/mayi/demo/
page/
StartActivity.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
page
;
import
com.mayi.demo.view.ViewActviity
;
import
com.mayi.fastdevelop.commonpage.BaseStartActivity
;
import
com.mayi.fastdevelop.commonpage.BaseStartActivity
;
public
class
StartActivity
extends
BaseStartActivity
<
ViewActviity
,
ViewActviity
,
ViewActviity
>{
public
class
StartActivity
extends
BaseStartActivity
<
ViewActviity
,
ViewActviity
,
ViewActviity
>{
...
...
app/src/main/java/com/mayi/demo/BannerActivity.java
→
app/src/main/java/com/mayi/demo/
view/
BannerActivity.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
view
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.mayi.demo.R
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.view.PicassoImageLoader
;
import
com.mayi.fastdevelop.view.PicassoImageLoader
;
import
com.youth.banner.Banner
;
import
com.youth.banner.Banner
;
...
...
app/src/main/java/com/mayi/demo/ListLazyLoadingActivity.java
→
app/src/main/java/com/mayi/demo/
view/
ListLazyLoadingActivity.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
view
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Handler
;
import
com.mayi.demo.MyListLazyLoadingAdapter
;
import
com.mayi.demo.R
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.view.lazyLoading.ListLazyLoadingView
;
import
com.mayi.fastdevelop.view.lazyLoading.ListLazyLoadingView
;
...
...
app/src/main/java/com/mayi/demo/ListLazyLoadingActivity2.java
→
app/src/main/java/com/mayi/demo/
view/
ListLazyLoadingActivity2.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
view
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Handler
;
import
com.mayi.demo.MyListLazyLoadingAdapter
;
import
com.mayi.demo.R
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.view.lazyLoading.ListLazyLoadingView
;
import
com.mayi.fastdevelop.view.lazyLoading.ListLazyLoadingView
;
import
com.scwang.smartrefresh.layout.SmartRefreshLayout
;
import
com.scwang.smartrefresh.layout.SmartRefreshLayout
;
...
...
app/src/main/java/com/mayi/demo/LoadingPicturesActivity.java
→
app/src/main/java/com/mayi/demo/
view/
LoadingPicturesActivity.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
view
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.os.Environment
;
import
android.os.Environment
;
...
@@ -6,6 +6,7 @@ import android.widget.ImageView;
...
@@ -6,6 +6,7 @@ import android.widget.ImageView;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.mayi.demo.R
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.view.LoadingPictures
;
import
com.mayi.fastdevelop.view.LoadingPictures
;
...
...
app/src/main/java/com/mayi/demo/OnMultiClickActivity.java
→
app/src/main/java/com/mayi/demo/
view/
OnMultiClickActivity.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
view
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.view.View
;
...
@@ -6,6 +6,7 @@ import android.widget.Button;
...
@@ -6,6 +6,7 @@ import android.widget.Button;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.mayi.demo.R
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.view.OnMultiClickListener
;
import
com.mayi.fastdevelop.view.OnMultiClickListener
;
...
...
app/src/main/java/com/mayi/demo/SmartRefreshLayoutActivity.java
→
app/src/main/java/com/mayi/demo/
view/
SmartRefreshLayoutActivity.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
view
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Handler
;
...
@@ -11,6 +11,7 @@ import androidx.annotation.Nullable;
...
@@ -11,6 +11,7 @@ import androidx.annotation.Nullable;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
androidx.recyclerview.widget.RecyclerView
;
import
com.mayi.demo.R
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.scwang.smartrefresh.layout.SmartRefreshLayout
;
import
com.scwang.smartrefresh.layout.SmartRefreshLayout
;
import
com.scwang.smartrefresh.layout.api.RefreshLayout
;
import
com.scwang.smartrefresh.layout.api.RefreshLayout
;
...
...
app/src/main/java/com/mayi/demo/TestListLazyLoadingActivity.java
→
app/src/main/java/com/mayi/demo/
view/
TestListLazyLoadingActivity.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
view
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.EditText
;
import
android.widget.EditText
;
import
com.mayi.demo.R
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.base.BaseActivity
;
public
class
TestListLazyLoadingActivity
extends
BaseActivity
{
public
class
TestListLazyLoadingActivity
extends
BaseActivity
{
...
...
app/src/main/java/com/mayi/demo/TitleActivity.java
→
app/src/main/java/com/mayi/demo/
view/
TitleActivity.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
view
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.view.View
;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.mayi.demo.R
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.util.ToastUtil
;
import
com.mayi.fastdevelop.util.ToastUtil
;
import
com.mayi.fastdevelop.view.CustomTitleBar
;
import
com.mayi.fastdevelop.view.CustomTitleBar
;
...
...
app/src/main/java/com/mayi/demo/ViewActviity.java
→
app/src/main/java/com/mayi/demo/
view/
ViewActviity.java
View file @
a663a955
package
com
.
mayi
.
demo
;
package
com
.
mayi
.
demo
.
view
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Handler
;
...
@@ -6,6 +6,7 @@ import android.view.View;
...
@@ -6,6 +6,7 @@ import android.view.View;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.mayi.demo.R
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.base.BaseActivity
;
import
com.mayi.fastdevelop.util.DialogUtils
;
import
com.mayi.fastdevelop.util.DialogUtils
;
import
com.mayi.fastdevelop.util.ToastUtil
;
import
com.mayi.fastdevelop.util.ToastUtil
;
...
@@ -37,7 +38,6 @@ public class ViewActviity extends BaseActivity {
...
@@ -37,7 +38,6 @@ public class ViewActviity extends BaseActivity {
}).
show
();
}).
show
();
}
}
});
});
findViewById
(
R
.
id
.
b2
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
findViewById
(
R
.
id
.
b2
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
...
@@ -72,7 +72,6 @@ public class ViewActviity extends BaseActivity {
...
@@ -72,7 +72,6 @@ public class ViewActviity extends BaseActivity {
}).
show
();
}).
show
();
}
}
});
});
findViewById
(
R
.
id
.
b5
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
findViewById
(
R
.
id
.
b5
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
...
@@ -89,7 +88,6 @@ public class ViewActviity extends BaseActivity {
...
@@ -89,7 +88,6 @@ public class ViewActviity extends BaseActivity {
});
});
}
}
});
});
findViewById
(
R
.
id
.
b6
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
findViewById
(
R
.
id
.
b6
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
...
@@ -106,7 +104,6 @@ public class ViewActviity extends BaseActivity {
...
@@ -106,7 +104,6 @@ public class ViewActviity extends BaseActivity {
});
});
}
}
});
});
findViewById
(
R
.
id
.
b7
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
findViewById
(
R
.
id
.
b7
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
...
@@ -118,7 +115,6 @@ public class ViewActviity extends BaseActivity {
...
@@ -118,7 +115,6 @@ public class ViewActviity extends BaseActivity {
});
});
}
}
});
});
findViewById
(
R
.
id
.
b8
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
findViewById
(
R
.
id
.
b8
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
...
@@ -130,14 +126,12 @@ public class ViewActviity extends BaseActivity {
...
@@ -130,14 +126,12 @@ public class ViewActviity extends BaseActivity {
});
});
}
}
});
});
findViewById
(
R
.
id
.
b9
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
findViewById
(
R
.
id
.
b9
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
gotoActivity
(
TitleActivity
.
class
);
gotoActivity
(
TitleActivity
.
class
);
}
}
});
});
findViewById
(
R
.
id
.
b10
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
findViewById
(
R
.
id
.
b10
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
...
@@ -150,7 +144,6 @@ public class ViewActviity extends BaseActivity {
...
@@ -150,7 +144,6 @@ public class ViewActviity extends BaseActivity {
gotoActivity
(
LoadingPicturesActivity
.
class
);
gotoActivity
(
LoadingPicturesActivity
.
class
);
}
}
});
});
findViewById
(
R
.
id
.
b12
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
findViewById
(
R
.
id
.
b12
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
...
@@ -163,14 +156,12 @@ public class ViewActviity extends BaseActivity {
...
@@ -163,14 +156,12 @@ public class ViewActviity extends BaseActivity {
gotoActivity
(
OnMultiClickActivity
.
class
);
gotoActivity
(
OnMultiClickActivity
.
class
);
}
}
});
});
findViewById
(
R
.
id
.
b14
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
findViewById
(
R
.
id
.
b14
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
gotoActivity
(
TestListLazyLoadingActivity
.
class
);
gotoActivity
(
TestListLazyLoadingActivity
.
class
);
}
}
});
});
findViewById
(
R
.
id
.
b15
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
findViewById
(
R
.
id
.
b15
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
...
...
app/src/main/res/layout/activity_main.xml
View file @
a663a955
...
@@ -4,5 +4,5 @@
...
@@ -4,5 +4,5 @@
android:id=
"@+id/list"
android:id=
"@+id/list"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".MainActivity"
/>
tools:context=
".
page.
MainActivity"
/>
app/src/main/res/layout/activity_page.xml
View file @
a663a955
...
@@ -57,6 +57,12 @@
...
@@ -57,6 +57,12 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"搜索地址页"
/>
android:text=
"搜索地址页"
/>
<Button
android:id=
"@+id/b8"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"滑动置顶,加载更多,下拉刷新"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>
</ScrollView>
\ No newline at end of file
app/src/main/res/layout/activity_slidingroofplacement.xml
0 → 100644
View file @
a663a955
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/activity_main"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#ffffff"
android:fitsSystemWindows=
"true"
android:orientation=
"vertical"
>
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id=
"@+id/layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<!-- 第一部分:CoordinatorLayout -->
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id=
"@+id/scrollView"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#ffffff"
>
<!-- 第二部分:缩放控件AppBarLayout -->
<com.google.android.material.appbar.AppBarLayout
android:id=
"@+id/appBarLayout"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<RelativeLayout
android:id=
"@+id/collapsing_tool_bar_test_ctl"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:layout_scrollFlags=
"scroll|enterAlways"
>
<!-- layout_scrollFlags="scroll" 所有想滚动出屏幕的view都需要设置这个flag, 没有设置这个flag的view将被固定在屏幕顶部。-->
<RelativeLayout
android:id=
"@+id/userScroreRe"
android:layout_width=
"match_parent"
android:layout_height=
"240dp"
android:background=
"#f00"
>
</RelativeLayout>
</RelativeLayout>
<TextView
android:layout_width=
"fill_parent"
android:layout_height=
"50dip"
android:background=
"@color/color_666666"
android:orientation=
"horizontal"
android:text=
"留在屏幕"
android:textColor=
"@color/white"
/>
<!-- 没有设置的则会停留在顶部 -->
</com.google.android.material.appbar.AppBarLayout>
<!-- 第三部分:Your Scroll View-->
<!-- 一开始不明白为什么一定要使用NestedScrollView为什么不用你管ScrollView -->
<!-- 简单的说,它是专门用于和CoordinatorLayout搭配的达成滑动 -->
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_list"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/item_slidingroofplacement.xml
0 → 100644
View file @
a663a955
<?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:text=
"1"
android:textColor=
"@color/black"
/>
\ No newline at end of file
fastDevelop/build.gradle
View file @
a663a955
...
@@ -47,6 +47,6 @@ dependencies {
...
@@ -47,6 +47,6 @@ dependencies {
// api project(':call')
// api project(':call')
api
'com.gc:call:1.0.0'
api
'com.gc:call:1.0.0'
api
'com.google.android.exoplayer:exoplayer:2.10.5'
api
'com.google.android.exoplayer:exoplayer:2.10.5'
api
'androidx.multidex:multidex:2.0.0'
api
'com.tencent:mmkv:1.0.23'
api
'com.tencent:mmkv:1.0.23'
}
}
\ No newline at end of file
fastDevelop/src/main/java/com/mayi/fastdevelop/base/BaseApplication.java
View file @
a663a955
...
@@ -8,6 +8,8 @@ import android.os.Environment;
...
@@ -8,6 +8,8 @@ import android.os.Environment;
import
android.os.Handler
;
import
android.os.Handler
;
import
android.os.HandlerThread
;
import
android.os.HandlerThread
;
import
androidx.multidex.MultiDexApplication
;
import
com.mayi.fastdevelop.util.ActivitysManager
;
import
com.mayi.fastdevelop.util.ActivitysManager
;
import
com.mayi.fastdevelop.util.DateUtil
;
import
com.mayi.fastdevelop.util.DateUtil
;
import
com.mayi.fastdevelop.util.FileUtil
;
import
com.mayi.fastdevelop.util.FileUtil
;
...
@@ -33,7 +35,7 @@ import com.tencent.mmkv.MMKV;
...
@@ -33,7 +35,7 @@ import com.tencent.mmkv.MMKV;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
public
abstract
class
BaseApplication
extends
Application
{
public
abstract
class
BaseApplication
extends
MultiDex
Application
{
private
static
BaseApplication
mInstance
;
private
static
BaseApplication
mInstance
;
private
int
logSize
=
5
*
1024
*
1024
;
//默认记录Log文件大小--5M
private
int
logSize
=
5
*
1024
*
1024
;
//默认记录Log文件大小--5M
...
...
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