Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
B
Browser White
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
Browser White
Commits
0945c93d
Commit
0945c93d
authored
Aug 28, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
a0ef7321
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
23 deletions
+52
-23
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+24
-12
AdmobMaxHelper.kt
...src/main/java/com/base/browserwhite/ads/AdmobMaxHelper.kt
+6
-0
WebStoreActivity.kt
...ase/browserwhite/ui/activity/webstore/WebStoreActivity.kt
+18
-7
HeadWebsiteAdapter.kt
...va/com/base/browserwhite/ui/adapter/HeadWebsiteAdapter.kt
+2
-2
activity_news.xml
app/src/main/res/layout/activity_news.xml
+1
-1
activity_web_store.xml
app/src/main/res/layout/activity_web_store.xml
+1
-1
No files found.
app/src/main/AndroidManifest.xml
View file @
0945c93d
...
@@ -48,31 +48,48 @@
...
@@ -48,31 +48,48 @@
<category
android:name=
"android.intent.category.LAUNCHER"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</intent-filter>
</activity>
</activity>
<activity
<activity
android:name=
".ui.activity.
weather.WeatherInterface
"
android:name=
".ui.activity.
MainActivity
"
android:exported=
"false"
android:exported=
"false"
android:launchMode=
"singleTop"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
<activity
<activity
android:name=
".ui.activity.appprocess.AppProcessActivity"
android:name=
".ui.activity.webbrowser.WebBrowserActivity"
android:exported=
"true"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
/>
<category
android:name=
"android.intent.category.DEFAULT"
/>
<category
android:name=
"android.intent.category.BROWSABLE"
/>
<!-- 接受网页链接 -->
<data
android:scheme=
"http"
/>
<data
android:scheme=
"https"
/>
</intent-filter>
</activity>
<activity
android:name=
".ui.activity.weather.WeatherInterface"
android:exported=
"false"
android:exported=
"false"
android:launchMode=
"singleTop"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
<activity
<activity
android:name=
".ui.activity.
scanqrc.QrcResult
Activity"
android:name=
".ui.activity.
appprocess.AppProcess
Activity"
android:exported=
"false"
android:exported=
"false"
android:launchMode=
"singleTop"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
<activity
<activity
android:name=
".ui.activity.
Main
Activity"
android:name=
".ui.activity.
scanqrc.QrcResult
Activity"
android:exported=
"false"
android:exported=
"false"
android:launchMode=
"singleTop"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
<activity
<activity
android:name=
".ui.activity.download.WebDownloadManagerActivity"
android:name=
".ui.activity.download.WebDownloadManagerActivity"
android:exported=
"false"
android:exported=
"false"
...
@@ -128,7 +145,7 @@
...
@@ -128,7 +145,7 @@
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
<activity
<activity
android:name=
".ui.activity.webstore.We
v
StoreActivity"
android:name=
".ui.activity.webstore.We
b
StoreActivity"
android:exported=
"false"
android:exported=
"false"
android:launchMode=
"singleTop"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
...
@@ -145,12 +162,7 @@
...
@@ -145,12 +162,7 @@
android:launchMode=
"singleTop"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
<activity
android:name=
".ui.activity.webbrowser.WebBrowserActivity"
android:exported=
"false"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
<activity
<activity
android:name=
".ui.activity.labelstack.LabelStackActivity"
android:name=
".ui.activity.labelstack.LabelStackActivity"
android:exported=
"false"
android:exported=
"false"
...
...
app/src/main/java/com/base/browserwhite/ads/AdmobMaxHelper.kt
View file @
0945c93d
...
@@ -25,6 +25,12 @@ object AdmobMaxHelper {
...
@@ -25,6 +25,12 @@ object AdmobMaxHelper {
var
isBlack
:
Boolean
=
false
var
isBlack
:
Boolean
=
false
var
isInterOpenShowing
:
Boolean
=
false
var
isInterOpenShowing
:
Boolean
=
false
// if (System.currentTimeMillis() - lastShowInter > 10 * 1000 * 1000 || lastShowInter == 0L) {
// AdmobMaxHelper.admobMaxShowInterstitialAd(this@WebBrowserActivity, false) {
// lastShowInter = System.currentTimeMillis()
// finishToMain()
// }
// }
var
lastShowInter
=
0L
var
lastShowInter
=
0L
private
fun
getSpAdmobTrueMaxFalse
():
Boolean
{
private
fun
getSpAdmobTrueMaxFalse
():
Boolean
{
...
...
app/src/main/java/com/base/browserwhite/ui/activity/webstore/We
v
StoreActivity.kt
→
app/src/main/java/com/base/browserwhite/ui/activity/webstore/We
b
StoreActivity.kt
View file @
0945c93d
...
@@ -4,14 +4,17 @@ import android.annotation.SuppressLint
...
@@ -4,14 +4,17 @@ import android.annotation.SuppressLint
import
android.content.Intent
import
android.content.Intent
import
android.graphics.Color
import
android.graphics.Color
import
android.graphics.drawable.Drawable
import
android.graphics.drawable.Drawable
import
androidx.activity.addCallback
import
androidx.core.view.updatePadding
import
androidx.core.view.updatePadding
import
androidx.lifecycle.lifecycleScope
import
androidx.lifecycle.lifecycleScope
import
com.base.browserwhite.R
import
com.base.browserwhite.R
import
com.base.browserwhite.ads.AdmobMaxHelper
import
com.base.browserwhite.ads.AdmobMaxHelper.lastShowInter
import
com.base.browserwhite.bean.WebCategoryBean
import
com.base.browserwhite.bean.WebCategoryBean
import
com.base.browserwhite.bean.WebSiteGroupBean
import
com.base.browserwhite.bean.WebSiteGroupBean
import
com.base.browserwhite.bean.webCategoryBeanList
import
com.base.browserwhite.bean.webCategoryBeanList
import
com.base.browserwhite.bean.webSiteGroupBeanList
import
com.base.browserwhite.bean.webSiteGroupBeanList
import
com.base.browserwhite.databinding.ActivityWe
v
StoreBinding
import
com.base.browserwhite.databinding.ActivityWe
b
StoreBinding
import
com.base.browserwhite.databinding.ItemTabWebstoreBinding
import
com.base.browserwhite.databinding.ItemTabWebstoreBinding
import
com.base.browserwhite.ui.activity.BaseActivity
import
com.base.browserwhite.ui.activity.BaseActivity
import
com.base.browserwhite.ui.activity.webbrowser.WebBrowserActivity
import
com.base.browserwhite.ui.activity.webbrowser.WebBrowserActivity
...
@@ -25,12 +28,12 @@ import kotlinx.coroutines.Dispatchers
...
@@ -25,12 +28,12 @@ import kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.launch
import
kotlinx.coroutines.launch
class
We
vStoreActivity
:
BaseActivity
<
ActivityWev
StoreBinding
>()
{
class
We
bStoreActivity
:
BaseActivity
<
ActivityWeb
StoreBinding
>()
{
private
val
TAG
=
"WevStoreActivity"
private
val
TAG
=
"WevStoreActivity"
override
val
binding
:
ActivityWe
v
StoreBinding
by
lazy
{
override
val
binding
:
ActivityWe
b
StoreBinding
by
lazy
{
ActivityWe
v
StoreBinding
.
inflate
(
layoutInflater
)
ActivityWe
b
StoreBinding
.
inflate
(
layoutInflater
)
}
}
private
val
webCategoryBean
:
ArrayList
<
WebCategoryBean
>
=
arrayListOf
()
private
val
webCategoryBean
:
ArrayList
<
WebCategoryBean
>
=
arrayListOf
()
private
val
webSiteGroupBean
:
ArrayList
<
WebSiteGroupBean
>
=
arrayListOf
()
private
val
webSiteGroupBean
:
ArrayList
<
WebSiteGroupBean
>
=
arrayListOf
()
...
@@ -63,8 +66,16 @@ class WevStoreActivity : BaseActivity<ActivityWevStoreBinding>() {
...
@@ -63,8 +66,16 @@ class WevStoreActivity : BaseActivity<ActivityWevStoreBinding>() {
override
fun
initListener
()
{
override
fun
initListener
()
{
super
.
initListener
()
super
.
initListener
()
onBackPressedDispatcher
.
addCallback
{
if
(
System
.
currentTimeMillis
()
-
lastShowInter
>
10
*
1000
*
1000
||
lastShowInter
==
0L
)
{
AdmobMaxHelper
.
admobMaxShowInterstitialAd
(
this
@WebStoreActivity
,
false
)
{
lastShowInter
=
System
.
currentTimeMillis
()
finishToMain
()
}
}
}
binding
.
ivGuanbi
.
setOnClickListener
{
binding
.
ivGuanbi
.
setOnClickListener
{
finishToMain
()
onBackPressedDispatcher
.
onBackPressed
()
}
}
}
}
...
@@ -72,14 +83,14 @@ class WevStoreActivity : BaseActivity<ActivityWevStoreBinding>() {
...
@@ -72,14 +83,14 @@ class WevStoreActivity : BaseActivity<ActivityWevStoreBinding>() {
webCategoryBean
.
addAll
(
webCategoryBeanList
)
webCategoryBean
.
addAll
(
webCategoryBeanList
)
webSiteGroupBean
.
addAll
(
webSiteGroupBeanList
)
webSiteGroupBean
.
addAll
(
webSiteGroupBeanList
)
val
imageSize
=
this
@We
v
StoreActivity
.
resources
.
getDimensionPixelSize
(
R
.
dimen
.
dp_30
)
val
imageSize
=
this
@We
b
StoreActivity
.
resources
.
getDimensionPixelSize
(
R
.
dimen
.
dp_30
)
launch
(
Dispatchers
.
Main
)
{
launch
(
Dispatchers
.
Main
)
{
webCategoryBean
.
forEach
{
bean
->
webCategoryBean
.
forEach
{
bean
->
// LogEx.logDebug(TAG, bean.iconUrl)
// LogEx.logDebug(TAG, bean.iconUrl)
val
tabBinding
=
ItemTabWebstoreBinding
.
inflate
(
layoutInflater
)
val
tabBinding
=
ItemTabWebstoreBinding
.
inflate
(
layoutInflater
)
tabBinding
.
tv
.
text
=
bean
.
name
tabBinding
.
tv
.
text
=
bean
.
name
Glide
.
with
(
this
@We
v
StoreActivity
).
asDrawable
().
load
(
bean
.
iconUrl
).
into
(
Glide
.
with
(
this
@We
b
StoreActivity
).
asDrawable
().
load
(
bean
.
iconUrl
).
into
(
object
:
CustomTarget
<
Drawable
>()
{
object
:
CustomTarget
<
Drawable
>()
{
override
fun
onResourceReady
(
resource
:
Drawable
,
transition
:
Transition
<
in
Drawable
>?)
{
override
fun
onResourceReady
(
resource
:
Drawable
,
transition
:
Transition
<
in
Drawable
>?)
{
LogEx
.
logDebug
(
TAG
,
"resource=${resource.intrinsicWidth} ${resource.intrinsicHeight}"
)
LogEx
.
logDebug
(
TAG
,
"resource=${resource.intrinsicWidth} ${resource.intrinsicHeight}"
)
...
...
app/src/main/java/com/base/browserwhite/ui/adapter/HeadWebsiteAdapter.kt
View file @
0945c93d
...
@@ -12,7 +12,7 @@ import com.base.browserwhite.R
...
@@ -12,7 +12,7 @@ import com.base.browserwhite.R
import
com.base.browserwhite.bean.WebSiteBean
import
com.base.browserwhite.bean.WebSiteBean
import
com.base.browserwhite.databinding.ItemWebsiteHeadBinding
import
com.base.browserwhite.databinding.ItemWebsiteHeadBinding
import
com.base.browserwhite.ui.activity.webbrowser.WebBrowserActivity
import
com.base.browserwhite.ui.activity.webbrowser.WebBrowserActivity
import
com.base.browserwhite.ui.activity.webstore.We
v
StoreActivity
import
com.base.browserwhite.ui.activity.webstore.We
b
StoreActivity
import
com.base.browserwhite.ui.views.itemtouch.MyItemTouchHelperCallBack
import
com.base.browserwhite.ui.views.itemtouch.MyItemTouchHelperCallBack
import
com.base.browserwhite.utils.XmlEx.inflate
import
com.base.browserwhite.utils.XmlEx.inflate
import
com.chad.library.adapter4.BaseSingleItemAdapter
import
com.chad.library.adapter4.BaseSingleItemAdapter
...
@@ -33,7 +33,7 @@ class HeadWebsiteAdapter : BaseSingleItemAdapter<List<WebSiteBean>, HeadWebsiteA
...
@@ -33,7 +33,7 @@ class HeadWebsiteAdapter : BaseSingleItemAdapter<List<WebSiteBean>, HeadWebsiteA
val
websiteAdapter
=
WebsiteAdapter
(
0
)
{
bean
->
val
websiteAdapter
=
WebsiteAdapter
(
0
)
{
bean
->
if
(
bean
.
name
==
"Increase"
)
{
if
(
bean
.
name
==
"Increase"
)
{
context
.
startActivity
(
Intent
(
context
,
We
v
StoreActivity
::
class
.
java
))
context
.
startActivity
(
Intent
(
context
,
We
b
StoreActivity
::
class
.
java
))
}
else
{
}
else
{
context
.
startActivity
(
Intent
(
context
,
WebBrowserActivity
::
class
.
java
).
apply
{
context
.
startActivity
(
Intent
(
context
,
WebBrowserActivity
::
class
.
java
).
apply
{
putExtra
(
"url"
,
bean
.
url
)
putExtra
(
"url"
,
bean
.
url
)
...
...
app/src/main/res/layout/activity_news.xml
View file @
0945c93d
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
android:orientation=
"vertical"
tools:context=
".ui.activity.webstore.We
v
StoreActivity"
>
tools:context=
".ui.activity.webstore.We
b
StoreActivity"
>
<FrameLayout
<FrameLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
...
app/src/main/res/layout/activity_we
v
_store.xml
→
app/src/main/res/layout/activity_we
b
_store.xml
View file @
0945c93d
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
android:orientation=
"vertical"
tools:context=
".ui.activity.webstore.We
v
StoreActivity"
>
tools:context=
".ui.activity.webstore.We
b
StoreActivity"
>
<FrameLayout
<FrameLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
...
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