Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
HBHAndroid
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨秀秀
HBHAndroid
Commits
c74d58a5
Commit
c74d58a5
authored
Nov 13, 2023
by
david
Committed by
杨秀秀
Nov 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复
parent
1f6a8a86
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
HotSalesActivity.java
...java/com/xx/hbhconsumer/ui/hotsales/HotSalesActivity.java
+9
-0
SearchActivity.java
...ain/java/com/xx/hbhconsumer/ui/search/SearchActivity.java
+4
-0
activity_search.xml
consumer/src/main/res/layout/activity_search.xml
+4
-0
No files found.
consumer/src/main/java/com/xx/hbhconsumer/ui/hotsales/HotSalesActivity.java
View file @
c74d58a5
...
@@ -48,6 +48,10 @@ public class HotSalesActivity extends BaseActivity<ActivityHotSalesBinding, HotS
...
@@ -48,6 +48,10 @@ public class HotSalesActivity extends BaseActivity<ActivityHotSalesBinding, HotS
@Override
@Override
public
void
onChanged
(
List
<
HotSalesBean
>
hotSalesBeanList
)
{
public
void
onChanged
(
List
<
HotSalesBean
>
hotSalesBeanList
)
{
if
(
hotSalesBeanList
.
isEmpty
())
{
binding
.
refresh
.
setEnableLoadMore
(
false
);
}
if
(
hotSalesBeanList
.
size
()
<=
3
)
{
if
(
hotSalesBeanList
.
size
()
<=
3
)
{
hotSalesTop3GoodsAdapter
.
mList
=
hotSalesBeanList
;
hotSalesTop3GoodsAdapter
.
mList
=
hotSalesBeanList
;
hotSalesTop3GoodsAdapter
.
notifyDataSetChanged
();
hotSalesTop3GoodsAdapter
.
notifyDataSetChanged
();
...
@@ -60,6 +64,11 @@ public class HotSalesActivity extends BaseActivity<ActivityHotSalesBinding, HotS
...
@@ -60,6 +64,11 @@ public class HotSalesActivity extends BaseActivity<ActivityHotSalesBinding, HotS
binding
.
rvGoodsList
.
setVisibility
(
View
.
VISIBLE
);
binding
.
rvGoodsList
.
setVisibility
(
View
.
VISIBLE
);
}
}
if
(
viewModel
.
page
==
1
)
{
binding
.
refresh
.
finishRefresh
();
}
else
{
binding
.
refresh
.
finishLoadMore
();
}
}
else
{
}
else
{
hotSalesTop3GoodsAdapter
.
mList
=
hotSalesBeanList
.
subList
(
0
,
3
);
hotSalesTop3GoodsAdapter
.
mList
=
hotSalesBeanList
.
subList
(
0
,
3
);
...
...
consumer/src/main/java/com/xx/hbhconsumer/ui/search/SearchActivity.java
View file @
c74d58a5
...
@@ -93,12 +93,16 @@ public class SearchActivity extends BaseActivity<ActivitySearchBinding, SearchVi
...
@@ -93,12 +93,16 @@ public class SearchActivity extends BaseActivity<ActivitySearchBinding, SearchVi
binding
.
tvShopNoMore
.
setVisibility
(
View
.
GONE
);
binding
.
tvShopNoMore
.
setVisibility
(
View
.
GONE
);
binding
.
rvSearchShopList
.
setVisibility
(
View
.
GONE
);
binding
.
rvSearchShopList
.
setVisibility
(
View
.
GONE
);
binding
.
rlSearchBar
.
setVisibility
(
View
.
VISIBLE
);
binding
.
rlSearchBar
.
setVisibility
(
View
.
VISIBLE
);
binding
.
nsvGoods
.
setVisibility
(
View
.
VISIBLE
);
binding
.
nsvShops
.
setVisibility
(
View
.
GONE
);
}
else
{
}
else
{
binding
.
rvSearchGoodsList
.
setVisibility
(
View
.
GONE
);
binding
.
rvSearchGoodsList
.
setVisibility
(
View
.
GONE
);
binding
.
tvGoodsNoMore
.
setVisibility
(
View
.
GONE
);
binding
.
tvGoodsNoMore
.
setVisibility
(
View
.
GONE
);
binding
.
tvShopNoMore
.
setVisibility
(
View
.
VISIBLE
);
binding
.
tvShopNoMore
.
setVisibility
(
View
.
VISIBLE
);
binding
.
rvSearchShopList
.
setVisibility
(
View
.
VISIBLE
);
binding
.
rvSearchShopList
.
setVisibility
(
View
.
VISIBLE
);
binding
.
rlSearchBar
.
setVisibility
(
View
.
GONE
);
binding
.
rlSearchBar
.
setVisibility
(
View
.
GONE
);
binding
.
nsvGoods
.
setVisibility
(
View
.
GONE
);
binding
.
nsvShops
.
setVisibility
(
View
.
VISIBLE
);
}
}
binding
.
rlSearchTab
.
setVisibility
(
View
.
VISIBLE
);
binding
.
rlSearchTab
.
setVisibility
(
View
.
VISIBLE
);
}
}
...
...
consumer/src/main/res/layout/activity_search.xml
View file @
c74d58a5
...
@@ -168,6 +168,7 @@
...
@@ -168,6 +168,7 @@
</com.google.android.material.tabs.TabLayout>
</com.google.android.material.tabs.TabLayout>
</RelativeLayout>
</RelativeLayout>
<androidx.core.widget.NestedScrollView
<androidx.core.widget.NestedScrollView
android:id=
"@+id/nsv_goods"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@id/rl_search_bar"
>
android:layout_below=
"@id/rl_search_bar"
>
...
@@ -190,6 +191,7 @@
...
@@ -190,6 +191,7 @@
android:layout_marginTop=
"14dp"
android:layout_marginTop=
"14dp"
android:layout_marginBottom=
"14dp"
android:layout_marginBottom=
"14dp"
android:gravity=
"center"
android:gravity=
"center"
android:visibility=
"gone"
android:text=
"~ 没有更多啦 ~"
android:text=
"~ 没有更多啦 ~"
android:textSize=
"13sp"
android:textSize=
"13sp"
android:textColor=
"#FF999999"
/>
android:textColor=
"#FF999999"
/>
...
@@ -197,6 +199,7 @@
...
@@ -197,6 +199,7 @@
</androidx.core.widget.NestedScrollView>
</androidx.core.widget.NestedScrollView>
<androidx.core.widget.NestedScrollView
<androidx.core.widget.NestedScrollView
android:id=
"@+id/nsv_shops"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@id/rl_search_bar"
>
android:layout_below=
"@id/rl_search_bar"
>
...
@@ -221,6 +224,7 @@
...
@@ -221,6 +224,7 @@
android:layout_marginTop=
"14dp"
android:layout_marginTop=
"14dp"
android:layout_marginBottom=
"14dp"
android:layout_marginBottom=
"14dp"
android:gravity=
"center"
android:gravity=
"center"
android:visibility=
"gone"
android:text=
"~ 没有更多啦 ~"
android:text=
"~ 没有更多啦 ~"
android:textSize=
"13sp"
android:textSize=
"13sp"
android:textColor=
"#FF999999"
/>
android:textColor=
"#FF999999"
/>
...
...
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