Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
R
reelshort 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
reelshort white
Commits
8fd197b3
Commit
8fd197b3
authored
Jan 17, 2025
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...搜索栏高斯模糊
parent
9bd753b1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
31 deletions
+70
-31
HomeFragment.kt
app/src/main/java/com/base/appzxhy/ui/main/HomeFragment.kt
+2
-3
bg_gradient_black_1.xml
app/src/main/res/drawable/bg_gradient_black_1.xml
+10
-0
bg_gradient_black_2.xml
app/src/main/res/drawable/bg_gradient_black_2.xml
+10
-0
fragment_home.xml
app/src/main/res/layout/fragment_home.xml
+1
-2
item_banner.xml
app/src/main/res/layout/item_banner.xml
+37
-23
item_gallery_banner.xml
app/src/main/res/layout/item_gallery_banner.xml
+10
-3
No files found.
app/src/main/java/com/base/appzxhy/ui/main/HomeFragment.kt
View file @
8fd197b3
package
com.base.appzxhy.ui.main
import
android.content.Intent
import
android.graphics.drawable.Drawable
import
android.os.Build
import
androidx.core.view.updatePadding
import
androidx.lifecycle.lifecycleScope
...
...
@@ -60,7 +59,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::infl
runCatching
{
val
algorithm
:
BlurAlgorithm
=
getBlurAlgorithm
()
binding
.
blurView
.
setupWith
(
binding
.
root
,
algorithm
)
.
setBlurRadius
(
5f
)
.
setBlurRadius
(
1
5f
)
}
}
...
...
@@ -99,7 +98,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::infl
})
}
it
.
paletteCallBack
=
{
color
->
binding
.
blurView
.
setOverlayColor
(
color
)
//
binding.blurView.setOverlayColor(color)
}
contactAdapter
?.
addAdapter
(
0
,
it
)
}
...
...
app/src/main/res/drawable/bg_gradient_black_1.xml
0 → 100644
View file @
8fd197b3
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<gradient
android:angle=
"90"
android:centerY=
"0.5"
android:endColor=
"#1A000000"
android:startColor=
"@color/black"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_gradient_black_2.xml
0 → 100644
View file @
8fd197b3
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<gradient
android:angle=
"90"
android:centerY=
"0.5"
android:endColor=
"#00000000"
android:startColor=
"#4D000000"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/fragment_home.xml
View file @
8fd197b3
...
...
@@ -8,7 +8,6 @@
android:orientation=
"vertical"
tools:context=
".ui.main.HomeFragment"
>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv"
android:layout_width=
"match_parent"
...
...
@@ -21,7 +20,7 @@
android:id=
"@+id/blurView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:blurOverlayColor=
"
@color/black
"
app:blurOverlayColor=
"
#00000000
"
app:layout_constraintTop_toTopOf=
"parent"
>
<FrameLayout
...
...
app/src/main/res/layout/item_banner.xml
View file @
8fd197b3
<?xml version="1.0" encoding="utf-8"?>
<
Linear
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Frame
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:banner=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent
"
xmlns:tools=
"http://schemas.android.com/tools
"
android:id=
"@+id/root"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"350dp"
android:layout_gravity=
"bottom"
android:background=
"@drawable/bg_gradient_black_1"
tools:ignore=
"ContentDescription"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
...
...
@@ -26,5 +38,7 @@
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"15dp"
android:layout_marginBottom=
"20dp"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
</FrameLayout>
\ No newline at end of file
app/src/main/res/layout/item_gallery_banner.xml
View file @
8fd197b3
...
...
@@ -2,18 +2,18 @@
<androidx.cardview.widget.CardView
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:id=
"@+id/cardView"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:cardCornerRadius=
"10dp"
>
<ImageView
android:id=
"@+id/iv"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:
padding
=
"1dp"
android:
layout_margin
=
"1dp"
android:scaleType=
"centerCrop"
tools:background=
"#8F62FF"
tools:ignore=
"ContentDescription"
/>
<View
...
...
@@ -21,6 +21,13 @@
android:layout_height=
"wrap_content"
android:background=
"@drawable/bg_stroke_ffffff_10"
/>
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"80dp"
android:layout_gravity=
"bottom"
android:background=
"@drawable/bg_gradient_black_2"
tools:ignore=
"ContentDescription"
/>
<LinearLayout
android:id=
"@+id/llPlay"
android:layout_width=
"wrap_content"
...
...
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