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
cb3908f0
Commit
cb3908f0
authored
Sep 03, 2022
by
wjg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add update
parent
0ef0f1f0
Show whitespace changes
Inline
Side-by-side
Showing
45 changed files
with
460 additions
and
291 deletions
+460
-291
app/build.gradle
+6
-3
app/src/main/AndroidManifest.xml
+10
-4
app/src/main/java/com/ihaoin/hooloo/device/HLApplication.java
+1
-22
app/src/main/java/com/ihaoin/hooloo/device/base/AppConfig.java
+1
-1
app/src/main/java/com/ihaoin/hooloo/device/base/Base.java
+1
-1
app/src/main/java/com/ihaoin/hooloo/device/base/MachineInfoSocket.java
+12
-2
app/src/main/java/com/ihaoin/hooloo/device/data/enums/PresentState.java
+1
-1
app/src/main/java/com/ihaoin/hooloo/device/home/adapter/GoodsAdapter.java
+1
-4
app/src/main/java/com/ihaoin/hooloo/device/home/dialog/GoodsDetailDialog.java
+2
-2
app/src/main/java/com/ihaoin/hooloo/device/home/view/LauncherActivity.java
+133
-52
app/src/main/java/com/ihaoin/hooloo/device/interaction/InteractionSocket.java
+58
-31
app/src/main/java/com/ihaoin/hooloo/device/interaction/view/InteractionPresentation.java
+1
-1
app/src/main/java/com/ihaoin/hooloo/device/kds/KDSSocket.java
+25
-15
app/src/main/java/com/ihaoin/hooloo/device/kds/adapter/MachineStateAdapter.java
+5
-5
app/src/main/java/com/ihaoin/hooloo/device/kds/view/KdsPresentation.java
+9
-10
app/src/main/java/com/ihaoin/hooloo/device/setting/view/SettingsActivity.java
+1
-1
app/src/main/java/com/ihaoin/hooloo/device/update/UpdateService.java
+1
-1
app/src/main/java/com/ihaoin/hooloo/device/update/UpdateSocket.java
+22
-18
app/src/main/res/drawable/ic_label_checked.xml
+21
-20
app/src/main/res/drawable/ic_label_checked_bak.xml
+32
-0
app/src/main/res/drawable/ic_label_shadow.xml
+24
-0
app/src/main/res/layout/activity_launcher.xml
+13
-6
app/src/main/res/layout/activity_settings.xml
+8
-8
app/src/main/res/layout/dialog_clear.xml
+2
-2
app/src/main/res/layout/dialog_confirm_order.xml
+5
-2
app/src/main/res/layout/dialog_goods_detail.xml
+4
-4
app/src/main/res/layout/item_category.xml
+1
-1
app/src/main/res/layout/item_goods.xml
+1
-1
app/src/main/res/layout/item_recommend.xml
+1
-1
app/src/main/res/layout/item_spec_rule.xml
+1
-1
app/src/main/res/layout/item_tips.xml
+1
-1
app/src/main/res/layout/item_trolley.xml
+4
-3
app/src/main/res/layout/kds_line_0.xml
+0
-0
app/src/main/res/layout/kds_line_1.xml
+0
-0
app/src/main/res/layout/kds_line_2.xml
+0
-0
app/src/main/res/layout/kds_line_3.xml
+0
-0
app/src/main/res/layout/kds_line_4.xml
+0
-0
app/src/main/res/layout/present_interaction.xml
+1
-1
app/src/main/res/layout/present_kds.xml
+0
-0
app/src/main/res/layout/view_header.xml
+1
-1
app/src/main/res/layout/view_trolley.xml
+3
-3
app/src/main/res/values-w800dp/dimens.xml
+15
-31
app/src/main/res/values/dimens.xml
+28
-28
build.gradle
+4
-0
todo.md
+0
-3
No files found.
app/build.gradle
View file @
cb3908f0
...
...
@@ -10,8 +10,8 @@ android {
applicationId
"com.ihaoin.hooloo.device"
minSdkVersion
26
targetSdkVersion
30
versionCode
1
versionName
"1.0"
versionCode
1
0
versionName
"1.0
.10
"
ndk
{
//选择要添加的对应 cpu 类型的 .so 库。
...
...
@@ -51,7 +51,8 @@ dependencies {
implementation
'com.kyleduo.switchbutton:library:2.0.0'
implementation
'androidx.recyclerview:recyclerview:1.2.1'
implementation
"androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation
'com.github.bumptech.glide:glide:4.9.0'
// implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation
'com.github.bumptech.glide:glide:4.13.2'
implementation
'com.squareup.okhttp3:okhttp:3.5.0'
implementation
'androidx.constraintlayout:constraintlayout:1.1.3'
...
...
@@ -74,4 +75,5 @@ dependencies {
implementation
'com.umeng.umsdk:apm:1.6.2'
// U-APM产品包依赖(必选)
implementation
'io.socket:socket.io-client:1.0.0'
implementation
'com.blankj:utilcode:1.28.6'
// debugImplementation 'com.github.getActivity:Logcat:10.6'
}
\ No newline at end of file
app/src/main/AndroidManifest.xml
View file @
cb3908f0
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
package=
"com.ihaoin.hooloo.device"
android:versionCode=
"2"
android:versionName=
"1.0.2"
>
package=
"com.ihaoin.hooloo.device"
>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.READ_PHONE_STATE"
/>
...
...
@@ -27,12 +25,20 @@
android:extractNativeLibs=
"true"
android:icon=
"@mipmap/hooloo_launcher"
android:label=
"@string/app_name"
android:hardwareAccelerated=
"true"
android:requestLegacyExternalStorage=
"true"
android:sharedUserId=
"android.uid.system"
android:theme=
"@style/AppTheme"
android:usesCleartextTraffic=
"true"
tools:replace=
"android:allowBackup,android:icon"
>
<!-- 悬浮窗入口 -->
<meta-data
android:name=
"LogcatWindowEntrance"
android:value=
"true"
/>
<!-- 通知栏入口 -->
<meta-data
android:name=
"LogcatNotifyEntrance"
android:value=
"true"
/>
<activity
android:name=
".home.view.LauncherActivity"
android:exported=
"true"
...
...
app/src/main/java/com/ihaoin/hooloo/device/HLApplication.java
View file @
cb3908f0
...
...
@@ -4,7 +4,6 @@ import android.app.Application;
import
android.graphics.Typeface
;
import
com.ihaoin.hooloo.device.base.AppConfig
;
import
com.ihaoin.hooloo.device.update.UpdateSocket
;
import
com.ihaoin.hooloo.device.data.MainData
;
import
com.ihaoin.hooloo.device.data.TrolleyGoods
;
import
com.ihaoin.hooloo.device.data.enums.PresentState
;
...
...
@@ -24,7 +23,6 @@ import cn.jpush.android.api.JPushInterface;
public
class
HLApplication
extends
Application
{
public
static
HLApplication
SELF
=
null
;
public
static
String
RECOGNIZE_PERSON
=
""
;
private
UpdateSocket
updateSocket
=
null
;
@Override
public
void
onCreate
()
{
...
...
@@ -41,8 +39,6 @@ public class HLApplication extends Application {
AppConfig
.
REGISTRATION_ID
=
JPushInterface
.
getRegistrationID
(
this
);
HttpUtil
.
postRegistrationId
();
startUpdateSocket
();
}
@Override
...
...
@@ -50,19 +46,6 @@ public class HLApplication extends Application {
super
.
onTerminate
();
Utils
.
i
(
"Application onTerminate"
);
stopUpdateSocket
();
}
private
void
startUpdateSocket
()
{
updateSocket
=
new
UpdateSocket
(
this
);
updateSocket
.
start
();
}
private
void
stopUpdateSocket
()
{
if
(
updateSocket
!=
null
)
{
updateSocket
.
close
();
updateSocket
=
null
;
}
}
private
void
setDefaultTypeface
()
{
...
...
@@ -89,14 +72,10 @@ public class HLApplication extends Application {
// 第一个点单屏默认显示交互屏
if
(
AppConfig
.
DEFAULT_SCREEN_NO
.
equals
(
"1"
))
{
AppConfig
.
DEFAULT_PRESENT
=
PresentState
.
MENU
.
getName
();
AppConfig
.
DEFAULT_PRESENT
=
PresentState
.
KDS
.
getName
();
}
else
{
AppConfig
.
DEFAULT_PRESENT
=
PresentState
.
INTERACTION
.
getName
();
}
// if (AppConfig.DEBUG) { // TODO delete
// return "SN0091290001";
// }
}
private
static
MainData
mainData
=
new
MainData
();
...
...
app/src/main/java/com/ihaoin/hooloo/device/base/AppConfig.java
View file @
cb3908f0
...
...
@@ -7,7 +7,7 @@ public class AppConfig {
/** 点单屏编码, 1-菜单屏,2-交互屏 */
public
static
String
DEFAULT_SCREEN_NO
=
"1"
;
// TODO 编译点单屏编码
/** 副屏内容 */
public
static
String
DEFAULT_PRESENT
=
PresentState
.
MENU
.
getName
();
public
static
String
DEFAULT_PRESENT
=
PresentState
.
KDS
.
getName
();
public
static
String
HL
=
"HL"
;
public
static
String
TAG
=
HL
+
"_TEST"
;
...
...
app/src/main/java/com/ihaoin/hooloo/device/base/Base.java
View file @
cb3908f0
...
...
@@ -24,7 +24,7 @@ public class Base {
public
static
final
String
BROADCAST_ACTION_TROLLEY_SHOW
=
"ACTION_TROLLEY_SHOW"
;
public
static
final
String
BROADCAST_ACTION_TROLLEY_HIDE
=
"ACTION_TROLLEY_HIDE"
;
public
static
final
String
BROADCAST_ACTION_MACHINE_CODE_CHANGED
=
"ACTION_MACHINE_CODE_CHANGED"
;
public
static
final
String
BROADCAST_ACTION_PRESENT_CHANGED
=
"ACTION_
MENU
_STATE_CHANGED"
;
public
static
final
String
BROADCAST_ACTION_PRESENT_CHANGED
=
"ACTION_
PRESENT
_STATE_CHANGED"
;
public
static
final
String
BROADCAST_ACTION_LOGCAT_STATE_CHANGED
=
"ACTION_LOGCAT_STATE_CHANGED"
;
public
static
final
String
BROADCAST_ACTION_TOUCH_EVENT
=
"ACTION_TOUCH_EVENT"
;
public
static
final
String
BROADCAST_ACTION_TIMEOUT
=
"ACTION_TIMEOUT"
;
...
...
app/src/main/java/com/ihaoin/hooloo/device/base/MachineInfoSocket.java
View file @
cb3908f0
...
...
@@ -12,6 +12,7 @@ import com.ihaoin.hooloo.device.util.Utils;
import
io.socket.client.Ack
;
import
io.socket.client.IO
;
import
io.socket.client.Socket
;
import
io.socket.emitter.Emitter
;
/** Linux通信 获取机器编码 */
public
class
MachineInfoSocket
extends
Thread
{
...
...
@@ -31,18 +32,27 @@ public class MachineInfoSocket extends Thread {
try
{
mSocket
=
IO
.
socket
(
Base
.
NSP_MACHINE
);
mSocket
.
connect
();
mSocket
.
on
(
"connect"
,
onConnect
);
mSocket
.
on
(
"disconnect"
,
onDisconnect
);
}
catch
(
Exception
e
)
{
Utils
.
i
(
"连接server失败,错误原因:"
+
e
.
getMessage
());
e
.
printStackTrace
();
}
}
Emitter
.
Listener
onConnect
=
args
->
Utils
.
i
(
"machine socket connected"
);
Emitter
.
Listener
onDisconnect
=
args
->
Utils
.
i
(
"machine socket disconnected"
);
public
void
close
()
{
try
{
Utils
.
i
(
"close machine socket"
);
if
(
mSocket
!=
null
)
{
mSocket
.
disconnect
();
mSocket
.
close
();
mSocket
=
null
;
mSocket
.
off
(
"connect"
,
onConnect
);
mSocket
.
off
(
"disconnect"
,
onDisconnect
);
// mSocket.close();
// mSocket = null;
}
}
catch
(
Exception
e
)
{
Utils
.
i
(
"close失败,错误原因:"
+
e
.
getMessage
());
...
...
app/src/main/java/com/ihaoin/hooloo/device/data/enums/PresentState.java
View file @
cb3908f0
...
...
@@ -4,7 +4,7 @@ import com.ihaoin.hooloo.device.util.StringUtils;
public
enum
PresentState
{
NONE
(
"不显示"
),
MENU
(
"菜单屏"
),
KDS
(
"菜单屏"
),
INTERACTION
(
"交互屏"
);
private
String
name
;
...
...
app/src/main/java/com/ihaoin/hooloo/device/home/adapter/GoodsAdapter.java
View file @
cb3908f0
...
...
@@ -39,7 +39,7 @@ public class GoodsAdapter extends BaseSectionQuickAdapter<ScrollBean, BaseViewHo
protected
void
convert
(
BaseViewHolder
helper
,
ScrollBean
item
)
{
ScrollBean
.
ScrollItemBean
t
=
item
.
t
;
ViewGroup
layoutItem
=
helper
.
getView
(
R
.
id
.
layout_item
);
layoutItem
.
setForeground
(
null
);
//
layoutItem.setForeground(null);
Goods
goods
=
(
Goods
)
t
.
getObject
();
helper
.
setText
(
R
.
id
.
txt_name
,
goods
.
getName
());
...
...
@@ -67,12 +67,9 @@ public class GoodsAdapter extends BaseSectionQuickAdapter<ScrollBean, BaseViewHo
}
ImageView
imgThumbnail
=
helper
.
getView
(
R
.
id
.
img_thumbnail
);
// RoundedCorners roundedCorners = new RoundedCorners(5);
// RequestOptions options = RequestOptions.bitmapTransform(roundedCorners);
if
(
goods
.
getPics
()
==
null
)
{
imgThumbnail
.
setImageDrawable
(
null
);
}
else
{
// Utils.getGlide(mContext).load(Utils.getThumbnailUrl(goods.getPics().getThumbnail())).apply(options).into(imgThumbnail);
Utils
.
getGlide
(
mContext
).
load
(
Utils
.
getThumbnailUrl
(
goods
.
getPics
().
getThumbnail
())).
into
(
imgThumbnail
);
}
...
...
app/src/main/java/com/ihaoin/hooloo/device/home/dialog/GoodsDetailDialog.java
View file @
cb3908f0
...
...
@@ -193,8 +193,8 @@ public class GoodsDetailDialog extends Dialog {
txtName
.
setText
(
mGoods
.
getName
());
butnSubtract
.
setOnClickListener
(
v
->
subtractCount
());
butnAdd
.
setOnClickListener
(
v
->
addCount
());
butnSubtract
.
setForeground
(
null
);
butnAdd
.
setForeground
(
null
);
//
butnSubtract.setForeground(null);
//
butnAdd.setForeground(null);
icoPrice
.
setPaintFlags
(
icoPrice
.
getPaintFlags
()
|
Paint
.
STRIKE_THRU_TEXT_FLAG
);
txtPrice
.
setPaintFlags
(
txtPrice
.
getPaintFlags
()
|
Paint
.
STRIKE_THRU_TEXT_FLAG
);
...
...
app/src/main/java/com/ihaoin/hooloo/device/home/view/LauncherActivity.java
View file @
cb3908f0
...
...
@@ -17,10 +17,14 @@ import android.os.Message;
import
android.view.Display
;
import
android.view.MotionEvent
;
import
android.view.View
;
import
android.view.ViewTreeObserver
;
import
android.view.WindowManager
;
import
android.view.animation.LinearInterpolator
;
import
android.widget.OverScroller
;
import
android.widget.RadioButton
;
import
android.widget.RadioGroup
;
import
android.widget.RelativeLayout
;
import
android.widget.ScrollView
;
import
android.widget.TextView
;
import
androidx.annotation.NonNull
;
...
...
@@ -33,14 +37,9 @@ import com.bumptech.glide.request.target.CustomTarget;
import
com.bumptech.glide.request.transition.Transition
;
import
com.ihaoin.hooloo.device.HLApplication
;
import
com.ihaoin.hooloo.device.R
;
import
com.ihaoin.hooloo.device.base.MachineInfoSocket
;
import
com.ihaoin.hooloo.device.home.adapter.GoodsAdapter
;
import
com.ihaoin.hooloo.device.home.adapter.RecommendAdapter
;
import
com.ihaoin.hooloo.device.network.NetworkHandler
;
import
com.ihaoin.hooloo.device.setting.SettingsQueue
;
import
com.ihaoin.hooloo.device.update.UpdateService
;
import
com.ihaoin.hooloo.device.base.AppConfig
;
import
com.ihaoin.hooloo.device.base.Base
;
import
com.ihaoin.hooloo.device.base.MachineInfoSocket
;
import
com.ihaoin.hooloo.device.data.MainData
;
import
com.ihaoin.hooloo.device.data.ScrollBean
;
import
com.ihaoin.hooloo.device.data.enums.PresentState
;
...
...
@@ -50,16 +49,22 @@ import com.ihaoin.hooloo.device.data.vo.Goods;
import
com.ihaoin.hooloo.device.data.vo.Recommend
;
import
com.ihaoin.hooloo.device.data.vo.Sku
;
import
com.ihaoin.hooloo.device.data.vo.SkuStateChangedVo
;
import
com.ihaoin.hooloo.device.home.adapter.GoodsAdapter
;
import
com.ihaoin.hooloo.device.home.adapter.RecommendAdapter
;
import
com.ihaoin.hooloo.device.interaction.view.InteractionPresentation
;
import
com.ihaoin.hooloo.device.kds.view.KdsPresentation
;
import
com.ihaoin.hooloo.device.network.HttpUtil
;
import
com.ihaoin.hooloo.device.network.NetworkHandler
;
import
com.ihaoin.hooloo.device.setting.SettingsQueue
;
import
com.ihaoin.hooloo.device.trolley.view.TrolleyView
;
import
com.ihaoin.hooloo.device.update.UpdateSocket
;
import
com.ihaoin.hooloo.device.util.CollectionUtils
;
import
com.ihaoin.hooloo.device.util.JsonUtils
;
import
com.ihaoin.hooloo.device.util.SharedPreferencesUtils
;
import
com.ihaoin.hooloo.device.util.StringUtils
;
import
com.ihaoin.hooloo.device.util.Utils
;
import
com.ihaoin.hooloo.device.interaction.view.InteractionPresentation
;
import
com.ihaoin.hooloo.device.kds.view.MenuPresentation
;
import
com.ihaoin.hooloo.device.trolley.view.TrolleyView
;
import
java.lang.reflect.Field
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -68,6 +73,7 @@ public class LauncherActivity extends Activity {
private
GoodsChangeReceiver
goodsChangeReceiver
;
private
TouchReceiver
touchReceiver
;
private
ScrollView
scrollCategory
;
private
RadioGroup
groupCategory
;
private
RecyclerView
recGoods
;
private
RecyclerView
recRecommends
;
...
...
@@ -87,8 +93,8 @@ public class LauncherActivity extends Activity {
//记录商品当前可见的第一个item的position
private
int
first
=
0
;
private
TrolleyView
trolleyView
;
private
MenuPresentation
menu
View
;
private
InteractionPresentation
present
View
;
private
KdsPresentation
kds
View
;
private
InteractionPresentation
interaction
View
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
...
...
@@ -116,16 +122,17 @@ public class LauncherActivity extends Activity {
initSettingsQueue
();
// startUpdateSocket();
startMachineClient
();
startTimeoutThread
();
getMachineCode
();
new
UpdateService
().
start
();
// new UpdateService().start();
}
private
void
initViews
()
{
txtCategory
=
findViewById
(
R
.
id
.
txt_category
);
trolleyView
=
findViewById
(
R
.
id
.
view_trolley
);
scrollCategory
=
findViewById
(
R
.
id
.
scroll_category
);
groupCategory
=
findViewById
(
R
.
id
.
group_category
);
recGoods
=
findViewById
(
R
.
id
.
rec_right
);
recRecommends
=
findViewById
(
R
.
id
.
rec_recommend
);
...
...
@@ -139,7 +146,7 @@ public class LauncherActivity extends Activity {
@Override
public
boolean
dispatchTouchEvent
(
MotionEvent
ev
)
{
Utils
.
i
(
"dispatchTouchEvent"
);
//
Utils.i("dispatchTouchEvent");
TIMESTAMP
=
Utils
.
getTimestamp
();
return
super
.
dispatchTouchEvent
(
ev
);
}
...
...
@@ -274,6 +281,7 @@ public class LauncherActivity extends Activity {
break
;
}
groupCategory
.
check
(
category
.
getId
());
smoothTo
(
groupCategory
.
findViewById
(
groupCategory
.
getCheckedRadioButtonId
()));
}
}
...
...
@@ -283,6 +291,15 @@ public class LauncherActivity extends Activity {
}
}
});
try
{
Field
field
=
ScrollView
.
class
.
getDeclaredField
(
"mScroller"
);
field
.
setAccessible
(
true
);
OverScroller
scroller
=
new
OverScroller
(
this
,
new
LinearInterpolator
());
scroller
.
setFriction
(
50
);
field
.
set
(
scrollCategory
,
scroller
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
/** 判断RecyclerView是否滚动到最下面 */
...
...
@@ -315,10 +332,13 @@ public class LauncherActivity extends Activity {
butnRadio
.
setText
(
category
.
getName
());
butnRadio
.
setId
(
category
.
getId
());
butnRadio
.
setTag
(
category
);
if
(
StringUtils
.
isEmpty
(
category
.
getIcon
()))
{
if
(
i
==
0
)
{
butnRadio
.
setChecked
(
true
);
butnRadio
.
getPaint
().
setFakeBoldText
(
true
);
addLayoutListener
(
butnRadio
);
}
}
else
{
int
finalIndex
=
i
;
Utils
.
getGlide
(
LauncherActivity
.
this
).
load
(
category
.
getIcon
()).
into
(
new
CustomTarget
<
Drawable
>()
{
@Override
public
void
onResourceReady
(
@NonNull
Drawable
drawable
,
@Nullable
Transition
<?
super
Drawable
>
transition
)
{
...
...
@@ -330,16 +350,19 @@ public class LauncherActivity extends Activity {
Integer
right
=
left
;
Integer
bottom
=
Utils
.
getDimens
(
LauncherActivity
.
this
,
R
.
dimen
.
category_padding_bottom
);
butnRadio
.
setPadding
(
left
,
top
,
right
,
bottom
);
if
(
finalIndex
==
0
)
{
addLayoutListener
(
butnRadio
);
}
}
@Override
public
void
onLoadCleared
(
@Nullable
Drawable
placeholder
)
{
}
});
}
groupCategory
.
addView
(
butnRadio
,
layoutParams
);
butnRadio
.
setForeground
(
null
);
//
butnRadio.setForeground(null);
butnRadio
.
setOnClickListener
(
v
->
{
Integer
checkedId
=
v
.
getId
();
Category
tagCategory
=
(
Category
)
groupCategory
.
findViewById
(
checkedId
).
getTag
();
...
...
@@ -350,20 +373,61 @@ public class LauncherActivity extends Activity {
}
groupCategory
.
setOnCheckedChangeListener
((
group
,
checkedId
)
->
{
for
(
int
i
=
0
;
i
<
groupCategory
.
getChildCount
();
i
++)
{
View
child
=
groupCategory
.
getChildAt
(
i
);
if
(!(
child
instanceof
RadioButton
))
{
continue
;
}
RadioButton
butn
=
(
RadioButton
)
child
;
if
(
butn
.
getId
()
==
checkedId
)
{
butn
.
getPaint
().
setFakeBoldText
(
true
);
RadioButton
butnRadio
=
(
RadioButton
)
groupCategory
.
getChildAt
(
i
);
if
(
butnRadio
.
getId
()
==
checkedId
)
{
setShadowView
(
butnRadio
);
butnRadio
.
getPaint
().
setFakeBoldText
(
true
);
}
else
{
butn
.
getPaint
().
setFakeBoldText
(
false
);
butn
Radio
.
getPaint
().
setFakeBoldText
(
false
);
}
}
});
}
private
void
smoothTo
(
RadioButton
butnRadio
)
{
scrollCategory
.
smoothScrollTo
(
0
,
getSmoothHeight
(
butnRadio
));
}
private
void
addLayoutListener
(
RadioButton
butnRadio
)
{
butnRadio
.
getViewTreeObserver
().
addOnGlobalLayoutListener
(
new
ViewTreeObserver
.
OnGlobalLayoutListener
()
{
@Override
public
void
onGlobalLayout
()
{
butnRadio
.
getViewTreeObserver
().
removeOnGlobalLayoutListener
(
this
);
butnRadio
.
performClick
();
}
});
}
private
void
setShadowView
(
View
butnRadio
)
{
View
shadow
=
findViewById
(
R
.
id
.
shadow
);
RelativeLayout
.
LayoutParams
lp
=
(
RelativeLayout
.
LayoutParams
)
shadow
.
getLayoutParams
();
lp
.
topMargin
=
getShadowHeight
(
butnRadio
);
shadow
.
setLayoutParams
(
lp
);
}
private
int
getShadowHeight
(
View
butnRadio
)
{
return
getHeight
(
butnRadio
,
true
);
}
private
int
getSmoothHeight
(
View
butnRadio
)
{
return
getHeight
(
butnRadio
,
false
);
}
private
int
getHeight
(
View
butnRadio
,
boolean
self
)
{
int
height
=
Utils
.
getDimens
(
this
,
R
.
dimen
.
category_margin
);
for
(
int
i
=
0
;
i
<
groupCategory
.
getChildCount
();
i
++)
{
View
v
=
groupCategory
.
getChildAt
(
i
);
if
(!
self
&&
v
.
getId
()
==
butnRadio
.
getId
())
{
return
height
;
}
height
+=
v
.
getHeight
();
if
(
v
.
getId
()
==
butnRadio
.
getId
())
{
return
height
;
}
}
return
height
;
}
private
void
setGoodsData
()
{
List
<
Category
>
categorys
=
HLApplication
.
getMainData
().
getCategorys
();
if
(
CollectionUtils
.
isEmpty
(
categorys
))
{
...
...
@@ -440,8 +504,8 @@ public class LauncherActivity extends Activity {
setRecommendsData
();
initCategorys
();
setGoodsData
();
if
(
menu
View
!=
null
)
{
menu
View
.
mainDataChanged
();
if
(
kds
View
!=
null
)
{
kds
View
.
mainDataChanged
();
}
}
...
...
@@ -460,6 +524,7 @@ public class LauncherActivity extends Activity {
this
.
unregistTouchReceiver
();
this
.
unregistHdmiReceiver
();
stopMachineClient
();
stopUpdateSocket
();
System
.
exit
(
0
);
}
...
...
@@ -551,6 +616,7 @@ public class LauncherActivity extends Activity {
}
else
if
(
intent
.
getAction
().
equals
(
Base
.
BROADCAST_ACTION_PRESENT_CHANGED
))
{
preparePresentView
();
}
else
if
(
intent
.
getAction
().
equals
(
Base
.
BROADCAST_ACTION_LOGCAT_STATE_CHANGED
))
{
if
(
AppConfig
.
DEBUG
)
{
if
(
SharedPreferencesUtils
.
getShowLogcat
(
LauncherActivity
.
this
))
{
Utils
.
showToast
(
LauncherActivity
.
this
,
"展示Logcat"
);
}
else
{
...
...
@@ -559,20 +625,20 @@ public class LauncherActivity extends Activity {
}
}
}
}
/** 显示副屏内容 */
private
boolean
preparePresentView
()
{
PresentState
present
=
PresentState
.
get
(
SharedPreferencesUtils
.
getPresentation
(
LauncherActivity
.
this
));
switch
(
present
)
{
case
MENU
:
case
KDS
:
hideInteractionView
();
return
show
Menu
View
();
return
show
Kds
View
();
case
INTERACTION:
hide
Menu
View
();
hide
Kds
View
();
return
showInteractionView
();
default
:
hideMenuView
();
hideInteractionView
();
hidePresentView
();
return
false
;
}
// return true;
...
...
@@ -581,7 +647,7 @@ public class LauncherActivity extends Activity {
/** 隐藏副屏内容 */
private
void
hidePresentView
()
{
hideInteractionView
();
hide
Menu
View
();
hide
Kds
View
();
}
/** 显示交互屏 */
...
...
@@ -589,17 +655,17 @@ public class LauncherActivity extends Activity {
if
(
AppConfig
.
DEBUG
)
{
Utils
.
showToast
(
this
,
"展示交互屏"
);
}
if
(
present
View
!=
null
)
{
if
(
interaction
View
!=
null
)
{
return
true
;
}
DisplayManager
displayManager
=
(
DisplayManager
)
getSystemService
(
Context
.
DISPLAY_SERVICE
);
Display
[]
displays
=
displayManager
.
getDisplays
();
if
(
CollectionUtils
.
isEmpty
(
displays
)
||
displays
.
length
<
2
)
{
Utils
.
showToast
(
this
,
"未获取到
菜单屏硬件
"
);
Utils
.
showToast
(
this
,
"未获取到
扩展屏幕
"
);
return
false
;
}
present
View
=
new
InteractionPresentation
(
this
,
displays
[
1
]);
present
View
.
show
();
interaction
View
=
new
InteractionPresentation
(
this
,
displays
[
1
]);
interaction
View
.
show
();
return
true
;
}
...
...
@@ -608,46 +674,47 @@ public class LauncherActivity extends Activity {
if
(
AppConfig
.
DEBUG
)
{
Utils
.
showToast
(
this
,
"隐藏交互屏"
);
}
if
(
present
View
==
null
)
{
if
(
interaction
View
==
null
)
{
return
;
}
present
View
.
dismiss
();
present
View
=
null
;
interaction
View
.
dismiss
();
interaction
View
=
null
;
}
/** 显示菜单屏KDS */
private
boolean
show
Menu
View
()
{
private
boolean
show
Kds
View
()
{
if
(
AppConfig
.
DEBUG
)
{
Utils
.
showToast
(
this
,
"展示菜单屏"
);
}
if
(
menu
View
!=
null
)
{
if
(
kds
View
!=
null
)
{
return
true
;
}
DisplayManager
displayManager
=
(
DisplayManager
)
getSystemService
(
Context
.
DISPLAY_SERVICE
);
Display
[]
displays
=
displayManager
.
getDisplays
();
if
(
CollectionUtils
.
isEmpty
(
displays
)
||
displays
.
length
<
2
)
{
Utils
.
showToast
(
this
,
"未获取到
菜单屏硬件
"
);
Utils
.
showToast
(
this
,
"未获取到
扩展屏幕
"
);
return
false
;
}
menuView
=
new
MenuPresentation
(
this
,
displays
[
1
]);
menuView
.
show
();
kdsView
=
new
KdsPresentation
(
this
,
displays
[
1
]);
kdsView
.
show
();
return
true
;
}
private
void
hide
Menu
View
()
{
private
void
hide
Kds
View
()
{
if
(
AppConfig
.
DEBUG
)
{
Utils
.
showToast
(
this
,
"隐藏菜单屏"
);
}
if
(
menu
View
==
null
)
{
if
(
kds
View
==
null
)
{
return
;
}
menu
View
.
dismiss
();
menu
View
=
null
;
kds
View
.
dismiss
();
kds
View
=
null
;
}
private
UpdateSocket
updateSocket
=
null
;
private
MachineInfoSocket
machineSocket
=
null
;
private
void
startMachineClient
()
{
machineSocket
=
new
MachineInfoSocket
(
this
);
machineSocket
.
start
();
...
...
@@ -660,6 +727,18 @@ public class LauncherActivity extends Activity {
}
}
private
void
startUpdateSocket
()
{
updateSocket
=
new
UpdateSocket
(
this
);
updateSocket
.
start
();
}
private
void
stopUpdateSocket
()
{
if
(
updateSocket
!=
null
)
{
updateSocket
.
close
();
updateSocket
=
null
;
}
}
private
void
requestPermissions
()
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
M
)
{
requestPermissions
(
new
String
[]{
Manifest
.
permission
.
READ_PHONE_STATE
,
Manifest
.
permission
.
READ_EXTERNAL_STORAGE
,
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
},
100
);
...
...
@@ -822,8 +901,10 @@ public class LauncherActivity extends Activity {
@Override
public
void
onReceive
(
Context
context
,
Intent
intent
)
{
boolean
state
=
intent
.
getBooleanExtra
(
"state"
,
false
);
if
(
AppConfig
.
DEBUG
)
{
Utils
.
showToast
(
LauncherActivity
.
this
,
"hdmi state: "
+
state
);
// TODO test
}
// TODO TEST
// if (state) {
// new Handler().postDelayed(() -> preparePresentView(), 1000 * 5);
// } else {
...
...
app/src/main/java/com/ihaoin/hooloo/device/interaction/InteractionSocket.java
View file @
cb3908f0
...
...
@@ -2,11 +2,17 @@ package com.ihaoin.hooloo.device.interaction;
import
android.content.Context
;
import
com.ihaoin.hooloo.device.base.Base
;
import
com.ihaoin.hooloo.device.data.vo.InteractionMsg
;
import
com.ihaoin.hooloo.device.util.CollectionUtils
;
import
com.ihaoin.hooloo.device.util.JsonUtils
;
import
com.ihaoin.hooloo.device.util.StringUtils
;
import
com.ihaoin.hooloo.device.util.Utils
;
import
io.socket.client.Ack
;
import
io.socket.client.IO
;
import
io.socket.client.Socket
;
import
test.IAGen
;
import
io.socket.emitter.Emitter
;
/** Linux通信 交互屏 */
public
class
InteractionSocket
extends
Thread
{
...
...
@@ -24,47 +30,68 @@ public class InteractionSocket extends Thread {
private
void
connectSocket
()
{
try
{
// TODO test
Utils
.
sendInteractionMsgBroadcast
(
mContext
,
IAGen
.
getMsg1
());
Thread
.
sleep
(
30
*
1000
);
Utils
.
sendInteractionMsgBroadcast
(
mContext
,
IAGen
.
getMsg3
());
Thread
.
sleep
(
30
*
1000
);
Utils
.
sendInteractionMsgBroadcast
(
mContext
,
IAGen
.
getMsg2
());
while
(
true
)
{
Thread
.
sleep
(
30
*
1000
);
}
// mSocket = IO.socket(Base.NSP_INTERACTION);
// mSocket.connect();
// mSocket.on("reply", args -> {
// if (CollectionUtils.isEmpty(args)) {
// Utils.i("reply args empty");
// return;
// }
// String content = args[0].toString();
// if (StringUtils.isEmpty(content)) {
// Utils.i("reply content empty");
// return;
// }
// InteractionMsg msg = JsonUtils.readValue(content, InteractionMsg.class);
// if (msg == null) {
// Utils.i("reply msg empty");
// return;
// TODO TEST
// Utils.sendInteractionMsgBroadcast(mContext, IAGen.getMsg1());
// Thread.sleep(30 * 1000);
// Utils.sendInteractionMsgBroadcast(mContext, IAGen.getMsg3());
// Thread.sleep(30 * 1000);
// Utils.sendInteractionMsgBroadcast(mContext, IAGen.getMsg2());
// while (true) {
// Thread.sleep(30 * 1000);
// }
// Utils.sendInteractionMsgBroadcast(mContext, msg);
// });
mSocket
=
IO
.
socket
(
Base
.
NSP_INTERACTION
);
mSocket
.
connect
();
mSocket
.
on
(
"connect"
,
onConnect
);
mSocket
.
on
(
"disconnect"
,
onDisconnect
);
mSocket
.
on
(
"reply"
,
onReply
);
}
catch
(
Exception
e
)
{
Utils
.
i
(
"连接server失败,错误原因:"
+
e
.
getMessage
());
e
.
printStackTrace
();
}
}
Emitter
.
Listener
onConnect
=
args
->
{
Utils
.
i
(
"interaction socket connected"
);
mSocket
.
emit
(
"notice"
,
"test"
,
(
Ack
)
ack
->
process
(
"notice"
,
ack
));
};
Emitter
.
Listener
onDisconnect
=
args
->
Utils
.
i
(
"interaction socket disconnected"
);
Emitter
.
Listener
onReply
=
args
->
{
Utils
.
i
(
"interaction socket reply"
);
process
(
"reply"
,
args
);
};
private
void
process
(
String
func
,
Object
[]
args
)
{
if
(
CollectionUtils
.
isEmpty
(
args
))
{
Utils
.
i
(
func
+
" args empty"
);
return
;
}
String
content
=
args
[
0
].
toString
();
if
(
StringUtils
.
isEmpty
(
content
))
{
Utils
.
i
(
func
+
" content empty"
);
return
;
}
InteractionMsg
msg
=
JsonUtils
.
readValue
(
content
,
InteractionMsg
.
class
);
if
(
msg
==
null
)
{
Utils
.
i
(
func
+
" msg empty"
);
return
;
}
Utils
.
i
(
func
+
" receive msg: "
+
content
);
Utils
.
sendInteractionMsgBroadcast
(
mContext
,
msg
);
}
public
void
close
()
{
try
{
Utils
.
i
(
"close interaction socket"
);
if
(
mSocket
!=
null
)
{
mSocket
.
disconnect
();
mSocket
.
close
();
mSocket
=
null
;
mSocket
.
off
(
"connect"
,
onConnect
);
mSocket
.
off
(
"disconnect"
,
onDisconnect
);
mSocket
.
off
(
"reply"
,
onReply
);
// mSocket.close();
// mSocket = null;
}
}
catch
(
Exception
e
)
{
Utils
.
i
(
"close失败,错误原因:"
+
e
.
getMessage
());
...
...
app/src/main/java/com/ihaoin/hooloo/device/interaction/view/InteractionPresentation.java
View file @
cb3908f0
...
...
@@ -92,7 +92,7 @@ public class InteractionPresentation extends Presentation {
while
(
true
)
{
InteractionMsg
msg
=
mMsgQueue
.
poll
();
if
(
msg
==
null
)
{
Utils
.
i
(
"msg is null"
);
//
Utils.i("msg is null");
continue
;
}
try
{
...
...
app/src/main/java/com/ihaoin/hooloo/device/kds/KDSSocket.java
View file @
cb3908f0
...
...
@@ -12,6 +12,7 @@ import com.ihaoin.hooloo.device.util.Utils;
import
io.socket.client.Ack
;
import
io.socket.client.IO
;
import
io.socket.client.Socket
;
import
io.socket.emitter.Emitter
;
/** Linux通信 KDS 菜单屏 */
public
class
KDSSocket
extends
Thread
{
...
...
@@ -31,14 +32,24 @@ public class KDSSocket extends Thread {
try
{
mSocket
=
IO
.
socket
(
Base
.
NSP_KDS
);
mSocket
.
connect
();
mSocket
.
emit
(
"notice"
,
"test"
,
(
Ack
)
args
->
{
if
(
CollectionUtils
.
isEmpty
(
args
))
{
Utils
.
i
(
"notice args empty"
);
return
;
mSocket
.
on
(
"connect"
,
onConnect
);
mSocket
.
on
(
"disconnect"
,
onDisconnect
);
mSocket
.
on
(
"reply"
,
onReply
);
}
catch
(
Exception
e
)
{
Utils
.
i
(
"连接server失败,错误原因:"
+
e
.
getMessage
());
e
.
printStackTrace
();
}
Utils
.
i
(
"notice: "
+
args
[
0
].
toString
());
});
mSocket
.
on
(
"reply"
,
args
->
{
}
Emitter
.
Listener
onConnect
=
args
->
{
Utils
.
i
(
"kds socket connected"
);
mSocket
.
emit
(
"notice"
,
"test"
,
(
Ack
)
ack
->
Utils
.
i
(
"notice: "
+
JsonUtils
.
toString
(
ack
)));
};
Emitter
.
Listener
onDisconnect
=
args
->
Utils
.
i
(
"kds socket disconnected"
);
Emitter
.
Listener
onReply
=
args
->
{
Utils
.
i
(
"kds socket reply"
);
if
(
CollectionUtils
.
isEmpty
(
args
))
{
Utils
.
i
(
"reply args empty"
);
return
;
...
...
@@ -54,19 +65,18 @@ public class KDSSocket extends Thread {
return
;
}
Utils
.
sendKdsMsgBroadcast
(
mContext
,
msg
);
});
}
catch
(
Exception
e
)
{
Utils
.
i
(
"连接server失败,错误原因:"
+
e
.
getMessage
());
e
.
printStackTrace
();
}
}
};
public
void
close
()
{
try
{
Utils
.
i
(
"close kds socket"
);
if
(
mSocket
!=
null
)
{
mSocket
.
disconnect
();
mSocket
.
close
();
mSocket
=
null
;
mSocket
.
off
(
"connect"
,
onConnect
);
mSocket
.
off
(
"disconnect"
,
onDisconnect
);
mSocket
.
off
(
"reply"
,
onReply
);
// mSocket.close();
// mSocket = null;
}
}
catch
(
Exception
e
)
{
Utils
.
i
(
"close失败,错误原因:"
+
e
.
getMessage
());
...
...
app/src/main/java/com/ihaoin/hooloo/device/kds/adapter/MachineStateAdapter.java
View file @
cb3908f0
...
...
@@ -33,15 +33,15 @@ public class MachineStateAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
public
RecyclerView
.
ViewHolder
onCreateViewHolder
(
@NonNull
ViewGroup
parent
,
int
viewType
)
{
switch
(
viewType
)
{
case
0
:
return
new
ViewHolder0
(
inflater
.
inflate
(
R
.
layout
.
menu
_line_0
,
parent
,
false
));
return
new
ViewHolder0
(
inflater
.
inflate
(
R
.
layout
.
kds
_line_0
,
parent
,
false
));
case
1
:
return
new
ViewHolder1
(
inflater
.
inflate
(
R
.
layout
.
menu
_line_1
,
parent
,
false
));
return
new
ViewHolder1
(
inflater
.
inflate
(
R
.
layout
.
kds
_line_1
,
parent
,
false
));
case
2
:
return
new
ViewHolder2
(
inflater
.
inflate
(
R
.
layout
.
menu
_line_2
,
parent
,
false
));
return
new
ViewHolder2
(
inflater
.
inflate
(
R
.
layout
.
kds
_line_2
,
parent
,
false
));
case
3
:
return
new
ViewHolder3
(
inflater
.
inflate
(
R
.
layout
.
menu
_line_3
,
parent
,
false
));
return
new
ViewHolder3
(
inflater
.
inflate
(
R
.
layout
.
kds
_line_3
,
parent
,
false
));
case
4
:
return
new
ViewHolder4
(
inflater
.
inflate
(
R
.
layout
.
menu
_line_4
,
parent
,
false
));
return
new
ViewHolder4
(
inflater
.
inflate
(
R
.
layout
.
kds
_line_4
,
parent
,
false
));
}
return
null
;
}
...
...
app/src/main/java/com/ihaoin/hooloo/device/kds/view/
Menu
Presentation.java
→
app/src/main/java/com/ihaoin/hooloo/device/kds/view/
Kds
Presentation.java
View file @
cb3908f0
...
...
@@ -32,7 +32,6 @@ import com.ihaoin.hooloo.device.base.Base;
import
com.ihaoin.hooloo.device.component.FixedSpeedScroller
;
import
com.ihaoin.hooloo.device.component.IntroViewPager
;
import
com.ihaoin.hooloo.device.data.MainData
;
import
com.ihaoin.hooloo.device.data.vo.Images
;
import
com.ihaoin.hooloo.device.data.vo.KDSMsg
;
import
com.ihaoin.hooloo.device.data.vo.KDSOrder
;
import
com.ihaoin.hooloo.device.kds.KDSSocket
;
...
...
@@ -43,10 +42,9 @@ import com.ihaoin.hooloo.device.util.Utils;
import
java.lang.reflect.Field
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
public
class
Menu
Presentation
extends
Presentation
{
public
class
Kds
Presentation
extends
Presentation
{
private
KDSMsg
mKdsMsg
;
...
...
@@ -61,14 +59,14 @@ public class MenuPresentation extends Presentation {
private
List
<
TextView
>
completedViews
=
new
ArrayList
<>();
private
KDSSocket
kdsSocket
=
null
;
public
Menu
Presentation
(
Context
outerContext
,
Display
display
)
{
public
Kds
Presentation
(
Context
outerContext
,
Display
display
)
{
super
(
outerContext
,
display
);
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
present_
menu
);
setContentView
(
R
.
layout
.
present_
kds
);
initViews
();
registerKDSMessageReceiver
();
...
...
@@ -142,10 +140,10 @@ public class MenuPresentation extends Presentation {
private
void
showImages
()
{
MainData
mainData
=
HLApplication
.
getMainData
();
// TODO TEST
List
<
String
>
imgs
=
Arrays
.
asList
(
"https://hooloo-saas-test.oss-cn-beijing.aliyuncs.com/hooloo/2022/07/04/%E7%82%B9%E5%8D%95%E5%B1%8F%E5%86%85%E5%AE%B9%E5%9B%BE3.png"
,
"https://hooloo-saas-test.oss-cn-beijing.aliyuncs.com/hooloo/2022/07/04/%E7%82%B9%E5%8D%95%E5%B1%8F%E5%86%85%E5%AE%B9%E5%9B%BE3.png"
,
"https://hooloo-saas-test.oss-cn-beijing.aliyuncs.com/hooloo/2022/07/04/%E7%82%B9%E5%8D%95%E5%B1%8F%E5%86%85%E5%AE%B9%E5%9B%BE3.png"
);
Images
img
=
new
Images
();
img
.
setLeft
(
imgs
);
mainData
.
setImages
(
img
);
//
List<String> imgs = Arrays.asList("https://hooloo-saas-test.oss-cn-beijing.aliyuncs.com/hooloo/2022/07/04/%E7%82%B9%E5%8D%95%E5%B1%8F%E5%86%85%E5%AE%B9%E5%9B%BE3.png", "https://hooloo-saas-test.oss-cn-beijing.aliyuncs.com/hooloo/2022/07/04/%E7%82%B9%E5%8D%95%E5%B1%8F%E5%86%85%E5%AE%B9%E5%9B%BE3.png", "https://hooloo-saas-test.oss-cn-beijing.aliyuncs.com/hooloo/2022/07/04/%E7%82%B9%E5%8D%95%E5%B1%8F%E5%86%85%E5%AE%B9%E5%9B%BE3.png");
//
Images img = new Images();
//
img.setLeft(imgs);
//
mainData.setImages(img);
if
(
mainData
==
null
||
mainData
.
getImages
()
==
null
)
{
return
;
}
...
...
@@ -164,6 +162,7 @@ public class MenuPresentation extends Presentation {
ViewGroup
.
LayoutParams
layoutParams
=
new
ViewGroup
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
image
.
setLayoutParams
(
layoutParams
);
image
.
setAdjustViewBounds
(
true
);
image
.
setScaleType
(
ImageView
.
ScaleType
.
CENTER_CROP
);
Utils
.
getGlide
(
getContext
()).
load
(
url
).
into
(
image
);
return
image
;
}
...
...
@@ -318,7 +317,7 @@ public class MenuPresentation extends Presentation {
}
OnDismissListener
dismissListener
=
dialog
->
{
Utils
.
i
(
"
menu
present dismiss"
);
Utils
.
i
(
"
kds
present dismiss"
);
unregistKDSMessageReceiver
();
if
(
imagePagerHandler
!=
null
)
{
...
...
app/src/main/java/com/ihaoin/hooloo/device/setting/view/SettingsActivity.java
View file @
cb3908f0
...
...
@@ -88,7 +88,7 @@ public class SettingsActivity extends Activity {
private
void
showEditPresentation
()
{
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
this
);
builder
.
setTitle
(
"修改副屏内容"
);
String
[]
items
=
new
String
[]{
PresentState
.
NONE
.
getName
(),
PresentState
.
MENU
.
getName
(),
PresentState
.
INTERACTION
.
getName
()};
String
[]
items
=
new
String
[]{
PresentState
.
NONE
.
getName
(),
PresentState
.
KDS
.
getName
(),
PresentState
.
INTERACTION
.
getName
()};
builder
.
setSingleChoiceItems
(
items
,
StringUtils
.
indexOf
(
items
,
SharedPreferencesUtils
.
getPresentation
(
SettingsActivity
.
this
)),
(
dialog
,
which
)
->
{
SharedPreferencesUtils
.
setPresentation
(
SettingsActivity
.
this
,
items
[
which
]);
txtPresentation
.
setText
(
SharedPreferencesUtils
.
getPresentation
(
SettingsActivity
.
this
));
...
...
app/src/main/java/com/ihaoin/hooloo/device/update/UpdateService.java
View file @
cb3908f0
...
...
@@ -80,7 +80,7 @@ public class UpdateService extends Thread {
PackageInfo
packageInfo
=
Utils
.
getPackageInfo
();
if
(
updateVo
.
getVersionCode
()
<=
packageInfo
.
versionCode
)
{
Utils
.
i
(
String
.
format
(
"do
n
t update, current: %s, update: %s"
,
packageInfo
.
versionCode
,
updateVo
.
getVersionCode
()));
Utils
.
i
(
String
.
format
(
"do
no
t update, current: %s, update: %s"
,
packageInfo
.
versionCode
,
updateVo
.
getVersionCode
()));
return
;
}
...
...
app/src/main/java/com/ihaoin/hooloo/device/update/UpdateSocket.java
View file @
cb3908f0
...
...
@@ -14,6 +14,7 @@ import java.io.IOException;
import
io.socket.client.Ack
;
import
io.socket.client.IO
;
import
io.socket.client.Socket
;
import
io.socket.emitter.Emitter
;
/** Linux通信 检查更新 */
public
class
UpdateSocket
extends
Thread
{
...
...
@@ -33,21 +34,37 @@ public class UpdateSocket extends Thread {
try
{
mSocket
=
IO
.
socket
(
Base
.
NSP_UPGRADE
);
mSocket
.
connect
();
mSocket
.
on
(
"
upgrade"
,
args
->
process
(
"upgrade"
,
args
)
);
checkUpdate
(
);
mSocket
.
on
(
"
connect"
,
onConnect
);
mSocket
.
on
(
"disconnect"
,
onDisconnect
);
mSocket
.
on
(
"upgrade"
,
onUpgrade
);
}
catch
(
Exception
e
)
{
Utils
.
i
(
"连接server失败,错误原因:"
+
e
.
getMessage
());
e
.
printStackTrace
();
}
}
Emitter
.
Listener
onConnect
=
args
->
{
Utils
.
i
(
"update socket connected"
);
mSocket
.
emit
(
"state"
,
""
,
(
Ack
)
ack
->
process
(
"state"
,
ack
));
};
Emitter
.
Listener
onDisconnect
=
args
->
Utils
.
i
(
"update socket disconnected"
);
Emitter
.
Listener
onUpgrade
=
args
->
{
Utils
.
i
(
"update socket upgrade"
);
process
(
"upgrade"
,
args
);
};
public
void
close
()
{
try
{
Utils
.
i
(
"close update socket"
);
if
(
mSocket
!=
null
)
{
mSocket
.
disconnect
();
mSocket
.
close
();
mSocket
=
null
;
mSocket
.
off
(
"connect"
,
onConnect
);
mSocket
.
off
(
"disconnect"
,
onDisconnect
);
mSocket
.
off
(
"upgrade"
,
onUpgrade
);
// mSocket.close();
// mSocket = null;
}
}
catch
(
Exception
e
)
{
Utils
.
i
(
"close失败,错误原因:"
+
e
.
getMessage
());
...
...
@@ -55,19 +72,6 @@ public class UpdateSocket extends Thread {
}
}
public
void
checkUpdate
()
{
if
(
mSocket
==
null
)
{
Utils
.
i
(
"socket未连接"
);
return
;
}
try
{
mSocket
.
emit
(
"state"
,
""
,
(
Ack
)
args
->
process
(
"state"
,
args
));
}
catch
(
Exception
e
)
{
Utils
.
i
(
"发送消息失败,错误原因:"
+
e
.
getMessage
());
e
.
printStackTrace
();
}
}
private
void
process
(
String
func
,
Object
[]
args
)
{
if
(
CollectionUtils
.
isEmpty
(
args
))
{
Utils
.
i
(
func
+
" args empty"
);
...
...
app/src/main/res/drawable/ic_label_checked.xml
View file @
cb3908f0
...
...
@@ -5,27 +5,27 @@
android:height=
"33dp"
android:viewportWidth=
"33"
android:viewportHeight=
"33"
>
<!-- <path-->
<!-- android:pathData="M0,0L0,33"-->
<!-- android:strokeWidth="0.5"-->
<!-- android:strokeColor="@color/line" />-->
<path
android:pathData=
"M0,0L0,33"
android:strokeWidth=
"0.5"
android:strokeColor=
"@color/line"
/>
<path
android:pathData=
"M1,0L1,30"
android:pathData=
"M1,0L1,33"
android:strokeWidth=
"3"
android:strokeColor=
"@color/colorPrimary"
/>
<path
android:pathData=
"M18,30L18,33"
android:strokeWidth=
"31"
android:strokeColor=
"#FFFFFFFF"
>
<aapt:attr
name=
"android:fillColor"
>
<gradient
android:endColor=
"#22DDDDDD"
android:endX=
"18"
android:endY=
"30"
android:startColor=
"#00FFFFFF"
android:startX=
"18"
android:startY=
"33"
android:type=
"linear"
></gradient
>
</aapt:attr
>
</path
>
<!-- <path-->
<!-- android:pathData="M17,30L17,33"-->
<!-- android:strokeWidth="34"-->
<!-- android:strokeColor="#FFFFFFFF">--
>
<!-- <aapt:attr name="android:fillColor">--
>
<!-- <gradient-->
<!-- android:endColor="#22DDDDDD"-->
<!-- android:endX="18"-->
<!-- android:endY="30"-->
<!-- android:startColor="#00FFFFFF"-->
<!-- android:startX="18"-->
<!-- android:startY="33"-->
<!-- android:type="linear"></gradient>--
>
<!-- </aapt:attr>--
>
<!-- </path>--
>
</vector>
\ No newline at end of file
app/src/main/res/drawable/ic_label_checked_bak.xml
0 → 100644
View file @
cb3908f0
<?xml version="1.0" encoding="utf-8"?>
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:aapt=
"http://schemas.android.com/aapt"
android:width=
"33dp"
android:height=
"33dp"
android:viewportWidth=
"33"
android:viewportHeight=
"33"
>
<path
android:pathData=
"M0,0L0,33"
android:strokeWidth=
"0.5"
android:strokeColor=
"@color/line"
/>
<path
android:pathData=
"M1,0L1,30"
android:strokeWidth=
"3"
android:strokeColor=
"@color/colorPrimary"
/>
<path
android:pathData=
"M18,30L18,33"
android:strokeWidth=
"31"
android:strokeColor=
"#FFFFFFFF"
>
<aapt:attr
name=
"android:fillColor"
>
<gradient
android:endColor=
"#22DDDDDD"
android:endX=
"18"
android:endY=
"30"
android:startColor=
"#00FFFFFF"
android:startX=
"18"
android:startY=
"33"
android:type=
"linear"
></gradient>
</aapt:attr>
</path>
</vector>
\ No newline at end of file
app/src/main/res/drawable/ic_label_shadow.xml
0 → 100644
View file @
cb3908f0
<?xml version="1.0" encoding="utf-8"?>
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:aapt=
"http://schemas.android.com/aapt"
android:width=
"33dp"
android:height=
"3dp"
android:viewportWidth=
"33"
android:viewportHeight=
"3"
>
<path
android:pathData=
"M17,0L17,3"
android:strokeWidth=
"34"
android:strokeColor=
"#FFFFFFFF"
>
<aapt:attr
name=
"android:fillColor"
>
<gradient
android:endColor=
"#22DDDDDD"
android:endX=
"17"
android:endY=
"0"
android:startColor=
"#00FFFFFF"
android:startX=
"17"
android:startY=
"3"
android:type=
"linear"
/>
</aapt:attr>
</path>
</vector>
\ No newline at end of file
app/src/main/res/layout/activity_launcher.xml
View file @
cb3908f0
...
...
@@ -45,17 +45,16 @@
<include
layout=
"@layout/item_goods_category"
/>
</FrameLayout>
<ScrollView
android:id=
"@+id/scroll_category"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"0.09792"
android:descendantFocusability=
"afterDescendants"
android:overScrollMode=
"never"
android:scrollbars=
"none"
>
<
Linear
Layout
<
Relative
Layout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
android:layout_height=
"wrap_content"
>
<RadioGroup
android:id=
"@+id/group_category"
android:layout_width=
"match_parent"
...
...
@@ -67,8 +66,14 @@
<include
layout=
"@layout/item_tips"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/group_category"
/>
<ImageView
android:id=
"@+id/shadow"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/ic_label_shadow"
/>
</RelativeLayout>
</ScrollView>
</LinearLayout>
...
...
@@ -76,4 +81,5 @@
android:id=
"@+id/view_trolley"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</FrameLayout>
\ No newline at end of file
app/src/main/res/layout/activity_settings.xml
View file @
cb3908f0
...
...
@@ -19,7 +19,7 @@
android:id=
"@+id/layout_test"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<TextView
...
...
@@ -41,7 +41,7 @@
android:id=
"@+id/layout_sys_settings"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<TextView
...
...
@@ -63,7 +63,7 @@
android:id=
"@+id/layout_version"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<TextView
...
...
@@ -88,7 +88,7 @@
android:id=
"@+id/layout_machine_code"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<TextView
...
...
@@ -118,7 +118,7 @@
android:id=
"@+id/layout_screen"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<TextView
...
...
@@ -148,7 +148,7 @@
android:id=
"@+id/layout_presentation"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<TextView
...
...
@@ -178,7 +178,7 @@
android:id=
"@+id/layout_logcat"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<TextView
...
...
@@ -194,7 +194,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/padding10"
android:foreground=
"
?selectableItemBackground
"
/>
android:foreground=
"
@null
"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>
...
...
app/src/main/res/layout/dialog_clear.xml
View file @
cb3908f0
...
...
@@ -25,7 +25,7 @@
android:layout_height=
"@dimen/clear_butn_height"
android:layout_weight=
"1"
android:background=
"@drawable/bg_clear_yes"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:text=
"是"
android:textColor=
"@color/textPrimary"
android:textSize=
"@dimen/clear_butn_text"
/>
...
...
@@ -35,7 +35,7 @@
android:layout_height=
"@dimen/clear_butn_height"
android:layout_weight=
"1"
android:background=
"@drawable/bg_clear_no"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:text=
"否"
android:textColor=
"@color/white"
android:textSize=
"@dimen/clear_butn_text"
/>
...
...
app/src/main/res/layout/dialog_confirm_order.xml
View file @
cb3908f0
...
...
@@ -3,7 +3,10 @@
android:id=
"@+id/layout_root"
android:layout_width=
"@dimen/confirm_order_width"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:background=
"@color/white"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingTop=
"@dimen/confirm_order_padding_top"
android:paddingBottom=
"@dimen/confirm_order_padding_bottom"
>
<TextView
...
...
@@ -94,7 +97,7 @@
android:layout_centerInParent=
"true"
android:background=
"@drawable/anim_qrcode_loading"
android:visibility=
"invisible"
/>
</RelativeLayout>
<FrameLayout
android:id=
"@+id/butn_close"
android:layout_width=
"wrap_content"
...
...
app/src/main/res/layout/dialog_goods_detail.xml
View file @
cb3908f0
...
...
@@ -144,7 +144,7 @@
android:layout_width=
"@dimen/ic_detail_add_size"
android:layout_height=
"@dimen/ic_detail_add_size"
android:background=
"@mipmap/jianhao"
android:foreground=
"
?selectableItemBackground
"
/>
android:foreground=
"
@null
"
/>
<TextView
android:id=
"@+id/txt_count"
android:layout_width=
"wrap_content"
...
...
@@ -161,7 +161,7 @@
android:layout_width=
"@dimen/ic_detail_add_size"
android:layout_height=
"@dimen/ic_detail_add_size"
android:background=
"@mipmap/jiahao"
android:foreground=
"
?selectableItemBackground
"
/>
android:foreground=
"
@null
"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
...
...
@@ -176,7 +176,7 @@
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:background=
"@drawable/bg_button"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:padding=
"@dimen/goods_detail_butn_padding"
android:text=
"加入购物袋"
android:textColor=
"@color/colorPrimary"
...
...
@@ -188,7 +188,7 @@
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:background=
"@color/colorPrimary"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:padding=
"@dimen/goods_detail_butn_padding"
android:text=
"立即购买"
android:textColor=
"@color/white"
...
...
app/src/main/res/layout/item_category.xml
View file @
cb3908f0
...
...
@@ -4,7 +4,7 @@
android:layout_height=
"wrap_content"
android:background=
"@drawable/sel_category_label"
android:button=
"@null"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:gravity=
"center"
android:paddingHorizontal=
"@dimen/category_padding_hor"
android:paddingTop=
"@dimen/category_padding_top_noimg"
...
...
app/src/main/res/layout/item_goods.xml
View file @
cb3908f0
...
...
@@ -3,7 +3,7 @@
android:id=
"@+id/layout_item"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:paddingVertical=
"@dimen/goods_padding_ver"
>
...
...
app/src/main/res/layout/item_recommend.xml
View file @
cb3908f0
...
...
@@ -4,7 +4,7 @@
android:id=
"@+id/layout_item"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:foreground=
"
?selectableItemBackground
"
>
android:foreground=
"
@null
"
>
<ImageView
android:id=
"@+id/img_recommend"
android:layout_width=
"match_parent"
...
...
app/src/main/res/layout/item_spec_rule.xml
View file @
cb3908f0
...
...
@@ -11,7 +11,7 @@
android:layout_marginTop=
"@dimen/goods_detail_rule_margin_top"
android:layout_marginEnd=
"@dimen/goods_detail_rule_margin_right"
android:background=
"@drawable/sel_spec_bg"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:gravity=
"center"
android:minWidth=
"@dimen/goods_detail_rule_width"
android:paddingHorizontal=
"@dimen/goods_detail_rule_padding_hor"
...
...
app/src/main/res/layout/item_tips.xml
View file @
cb3908f0
...
...
@@ -8,7 +8,7 @@
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/tip_margin_top"
android:button=
"@null"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:gravity=
"center"
android:lines=
"1"
android:paddingTop=
"@dimen/tip_padding_top"
...
...
app/src/main/res/layout/item_trolley.xml
View file @
cb3908f0
...
...
@@ -16,7 +16,7 @@
android:layout_height=
"@dimen/ic_checkbox"
android:background=
"@drawable/sel_butn_check"
android:checked=
"true"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:textOff=
""
android:textOn=
""
/>
<ImageView
...
...
@@ -99,7 +99,7 @@
android:layout_width=
"@dimen/ic_subtract_size"
android:layout_height=
"@dimen/ic_subtract_size"
android:background=
"@mipmap/jianhao"
android:foreground=
"
?selectableItemBackground
"
/>
android:foreground=
"
@null
"
/>
<TextView
android:id=
"@+id/txt_count"
android:layout_width=
"wrap_content"
...
...
@@ -116,6 +116,6 @@
android:layout_width=
"@dimen/ic_add_size"
android:layout_height=
"@dimen/ic_add_size"
android:background=
"@mipmap/jiahao"
android:foreground=
"
?selectableItemBackground
"
/>
android:foreground=
"
@null
"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/
menu
_line_0.xml
→
app/src/main/res/layout/
kds
_line_0.xml
View file @
cb3908f0
File moved
app/src/main/res/layout/
menu
_line_1.xml
→
app/src/main/res/layout/
kds
_line_1.xml
View file @
cb3908f0
File moved
app/src/main/res/layout/
menu
_line_2.xml
→
app/src/main/res/layout/
kds
_line_2.xml
View file @
cb3908f0
File moved
app/src/main/res/layout/
menu
_line_3.xml
→
app/src/main/res/layout/
kds
_line_3.xml
View file @
cb3908f0
File moved
app/src/main/res/layout/
menu
_line_4.xml
→
app/src/main/res/layout/
kds
_line_4.xml
View file @
cb3908f0
File moved
app/src/main/res/layout/present_interaction.xml
View file @
cb3908f0
...
...
@@ -2,7 +2,7 @@
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@
color/blac
k"
>
android:background=
"@
android:color/holo_red_dar
k"
>
<ImageView
android:id=
"@+id/img_background1"
android:layout_width=
"match_parent"
...
...
app/src/main/res/layout/present_
menu
.xml
→
app/src/main/res/layout/present_
kds
.xml
View file @
cb3908f0
File moved
app/src/main/res/layout/view_header.xml
View file @
cb3908f0
...
...
@@ -12,7 +12,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:padding=
"@dimen/padding10"
android:src=
"@drawable/ic_baseline_chevron_left_24"
/>
<TextView
...
...
app/src/main/res/layout/view_trolley.xml
View file @
cb3908f0
...
...
@@ -37,7 +37,7 @@
android:id=
"@+id/butn_clear"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<ImageView
...
...
@@ -74,7 +74,7 @@
android:layout_height=
"@dimen/trolley_bar_height"
android:layout_alignParentBottom=
"true"
android:background=
"@color/white"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<RelativeLayout
...
...
@@ -126,7 +126,7 @@
android:layout_width=
"@dimen/trolley_pay_width"
android:layout_height=
"match_parent"
android:background=
"@color/colorPrimary"
android:foreground=
"
?selectableItemBackground
"
android:foreground=
"
@null
"
android:text=
"结算"
android:textColor=
"@color/white"
android:textSize=
"@dimen/ts_trolley_pay"
...
...
app/src/main/res/values-w800dp/dimens.xml
View file @
cb3908f0
...
...
@@ -34,8 +34,8 @@
<dimen
name=
"goods_price_margin"
>
5px
</dimen>
<dimen
name=
"category_padding_top"
>
17px
</dimen>
<dimen
name=
"category_padding_bottom"
>
32px
</dimen>
<dimen
name=
"category_padding_top_noimg"
>
56
px
</dimen>
<dimen
name=
"category_padding_bottom_noimg"
>
70
px
</dimen>
<dimen
name=
"category_padding_top_noimg"
>
68
px
</dimen>
<dimen
name=
"category_padding_bottom_noimg"
>
68
px
</dimen>
<dimen
name=
"category_padding_hor"
>
35px
</dimen>
<dimen
name=
"category_drawable_padding"
>
10px
</dimen>
<dimen
name=
"category_drawable_width"
>
100px
</dimen>
...
...
@@ -140,37 +140,21 @@
<dimen
name=
"confirm_order_text_one"
>
62px
</dimen>
<dimen
name=
"confirm_order_text_two"
>
7px
</dimen>
<dimen
name=
"interaction_padding_top"
>
117
px
</dimen>
<dimen
name=
"interaction_padding_left"
>
75
px
</dimen>
<dimen
name=
"interaction_padding_bottom"
>
66
px
</dimen>
<dimen
name=
"interaction_padding_right"
>
58
px
</dimen>
<dimen
name=
"interaction_text_space"
>
4
0px
</dimen>
<dimen
name=
"interaction_padding_top"
>
234
px
</dimen>
<dimen
name=
"interaction_padding_left"
>
150
px
</dimen>
<dimen
name=
"interaction_padding_bottom"
>
132
px
</dimen>
<dimen
name=
"interaction_padding_right"
>
106
px
</dimen>
<dimen
name=
"interaction_text_space"
>
8
0px
</dimen>
<dimen
name=
"interaction_recommend_margin"
>
5
5px
</dimen>
<dimen
name=
"interaction_goods_icon_width"
>
23
0px
</dimen>
<dimen
name=
"interaction_goods_icon_height"
>
23
0px
</dimen>
<dimen
name=
"interaction_recommend_margin"
>
11
5px
</dimen>
<dimen
name=
"interaction_goods_icon_width"
>
47
0px
</dimen>
<dimen
name=
"interaction_goods_icon_height"
>
47
0px
</dimen>
<dimen
name=
"ts_interaction_line1"
>
130px
</dimen>
<dimen
name=
"ts_interaction_line2"
>
50px
</dimen>
<dimen
name=
"ts_interaction_line3"
>
50px
</dimen>
<dimen
name=
"ts_interaction_recommend_small"
>
60px
</dimen>
<dimen
name=
"ts_interaction_recommend_big"
>
75px
</dimen>
<!-- <dimen name="interaction_padding_top">234px</dimen>-->
<!-- <dimen name="interaction_padding_left">150px</dimen>-->
<!-- <dimen name="interaction_padding_bottom">132px</dimen>-->
<!-- <dimen name="interaction_padding_right">106px</dimen>-->
<!-- <dimen name="interaction_text_space">80px</dimen>-->
<!-- <dimen name="interaction_recommend_margin">115px</dimen>-->
<!-- <dimen name="interaction_goods_icon_width">470px</dimen>-->
<!-- <dimen name="interaction_goods_icon_height">470px</dimen>-->
<!-- <dimen name="ts_interaction_line1">260px</dimen>-->
<!-- <dimen name="ts_interaction_line2">100px</dimen>-->
<!-- <dimen name="ts_interaction_line3">100px</dimen>-->
<!-- <dimen name="ts_interaction_recommend_small">120px</dimen>-->
<!-- <dimen name="ts_interaction_recommend_big">150px</dimen>-->
<dimen
name=
"ts_interaction_line1"
>
260px
</dimen>
<dimen
name=
"ts_interaction_line2"
>
100px
</dimen>
<dimen
name=
"ts_interaction_line3"
>
100px
</dimen>
<dimen
name=
"ts_interaction_recommend_small"
>
100px
</dimen>
<dimen
name=
"ts_interaction_recommend_big"
>
120px
</dimen>
<dimen
name=
"ic_recommend"
>
17px
</dimen>
<dimen
name=
"ic_clear_size"
>
20px
</dimen>
...
...
app/src/main/res/values/dimens.xml
View file @
cb3908f0
...
...
@@ -34,8 +34,8 @@
<dimen
name=
"goods_price_margin"
>
5px
</dimen>
<dimen
name=
"category_padding_top"
>
17px
</dimen>
<dimen
name=
"category_padding_bottom"
>
32px
</dimen>
<dimen
name=
"category_padding_top_noimg"
>
20
px
</dimen>
<dimen
name=
"category_padding_bottom_noimg"
>
70
px
</dimen>
<dimen
name=
"category_padding_top_noimg"
>
68
px
</dimen>
<dimen
name=
"category_padding_bottom_noimg"
>
68
px
</dimen>
<dimen
name=
"category_padding_hor"
>
35px
</dimen>
<dimen
name=
"category_drawable_padding"
>
10px
</dimen>
<dimen
name=
"category_drawable_width"
>
100px
</dimen>
...
...
@@ -140,37 +140,37 @@
<dimen
name=
"confirm_order_text_one"
>
62px
</dimen>
<dimen
name=
"confirm_order_text_two"
>
7px
</dimen>
<dimen
name=
"interaction_padding_top"
>
117px
</dimen
>
<dimen
name=
"interaction_padding_left"
>
75px
</dimen
>
<dimen
name=
"interaction_padding_bottom"
>
66px
</dimen
>
<dimen
name=
"interaction_padding_right"
>
58px
</dimen
>
<dimen
name=
"interaction_text_space"
>
40px
</dimen
>
<!-- <dimen name="interaction_padding_top">117px</dimen>--
>
<!-- <dimen name="interaction_padding_left">75px</dimen>--
>
<!-- <dimen name="interaction_padding_bottom">66px</dimen>--
>
<!-- <dimen name="interaction_padding_right">58px</dimen>--
>
<!-- <dimen name="interaction_text_space">40px</dimen>--
>
<dimen
name=
"interaction_recommend_margin"
>
55px
</dimen
>
<dimen
name=
"interaction_goods_icon_width"
>
230px
</dimen
>
<dimen
name=
"interaction_goods_icon_height"
>
230px
</dimen
>
<!-- <dimen name="interaction_recommend_margin">55px</dimen>--
>
<!-- <dimen name="interaction_goods_icon_width">230px</dimen>--
>
<!-- <dimen name="interaction_goods_icon_height">230px</dimen>--
>
<dimen
name=
"ts_interaction_line1"
>
130px
</dimen
>
<dimen
name=
"ts_interaction_line2"
>
50px
</dimen
>
<dimen
name=
"ts_interaction_line3"
>
50px
</dimen
>
<dimen
name=
"ts_interaction_recommend_small"
>
60px
</dimen
>
<dimen
name=
"ts_interaction_recommend_big"
>
75px
</dimen
>
<!-- <dimen name="ts_interaction_line1">130px</dimen>--
>
<!-- <dimen name="ts_interaction_line2">50px</dimen>--
>
<!-- <dimen name="ts_interaction_line3">50px</dimen>--
>
<!-- <dimen name="ts_interaction_recommend_small">60px</dimen>--
>
<!-- <dimen name="ts_interaction_recommend_big">75px</dimen>--
>
<!-- <dimen name="interaction_padding_top">234px</dimen>--
>
<!-- <dimen name="interaction_padding_left">150px</dimen>--
>
<!-- <dimen name="interaction_padding_bottom">132px</dimen>--
>
<!-- <dimen name="interaction_padding_right">106px</dimen>--
>
<!-- <dimen name="interaction_text_space">80px</dimen>--
>
<dimen
name=
"interaction_padding_top"
>
234px
</dimen
>
<dimen
name=
"interaction_padding_left"
>
150px
</dimen
>
<dimen
name=
"interaction_padding_bottom"
>
132px
</dimen
>
<dimen
name=
"interaction_padding_right"
>
106px
</dimen
>
<dimen
name=
"interaction_text_space"
>
80px
</dimen
>
<!-- <dimen name="interaction_recommend_margin">115px</dimen>--
>
<!-- <dimen name="interaction_goods_icon_width">470px</dimen>--
>
<!-- <dimen name="interaction_goods_icon_height">470px</dimen>--
>
<dimen
name=
"interaction_recommend_margin"
>
115px
</dimen
>
<dimen
name=
"interaction_goods_icon_width"
>
470px
</dimen
>
<dimen
name=
"interaction_goods_icon_height"
>
470px
</dimen
>
<!-- <dimen name="ts_interaction_line1">260px</dimen>--
>
<!-- <dimen name="ts_interaction_line2">100px</dimen>--
>
<!-- <dimen name="ts_interaction_line3">100px</dimen>--
>
<!-- <dimen name="ts_interaction_recommend_small">120px</dimen>--
>
<!-- <dimen name="ts_interaction_recommend_big">150px</dimen>--
>
<dimen
name=
"ts_interaction_line1"
>
260px
</dimen
>
<dimen
name=
"ts_interaction_line2"
>
100px
</dimen
>
<dimen
name=
"ts_interaction_line3"
>
100px
</dimen
>
<dimen
name=
"ts_interaction_recommend_small"
>
100px
</dimen
>
<dimen
name=
"ts_interaction_recommend_big"
>
120px
</dimen
>
<dimen
name=
"ic_recommend"
>
17px
</dimen>
<dimen
name=
"ic_clear_size"
>
20px
</dimen>
...
...
build.gradle
View file @
cb3908f0
...
...
@@ -16,9 +16,13 @@ allprojects {
repositories
{
google
()
jcenter
()
mavenCentral
()
maven
{
url
"https://maven.aliyun.com/nexus/content/repositories/releases/"
}
maven
{
url
'https://jitpack.io'
}
}
}
...
...
todo.md
View file @
cb3908f0
## 未解决事项 TODO
*****
\ No newline at end of file
1、设置字体 购物袋总数量,购物袋item数量,商品详情数量
2、设置字体 购物袋总金额
\ 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