Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
machine
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hooloo
android
machine
Commits
5082450e
Commit
5082450e
authored
Jun 23, 2022
by
wjg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化字体
parent
fd5787c0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
7 deletions
+19
-7
app/src/main/java/com/ihaoin/hooloo/device/HLApplication.java
+15
-1
app/src/main/java/com/ihaoin/hooloo/device/adapter/GoodsAdapter.java
+0
-3
app/src/main/java/com/ihaoin/hooloo/device/network/HttpUtil.java
+0
-1
app/src/main/java/com/ihaoin/hooloo/device/view/LauncherActivity.java
+2
-2
app/src/main/res/layout/item_spec_rule.xml
+2
-0
No files found.
app/src/main/java/com/ihaoin/hooloo/device/HLApplication.java
View file @
5082450e
...
@@ -7,7 +7,9 @@ import android.util.Log;
...
@@ -7,7 +7,9 @@ import android.util.Log;
import
com.ihaoin.hooloo.device.config.AppConfig
;
import
com.ihaoin.hooloo.device.config.AppConfig
;
import
com.ihaoin.hooloo.device.data.MainData
;
import
com.ihaoin.hooloo.device.data.MainData
;
import
com.ihaoin.hooloo.device.data.TrolleyGoods
;
import
com.ihaoin.hooloo.device.data.TrolleyGoods
;
import
com.ihaoin.hooloo.device.data.vo.Category
;
import
com.ihaoin.hooloo.device.network.HttpUtil
;
import
com.ihaoin.hooloo.device.network.HttpUtil
;
import
com.ihaoin.hooloo.device.util.CollectionUtils
;
import
com.ihaoin.hooloo.device.util.SharedPreferencesUtils
;
import
com.ihaoin.hooloo.device.util.SharedPreferencesUtils
;
import
com.ihaoin.hooloo.device.util.StringUtils
;
import
com.ihaoin.hooloo.device.util.StringUtils
;
import
com.umeng.commonsdk.UMConfigure
;
import
com.umeng.commonsdk.UMConfigure
;
...
@@ -29,7 +31,19 @@ public class HLApplication extends Application {
...
@@ -29,7 +31,19 @@ public class HLApplication extends Application {
}
}
public
static
void
setMainData
(
MainData
data
)
{
public
static
void
setMainData
(
MainData
data
)
{
mainData
=
data
;
mainData
=
clearEmptyCategory
(
data
);
}
private
static
MainData
clearEmptyCategory
(
MainData
data
)
{
if
(
data
!=
null
&&
!
CollectionUtils
.
isEmpty
(
data
.
getCategorys
()))
{
for
(
int
i
=
data
.
getCategorys
().
size
()
-
1
;
i
>=
0
;
i
--)
{
Category
category
=
data
.
getCategorys
().
get
(
i
);
if
(
CollectionUtils
.
isEmpty
(
category
.
getGoods
()))
{
data
.
getCategorys
().
remove
(
i
);
}
}
}
return
data
;
}
}
public
static
List
<
TrolleyGoods
>
getTrolleyGoods
()
{
public
static
List
<
TrolleyGoods
>
getTrolleyGoods
()
{
...
...
app/src/main/java/com/ihaoin/hooloo/device/adapter/GoodsAdapter.java
View file @
5082450e
...
@@ -54,9 +54,6 @@ public class GoodsAdapter extends BaseSectionQuickAdapter<ScrollBean, BaseViewHo
...
@@ -54,9 +54,6 @@ public class GoodsAdapter extends BaseSectionQuickAdapter<ScrollBean, BaseViewHo
LinearLayout
layoutTag
=
helper
.
getView
(
R
.
id
.
layout_tags
);
LinearLayout
layoutTag
=
helper
.
getView
(
R
.
id
.
layout_tags
);
layoutTag
.
removeAllViews
();
layoutTag
.
removeAllViews
();
// // TODO delete
// goods.setTags(Arrays.asList("一二", "一二三四", "一二三四五六七"));
if
(
CollectionUtils
.
isEmpty
(
goods
.
getTags
()))
{
if
(
CollectionUtils
.
isEmpty
(
goods
.
getTags
()))
{
helper
.
setVisible
(
R
.
id
.
layout_tags
,
false
);
helper
.
setVisible
(
R
.
id
.
layout_tags
,
false
);
View
tagView
=
LayoutInflater
.
from
(
mContext
).
inflate
(
R
.
layout
.
item_tag
,
null
);
View
tagView
=
LayoutInflater
.
from
(
mContext
).
inflate
(
R
.
layout
.
item_tag
,
null
);
...
...
app/src/main/java/com/ihaoin/hooloo/device/network/HttpUtil.java
View file @
5082450e
...
@@ -130,7 +130,6 @@ public class HttpUtil {
...
@@ -130,7 +130,6 @@ public class HttpUtil {
public
static
String
getMacAddress
()
{
public
static
String
getMacAddress
()
{
try
{
try
{
if
(
AppConfig
.
DEBUG
)
{
// TODO delete
if
(
AppConfig
.
DEBUG
)
{
// TODO delete
return
"SN0091290001"
;
return
"SN0091290001"
;
}
}
...
...
app/src/main/java/com/ihaoin/hooloo/device/view/LauncherActivity.java
View file @
5082450e
...
@@ -295,8 +295,8 @@ public class LauncherActivity extends Activity {
...
@@ -295,8 +295,8 @@ public class LauncherActivity extends Activity {
view
.
setOnClickListener
(
v
->
{
view
.
setOnClickListener
(
v
->
{
Integer
checkedId
=
v
.
getId
();
Integer
checkedId
=
v
.
getId
();
Category
category1
=
(
Category
)
groupCategory
.
findViewById
(
checkedId
).
getTag
();
Category
tagCategory
=
(
Category
)
groupCategory
.
findViewById
(
checkedId
).
getTag
();
int
position
=
categorys
.
indexOf
(
category1
);
int
position
=
categorys
.
indexOf
(
tagCategory
);
goodsLayoutManager
.
scrollToPositionWithOffset
(
tPosition
.
get
(
position
),
0
);
goodsLayoutManager
.
scrollToPositionWithOffset
(
tPosition
.
get
(
position
),
0
);
});
});
}
}
...
...
app/src/main/res/layout/item_spec_rule.xml
View file @
5082450e
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
android:text=
"推荐"
android:text=
"推荐"
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textSize=
"@dimen/ts_detail_spec_rec"
android:textSize=
"@dimen/ts_detail_spec_rec"
android:visibility=
"gone"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
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