Commit cb3908f0 by wjg

add update

parent 0ef0f1f0
...@@ -10,8 +10,8 @@ android { ...@@ -10,8 +10,8 @@ android {
applicationId "com.ihaoin.hooloo.device" applicationId "com.ihaoin.hooloo.device"
minSdkVersion 26 minSdkVersion 26
targetSdkVersion 30 targetSdkVersion 30
versionCode 1 versionCode 10
versionName "1.0" versionName "1.0.10"
ndk { ndk {
//选择要添加的对应 cpu 类型的 .so 库。 //选择要添加的对应 cpu 类型的 .so 库。
...@@ -51,7 +51,8 @@ dependencies { ...@@ -51,7 +51,8 @@ dependencies {
implementation 'com.kyleduo.switchbutton:library:2.0.0' implementation 'com.kyleduo.switchbutton:library:2.0.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1' implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" 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 'com.squareup.okhttp3:okhttp:3.5.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
...@@ -74,4 +75,5 @@ dependencies { ...@@ -74,4 +75,5 @@ dependencies {
implementation 'com.umeng.umsdk:apm:1.6.2'// U-APM产品包依赖(必选) implementation 'com.umeng.umsdk:apm:1.6.2'// U-APM产品包依赖(必选)
implementation 'io.socket:socket.io-client:1.0.0' implementation 'io.socket:socket.io-client:1.0.0'
implementation 'com.blankj:utilcode:1.28.6' implementation 'com.blankj:utilcode:1.28.6'
// debugImplementation 'com.github.getActivity:Logcat:10.6'
} }
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="com.ihaoin.hooloo.device" package="com.ihaoin.hooloo.device">
android:versionCode="2"
android:versionName="1.0.2">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" />
...@@ -27,12 +25,20 @@ ...@@ -27,12 +25,20 @@
android:extractNativeLibs="true" android:extractNativeLibs="true"
android:icon="@mipmap/hooloo_launcher" android:icon="@mipmap/hooloo_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:hardwareAccelerated="true"
android:requestLegacyExternalStorage="true" android:requestLegacyExternalStorage="true"
android:sharedUserId="android.uid.system" android:sharedUserId="android.uid.system"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:usesCleartextTraffic="true" android:usesCleartextTraffic="true"
tools:replace="android:allowBackup,android:icon"> tools:replace="android:allowBackup,android:icon">
<!-- 悬浮窗入口 -->
<meta-data
android:name="LogcatWindowEntrance"
android:value="true" />
<!-- 通知栏入口 -->
<meta-data
android:name="LogcatNotifyEntrance"
android:value="true" />
<activity <activity
android:name=".home.view.LauncherActivity" android:name=".home.view.LauncherActivity"
android:exported="true" android:exported="true"
......
...@@ -4,7 +4,6 @@ import android.app.Application; ...@@ -4,7 +4,6 @@ import android.app.Application;
import android.graphics.Typeface; import android.graphics.Typeface;
import com.ihaoin.hooloo.device.base.AppConfig; 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.MainData;
import com.ihaoin.hooloo.device.data.TrolleyGoods; import com.ihaoin.hooloo.device.data.TrolleyGoods;
import com.ihaoin.hooloo.device.data.enums.PresentState; import com.ihaoin.hooloo.device.data.enums.PresentState;
...@@ -24,7 +23,6 @@ import cn.jpush.android.api.JPushInterface; ...@@ -24,7 +23,6 @@ import cn.jpush.android.api.JPushInterface;
public class HLApplication extends Application { public class HLApplication extends Application {
public static HLApplication SELF = null; public static HLApplication SELF = null;
public static String RECOGNIZE_PERSON = ""; public static String RECOGNIZE_PERSON = "";
private UpdateSocket updateSocket = null;
@Override @Override
public void onCreate() { public void onCreate() {
...@@ -41,8 +39,6 @@ public class HLApplication extends Application { ...@@ -41,8 +39,6 @@ public class HLApplication extends Application {
AppConfig.REGISTRATION_ID = JPushInterface.getRegistrationID(this); AppConfig.REGISTRATION_ID = JPushInterface.getRegistrationID(this);
HttpUtil.postRegistrationId(); HttpUtil.postRegistrationId();
startUpdateSocket();
} }
@Override @Override
...@@ -50,19 +46,6 @@ public class HLApplication extends Application { ...@@ -50,19 +46,6 @@ public class HLApplication extends Application {
super.onTerminate(); super.onTerminate();
Utils.i("Application 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() { private void setDefaultTypeface() {
...@@ -89,14 +72,10 @@ public class HLApplication extends Application { ...@@ -89,14 +72,10 @@ public class HLApplication extends Application {
// 第一个点单屏默认显示交互屏 // 第一个点单屏默认显示交互屏
if (AppConfig.DEFAULT_SCREEN_NO.equals("1")) { if (AppConfig.DEFAULT_SCREEN_NO.equals("1")) {
AppConfig.DEFAULT_PRESENT = PresentState.MENU.getName(); AppConfig.DEFAULT_PRESENT = PresentState.KDS.getName();
} else { } else {
AppConfig.DEFAULT_PRESENT = PresentState.INTERACTION.getName(); AppConfig.DEFAULT_PRESENT = PresentState.INTERACTION.getName();
} }
// if (AppConfig.DEBUG) { // TODO delete
// return "SN0091290001";
// }
} }
private static MainData mainData = new MainData(); private static MainData mainData = new MainData();
......
...@@ -7,7 +7,7 @@ public class AppConfig { ...@@ -7,7 +7,7 @@ public class AppConfig {
/** 点单屏编码, 1-菜单屏,2-交互屏 */ /** 点单屏编码, 1-菜单屏,2-交互屏 */
public static String DEFAULT_SCREEN_NO = "1"; // TODO 编译点单屏编码 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 HL = "HL";
public static String TAG = HL + "_TEST"; public static String TAG = HL + "_TEST";
......
...@@ -24,7 +24,7 @@ public class Base { ...@@ -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_SHOW = "ACTION_TROLLEY_SHOW";
public static final String BROADCAST_ACTION_TROLLEY_HIDE = "ACTION_TROLLEY_HIDE"; 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_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_LOGCAT_STATE_CHANGED = "ACTION_LOGCAT_STATE_CHANGED";
public static final String BROADCAST_ACTION_TOUCH_EVENT = "ACTION_TOUCH_EVENT"; public static final String BROADCAST_ACTION_TOUCH_EVENT = "ACTION_TOUCH_EVENT";
public static final String BROADCAST_ACTION_TIMEOUT = "ACTION_TIMEOUT"; public static final String BROADCAST_ACTION_TIMEOUT = "ACTION_TIMEOUT";
......
...@@ -12,6 +12,7 @@ import com.ihaoin.hooloo.device.util.Utils; ...@@ -12,6 +12,7 @@ import com.ihaoin.hooloo.device.util.Utils;
import io.socket.client.Ack; import io.socket.client.Ack;
import io.socket.client.IO; import io.socket.client.IO;
import io.socket.client.Socket; import io.socket.client.Socket;
import io.socket.emitter.Emitter;
/** Linux通信 获取机器编码 */ /** Linux通信 获取机器编码 */
public class MachineInfoSocket extends Thread { public class MachineInfoSocket extends Thread {
...@@ -31,18 +32,27 @@ public class MachineInfoSocket extends Thread { ...@@ -31,18 +32,27 @@ public class MachineInfoSocket extends Thread {
try { try {
mSocket = IO.socket(Base.NSP_MACHINE); mSocket = IO.socket(Base.NSP_MACHINE);
mSocket.connect(); mSocket.connect();
mSocket.on("connect", onConnect);
mSocket.on("disconnect", onDisconnect);
} catch (Exception e) { } catch (Exception e) {
Utils.i("连接server失败,错误原因:" + e.getMessage()); Utils.i("连接server失败,错误原因:" + e.getMessage());
e.printStackTrace(); e.printStackTrace();
} }
} }
Emitter.Listener onConnect = args -> Utils.i("machine socket connected");
Emitter.Listener onDisconnect = args -> Utils.i("machine socket disconnected");
public void close() { public void close() {
try { try {
Utils.i("close machine socket");
if (mSocket != null) { if (mSocket != null) {
mSocket.disconnect(); mSocket.disconnect();
mSocket.close(); mSocket.off("connect", onConnect);
mSocket = null; mSocket.off("disconnect", onDisconnect);
// mSocket.close();
// mSocket = null;
} }
} catch (Exception e) { } catch (Exception e) {
Utils.i("close失败,错误原因:" + e.getMessage()); Utils.i("close失败,错误原因:" + e.getMessage());
......
...@@ -4,7 +4,7 @@ import com.ihaoin.hooloo.device.util.StringUtils; ...@@ -4,7 +4,7 @@ import com.ihaoin.hooloo.device.util.StringUtils;
public enum PresentState { public enum PresentState {
NONE("不显示"), NONE("不显示"),
MENU("菜单屏"), KDS("菜单屏"),
INTERACTION("交互屏"); INTERACTION("交互屏");
private String name; private String name;
......
...@@ -39,7 +39,7 @@ public class GoodsAdapter extends BaseSectionQuickAdapter<ScrollBean, BaseViewHo ...@@ -39,7 +39,7 @@ public class GoodsAdapter extends BaseSectionQuickAdapter<ScrollBean, BaseViewHo
protected void convert(BaseViewHolder helper, ScrollBean item) { protected void convert(BaseViewHolder helper, ScrollBean item) {
ScrollBean.ScrollItemBean t = item.t; ScrollBean.ScrollItemBean t = item.t;
ViewGroup layoutItem = helper.getView(R.id.layout_item); ViewGroup layoutItem = helper.getView(R.id.layout_item);
layoutItem.setForeground(null); // layoutItem.setForeground(null);
Goods goods = (Goods) t.getObject(); Goods goods = (Goods) t.getObject();
helper.setText(R.id.txt_name, goods.getName()); helper.setText(R.id.txt_name, goods.getName());
...@@ -67,12 +67,9 @@ public class GoodsAdapter extends BaseSectionQuickAdapter<ScrollBean, BaseViewHo ...@@ -67,12 +67,9 @@ public class GoodsAdapter extends BaseSectionQuickAdapter<ScrollBean, BaseViewHo
} }
ImageView imgThumbnail = helper.getView(R.id.img_thumbnail); ImageView imgThumbnail = helper.getView(R.id.img_thumbnail);
// RoundedCorners roundedCorners = new RoundedCorners(5);
// RequestOptions options = RequestOptions.bitmapTransform(roundedCorners);
if (goods.getPics() == null) { if (goods.getPics() == null) {
imgThumbnail.setImageDrawable(null); imgThumbnail.setImageDrawable(null);
} else { } 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); Utils.getGlide(mContext).load(Utils.getThumbnailUrl(goods.getPics().getThumbnail())).into(imgThumbnail);
} }
......
...@@ -193,8 +193,8 @@ public class GoodsDetailDialog extends Dialog { ...@@ -193,8 +193,8 @@ public class GoodsDetailDialog extends Dialog {
txtName.setText(mGoods.getName()); txtName.setText(mGoods.getName());
butnSubtract.setOnClickListener(v -> subtractCount()); butnSubtract.setOnClickListener(v -> subtractCount());
butnAdd.setOnClickListener(v -> addCount()); butnAdd.setOnClickListener(v -> addCount());
butnSubtract.setForeground(null); // butnSubtract.setForeground(null);
butnAdd.setForeground(null); // butnAdd.setForeground(null);
icoPrice.setPaintFlags(icoPrice.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG); icoPrice.setPaintFlags(icoPrice.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
txtPrice.setPaintFlags(txtPrice.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG); txtPrice.setPaintFlags(txtPrice.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
......
...@@ -2,11 +2,17 @@ package com.ihaoin.hooloo.device.interaction; ...@@ -2,11 +2,17 @@ package com.ihaoin.hooloo.device.interaction;
import android.content.Context; 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 com.ihaoin.hooloo.device.util.Utils;
import io.socket.client.Ack; import io.socket.client.Ack;
import io.socket.client.IO;
import io.socket.client.Socket; import io.socket.client.Socket;
import test.IAGen; import io.socket.emitter.Emitter;
/** Linux通信 交互屏 */ /** Linux通信 交互屏 */
public class InteractionSocket extends Thread { public class InteractionSocket extends Thread {
...@@ -24,47 +30,68 @@ public class InteractionSocket extends Thread { ...@@ -24,47 +30,68 @@ public class InteractionSocket extends Thread {
private void connectSocket() { private void connectSocket() {
try { try {
// TODO test // TODO TEST
Utils.sendInteractionMsgBroadcast(mContext, IAGen.getMsg1()); // Utils.sendInteractionMsgBroadcast(mContext, IAGen.getMsg1());
Thread.sleep(30 * 1000); // Thread.sleep(30 * 1000);
Utils.sendInteractionMsgBroadcast(mContext, IAGen.getMsg3()); // Utils.sendInteractionMsgBroadcast(mContext, IAGen.getMsg3());
Thread.sleep(30 * 1000); // Thread.sleep(30 * 1000);
Utils.sendInteractionMsgBroadcast(mContext, IAGen.getMsg2()); // Utils.sendInteractionMsgBroadcast(mContext, IAGen.getMsg2());
while (true) { // while (true) {
Thread.sleep(30 * 1000); // 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;
// } // }
// 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) { } catch (Exception e) {
Utils.i("连接server失败,错误原因:" + e.getMessage()); Utils.i("连接server失败,错误原因:" + e.getMessage());
e.printStackTrace(); 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() { public void close() {
try { try {
Utils.i("close interaction socket");
if (mSocket != null) { if (mSocket != null) {
mSocket.disconnect(); mSocket.disconnect();
mSocket.close(); mSocket.off("connect", onConnect);
mSocket = null; mSocket.off("disconnect", onDisconnect);
mSocket.off("reply", onReply);
// mSocket.close();
// mSocket = null;
} }
} catch (Exception e) { } catch (Exception e) {
Utils.i("close失败,错误原因:" + e.getMessage()); Utils.i("close失败,错误原因:" + e.getMessage());
......
...@@ -92,7 +92,7 @@ public class InteractionPresentation extends Presentation { ...@@ -92,7 +92,7 @@ public class InteractionPresentation extends Presentation {
while (true) { while (true) {
InteractionMsg msg = mMsgQueue.poll(); InteractionMsg msg = mMsgQueue.poll();
if (msg == null) { if (msg == null) {
Utils.i("msg is null"); // Utils.i("msg is null");
continue; continue;
} }
try { try {
......
...@@ -12,6 +12,7 @@ import com.ihaoin.hooloo.device.util.Utils; ...@@ -12,6 +12,7 @@ import com.ihaoin.hooloo.device.util.Utils;
import io.socket.client.Ack; import io.socket.client.Ack;
import io.socket.client.IO; import io.socket.client.IO;
import io.socket.client.Socket; import io.socket.client.Socket;
import io.socket.emitter.Emitter;
/** Linux通信 KDS 菜单屏 */ /** Linux通信 KDS 菜单屏 */
public class KDSSocket extends Thread { public class KDSSocket extends Thread {
...@@ -31,14 +32,24 @@ public class KDSSocket extends Thread { ...@@ -31,14 +32,24 @@ public class KDSSocket extends Thread {
try { try {
mSocket = IO.socket(Base.NSP_KDS); mSocket = IO.socket(Base.NSP_KDS);
mSocket.connect(); mSocket.connect();
mSocket.emit("notice", "test", (Ack) args -> { mSocket.on("connect", onConnect);
if (CollectionUtils.isEmpty(args)) { mSocket.on("disconnect", onDisconnect);
Utils.i("notice args empty"); mSocket.on("reply", onReply);
return; } 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)) { if (CollectionUtils.isEmpty(args)) {
Utils.i("reply args empty"); Utils.i("reply args empty");
return; return;
...@@ -54,19 +65,18 @@ public class KDSSocket extends Thread { ...@@ -54,19 +65,18 @@ public class KDSSocket extends Thread {
return; return;
} }
Utils.sendKdsMsgBroadcast(mContext, msg); Utils.sendKdsMsgBroadcast(mContext, msg);
}); };
} catch (Exception e) {
Utils.i("连接server失败,错误原因:" + e.getMessage());
e.printStackTrace();
}
}
public void close() { public void close() {
try { try {
Utils.i("close kds socket");
if (mSocket != null) { if (mSocket != null) {
mSocket.disconnect(); mSocket.disconnect();
mSocket.close(); mSocket.off("connect", onConnect);
mSocket = null; mSocket.off("disconnect", onDisconnect);
mSocket.off("reply", onReply);
// mSocket.close();
// mSocket = null;
} }
} catch (Exception e) { } catch (Exception e) {
Utils.i("close失败,错误原因:" + e.getMessage()); Utils.i("close失败,错误原因:" + e.getMessage());
......
...@@ -33,15 +33,15 @@ public class MachineStateAdapter extends RecyclerView.Adapter<RecyclerView.ViewH ...@@ -33,15 +33,15 @@ public class MachineStateAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
switch (viewType) { switch (viewType) {
case 0: 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: 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: 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: 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: 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; return null;
} }
......
...@@ -32,7 +32,6 @@ import com.ihaoin.hooloo.device.base.Base; ...@@ -32,7 +32,6 @@ import com.ihaoin.hooloo.device.base.Base;
import com.ihaoin.hooloo.device.component.FixedSpeedScroller; import com.ihaoin.hooloo.device.component.FixedSpeedScroller;
import com.ihaoin.hooloo.device.component.IntroViewPager; import com.ihaoin.hooloo.device.component.IntroViewPager;
import com.ihaoin.hooloo.device.data.MainData; 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.KDSMsg;
import com.ihaoin.hooloo.device.data.vo.KDSOrder; import com.ihaoin.hooloo.device.data.vo.KDSOrder;
import com.ihaoin.hooloo.device.kds.KDSSocket; import com.ihaoin.hooloo.device.kds.KDSSocket;
...@@ -43,10 +42,9 @@ import com.ihaoin.hooloo.device.util.Utils; ...@@ -43,10 +42,9 @@ import com.ihaoin.hooloo.device.util.Utils;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
public class MenuPresentation extends Presentation { public class KdsPresentation extends Presentation {
private KDSMsg mKdsMsg; private KDSMsg mKdsMsg;
...@@ -61,14 +59,14 @@ public class MenuPresentation extends Presentation { ...@@ -61,14 +59,14 @@ public class MenuPresentation extends Presentation {
private List<TextView> completedViews = new ArrayList<>(); private List<TextView> completedViews = new ArrayList<>();
private KDSSocket kdsSocket = null; private KDSSocket kdsSocket = null;
public MenuPresentation(Context outerContext, Display display) { public KdsPresentation(Context outerContext, Display display) {
super(outerContext, display); super(outerContext, display);
} }
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.present_menu); setContentView(R.layout.present_kds);
initViews(); initViews();
registerKDSMessageReceiver(); registerKDSMessageReceiver();
...@@ -142,10 +140,10 @@ public class MenuPresentation extends Presentation { ...@@ -142,10 +140,10 @@ public class MenuPresentation extends Presentation {
private void showImages() { private void showImages() {
MainData mainData = HLApplication.getMainData(); MainData mainData = HLApplication.getMainData();
// TODO TEST // 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"); // 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(); // Images img = new Images();
img.setLeft(imgs); // img.setLeft(imgs);
mainData.setImages(img); // mainData.setImages(img);
if (mainData == null || mainData.getImages() == null) { if (mainData == null || mainData.getImages() == null) {
return; return;
} }
...@@ -164,6 +162,7 @@ public class MenuPresentation extends Presentation { ...@@ -164,6 +162,7 @@ public class MenuPresentation extends Presentation {
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
image.setLayoutParams(layoutParams); image.setLayoutParams(layoutParams);
image.setAdjustViewBounds(true); image.setAdjustViewBounds(true);
image.setScaleType(ImageView.ScaleType.CENTER_CROP);
Utils.getGlide(getContext()).load(url).into(image); Utils.getGlide(getContext()).load(url).into(image);
return image; return image;
} }
...@@ -318,7 +317,7 @@ public class MenuPresentation extends Presentation { ...@@ -318,7 +317,7 @@ public class MenuPresentation extends Presentation {
} }
OnDismissListener dismissListener = dialog -> { OnDismissListener dismissListener = dialog -> {
Utils.i("menu present dismiss"); Utils.i("kds present dismiss");
unregistKDSMessageReceiver(); unregistKDSMessageReceiver();
if (imagePagerHandler != null) { if (imagePagerHandler != null) {
......
...@@ -88,7 +88,7 @@ public class SettingsActivity extends Activity { ...@@ -88,7 +88,7 @@ public class SettingsActivity extends Activity {
private void showEditPresentation() { private void showEditPresentation() {
AlertDialog.Builder builder = new AlertDialog.Builder(this); AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("修改副屏内容"); 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) -> { builder.setSingleChoiceItems(items, StringUtils.indexOf(items, SharedPreferencesUtils.getPresentation(SettingsActivity.this)), (dialog, which) -> {
SharedPreferencesUtils.setPresentation(SettingsActivity.this, items[which]); SharedPreferencesUtils.setPresentation(SettingsActivity.this, items[which]);
txtPresentation.setText(SharedPreferencesUtils.getPresentation(SettingsActivity.this)); txtPresentation.setText(SharedPreferencesUtils.getPresentation(SettingsActivity.this));
......
...@@ -80,7 +80,7 @@ public class UpdateService extends Thread { ...@@ -80,7 +80,7 @@ public class UpdateService extends Thread {
PackageInfo packageInfo = Utils.getPackageInfo(); PackageInfo packageInfo = Utils.getPackageInfo();
if (updateVo.getVersionCode() <= packageInfo.versionCode) { if (updateVo.getVersionCode() <= packageInfo.versionCode) {
Utils.i(String.format("dont update, current: %s, update: %s", packageInfo.versionCode, updateVo.getVersionCode())); Utils.i(String.format("do not update, current: %s, update: %s", packageInfo.versionCode, updateVo.getVersionCode()));
return; return;
} }
......
...@@ -14,6 +14,7 @@ import java.io.IOException; ...@@ -14,6 +14,7 @@ import java.io.IOException;
import io.socket.client.Ack; import io.socket.client.Ack;
import io.socket.client.IO; import io.socket.client.IO;
import io.socket.client.Socket; import io.socket.client.Socket;
import io.socket.emitter.Emitter;
/** Linux通信 检查更新 */ /** Linux通信 检查更新 */
public class UpdateSocket extends Thread { public class UpdateSocket extends Thread {
...@@ -33,21 +34,37 @@ public class UpdateSocket extends Thread { ...@@ -33,21 +34,37 @@ public class UpdateSocket extends Thread {
try { try {
mSocket = IO.socket(Base.NSP_UPGRADE); mSocket = IO.socket(Base.NSP_UPGRADE);
mSocket.connect(); mSocket.connect();
mSocket.on("upgrade", args -> process("upgrade", args)); mSocket.on("connect", onConnect);
mSocket.on("disconnect", onDisconnect);
checkUpdate(); mSocket.on("upgrade", onUpgrade);
} catch (Exception e) { } catch (Exception e) {
Utils.i("连接server失败,错误原因:" + e.getMessage()); Utils.i("连接server失败,错误原因:" + e.getMessage());
e.printStackTrace(); 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() { public void close() {
try { try {
Utils.i("close update socket");
if (mSocket != null) { if (mSocket != null) {
mSocket.disconnect(); mSocket.disconnect();
mSocket.close(); mSocket.off("connect", onConnect);
mSocket = null; mSocket.off("disconnect", onDisconnect);
mSocket.off("upgrade", onUpgrade);
// mSocket.close();
// mSocket = null;
} }
} catch (Exception e) { } catch (Exception e) {
Utils.i("close失败,错误原因:" + e.getMessage()); Utils.i("close失败,错误原因:" + e.getMessage());
...@@ -55,19 +72,6 @@ public class UpdateSocket extends Thread { ...@@ -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) { private void process(String func, Object[] args) {
if (CollectionUtils.isEmpty(args)) { if (CollectionUtils.isEmpty(args)) {
Utils.i(func + " args empty"); Utils.i(func + " args empty");
......
...@@ -5,27 +5,27 @@ ...@@ -5,27 +5,27 @@
android:height="33dp" android:height="33dp"
android:viewportWidth="33" android:viewportWidth="33"
android:viewportHeight="33"> android:viewportHeight="33">
<!-- <path-->
<!-- android:pathData="M0,0L0,33"-->
<!-- android:strokeWidth="0.5"-->
<!-- android:strokeColor="@color/line" />-->
<path <path
android:pathData="M0,0L0,33" android:pathData="M1,0L1,33"
android:strokeWidth="0.5"
android:strokeColor="@color/line" />
<path
android:pathData="M1,0L1,30"
android:strokeWidth="3" android:strokeWidth="3"
android:strokeColor="@color/colorPrimary" /> android:strokeColor="@color/colorPrimary" />
<path <!-- <path-->
android:pathData="M18,30L18,33" <!-- android:pathData="M17,30L17,33"-->
android:strokeWidth="31" <!-- android:strokeWidth="34"-->
android:strokeColor="#FFFFFFFF"> <!-- android:strokeColor="#FFFFFFFF">-->
<aapt:attr name="android:fillColor"> <!-- <aapt:attr name="android:fillColor">-->
<gradient <!-- <gradient-->
android:endColor="#22DDDDDD" <!-- android:endColor="#22DDDDDD"-->
android:endX="18" <!-- android:endX="18"-->
android:endY="30" <!-- android:endY="30"-->
android:startColor="#00FFFFFF" <!-- android:startColor="#00FFFFFF"-->
android:startX="18" <!-- android:startX="18"-->
android:startY="33" <!-- android:startY="33"-->
android:type="linear"></gradient> <!-- android:type="linear"></gradient>-->
</aapt:attr> <!-- </aapt:attr>-->
</path> <!-- </path>-->
</vector> </vector>
\ No newline at end of file
<?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
<?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
...@@ -45,17 +45,16 @@ ...@@ -45,17 +45,16 @@
<include layout="@layout/item_goods_category" /> <include layout="@layout/item_goods_category" />
</FrameLayout> </FrameLayout>
<ScrollView <ScrollView
android:id="@+id/scroll_category"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0.09792" android:layout_weight="0.09792"
android:descendantFocusability="afterDescendants" android:descendantFocusability="afterDescendants"
android:overScrollMode="never" android:overScrollMode="never"
android:scrollbars="none"> android:scrollbars="none">
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
android:gravity="center_horizontal"
android:orientation="vertical">
<RadioGroup <RadioGroup
android:id="@+id/group_category" android:id="@+id/group_category"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -67,8 +66,14 @@ ...@@ -67,8 +66,14 @@
<include <include
layout="@layout/item_tips" layout="@layout/item_tips"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
</LinearLayout> 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> </ScrollView>
</LinearLayout> </LinearLayout>
...@@ -76,4 +81,5 @@ ...@@ -76,4 +81,5 @@
android:id="@+id/view_trolley" android:id="@+id/view_trolley"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
</FrameLayout> </FrameLayout>
\ No newline at end of file
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
android:id="@+id/layout_test" android:id="@+id/layout_test"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
android:id="@+id/layout_sys_settings" android:id="@+id/layout_sys_settings"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
android:id="@+id/layout_version" android:id="@+id/layout_version"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
android:id="@+id/layout_machine_code" android:id="@+id/layout_machine_code"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
android:id="@+id/layout_screen" android:id="@+id/layout_screen"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
android:id="@+id/layout_presentation" android:id="@+id/layout_presentation"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
android:id="@+id/layout_logcat" android:id="@+id/layout_logcat"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/padding10" android:layout_marginEnd="@dimen/padding10"
android:foreground="?selectableItemBackground" /> android:foreground="@null" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
android:layout_height="@dimen/clear_butn_height" android:layout_height="@dimen/clear_butn_height"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/bg_clear_yes" android:background="@drawable/bg_clear_yes"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:text="是" android:text="是"
android:textColor="@color/textPrimary" android:textColor="@color/textPrimary"
android:textSize="@dimen/clear_butn_text" /> android:textSize="@dimen/clear_butn_text" />
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
android:layout_height="@dimen/clear_butn_height" android:layout_height="@dimen/clear_butn_height"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/bg_clear_no" android:background="@drawable/bg_clear_no"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:text="否" android:text="否"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="@dimen/clear_butn_text" /> android:textSize="@dimen/clear_butn_text" />
......
...@@ -3,7 +3,10 @@ ...@@ -3,7 +3,10 @@
android:id="@+id/layout_root" android:id="@+id/layout_root"
android:layout_width="@dimen/confirm_order_width" android:layout_width="@dimen/confirm_order_width"
android:layout_height="wrap_content" 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:paddingTop="@dimen/confirm_order_padding_top"
android:paddingBottom="@dimen/confirm_order_padding_bottom"> android:paddingBottom="@dimen/confirm_order_padding_bottom">
<TextView <TextView
...@@ -94,7 +97,7 @@ ...@@ -94,7 +97,7 @@
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:background="@drawable/anim_qrcode_loading" android:background="@drawable/anim_qrcode_loading"
android:visibility="invisible" /> android:visibility="invisible" />
</RelativeLayout>
<FrameLayout <FrameLayout
android:id="@+id/butn_close" android:id="@+id/butn_close"
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
android:layout_width="@dimen/ic_detail_add_size" android:layout_width="@dimen/ic_detail_add_size"
android:layout_height="@dimen/ic_detail_add_size" android:layout_height="@dimen/ic_detail_add_size"
android:background="@mipmap/jianhao" android:background="@mipmap/jianhao"
android:foreground="?selectableItemBackground" /> android:foreground="@null" />
<TextView <TextView
android:id="@+id/txt_count" android:id="@+id/txt_count"
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
android:layout_width="@dimen/ic_detail_add_size" android:layout_width="@dimen/ic_detail_add_size"
android:layout_height="@dimen/ic_detail_add_size" android:layout_height="@dimen/ic_detail_add_size"
android:background="@mipmap/jiahao" android:background="@mipmap/jiahao"
android:foreground="?selectableItemBackground" /> android:foreground="@null" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/bg_button" android:background="@drawable/bg_button"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:padding="@dimen/goods_detail_butn_padding" android:padding="@dimen/goods_detail_butn_padding"
android:text="加入购物袋" android:text="加入购物袋"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:background="@color/colorPrimary" android:background="@color/colorPrimary"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:padding="@dimen/goods_detail_butn_padding" android:padding="@dimen/goods_detail_butn_padding"
android:text="立即购买" android:text="立即购买"
android:textColor="@color/white" android:textColor="@color/white"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/sel_category_label" android:background="@drawable/sel_category_label"
android:button="@null" android:button="@null"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:gravity="center" android:gravity="center"
android:paddingHorizontal="@dimen/category_padding_hor" android:paddingHorizontal="@dimen/category_padding_hor"
android:paddingTop="@dimen/category_padding_top_noimg" android:paddingTop="@dimen/category_padding_top_noimg"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
android:id="@+id/layout_item" android:id="@+id/layout_item"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingVertical="@dimen/goods_padding_ver"> android:paddingVertical="@dimen/goods_padding_ver">
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
android:id="@+id/layout_item" android:id="@+id/layout_item"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:foreground="?selectableItemBackground"> android:foreground="@null">
<ImageView <ImageView
android:id="@+id/img_recommend" android:id="@+id/img_recommend"
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
android:layout_marginTop="@dimen/goods_detail_rule_margin_top" android:layout_marginTop="@dimen/goods_detail_rule_margin_top"
android:layout_marginEnd="@dimen/goods_detail_rule_margin_right" android:layout_marginEnd="@dimen/goods_detail_rule_margin_right"
android:background="@drawable/sel_spec_bg" android:background="@drawable/sel_spec_bg"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:gravity="center" android:gravity="center"
android:minWidth="@dimen/goods_detail_rule_width" android:minWidth="@dimen/goods_detail_rule_width"
android:paddingHorizontal="@dimen/goods_detail_rule_padding_hor" android:paddingHorizontal="@dimen/goods_detail_rule_padding_hor"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/tip_margin_top" android:layout_marginTop="@dimen/tip_margin_top"
android:button="@null" android:button="@null"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:gravity="center" android:gravity="center"
android:lines="1" android:lines="1"
android:paddingTop="@dimen/tip_padding_top" android:paddingTop="@dimen/tip_padding_top"
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
android:layout_height="@dimen/ic_checkbox" android:layout_height="@dimen/ic_checkbox"
android:background="@drawable/sel_butn_check" android:background="@drawable/sel_butn_check"
android:checked="true" android:checked="true"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:textOff="" android:textOff=""
android:textOn="" /> android:textOn="" />
<ImageView <ImageView
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
android:layout_width="@dimen/ic_subtract_size" android:layout_width="@dimen/ic_subtract_size"
android:layout_height="@dimen/ic_subtract_size" android:layout_height="@dimen/ic_subtract_size"
android:background="@mipmap/jianhao" android:background="@mipmap/jianhao"
android:foreground="?selectableItemBackground" /> android:foreground="@null" />
<TextView <TextView
android:id="@+id/txt_count" android:id="@+id/txt_count"
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -116,6 +116,6 @@ ...@@ -116,6 +116,6 @@
android:layout_width="@dimen/ic_add_size" android:layout_width="@dimen/ic_add_size"
android:layout_height="@dimen/ic_add_size" android:layout_height="@dimen/ic_add_size"
android:background="@mipmap/jiahao" android:background="@mipmap/jiahao"
android:foreground="?selectableItemBackground" /> android:foreground="@null" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/black"> android:background="@android:color/holo_red_dark">
<ImageView <ImageView
android:id="@+id/img_background1" android:id="@+id/img_background1"
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:padding="@dimen/padding10" android:padding="@dimen/padding10"
android:src="@drawable/ic_baseline_chevron_left_24" /> android:src="@drawable/ic_baseline_chevron_left_24" />
<TextView <TextView
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
android:id="@+id/butn_clear" android:id="@+id/butn_clear"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:gravity="center" android:gravity="center"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
android:layout_height="@dimen/trolley_bar_height" android:layout_height="@dimen/trolley_bar_height"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:background="@color/white" android:background="@color/white"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<RelativeLayout <RelativeLayout
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
android:layout_width="@dimen/trolley_pay_width" android:layout_width="@dimen/trolley_pay_width"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/colorPrimary" android:background="@color/colorPrimary"
android:foreground="?selectableItemBackground" android:foreground="@null"
android:text="结算" android:text="结算"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="@dimen/ts_trolley_pay" android:textSize="@dimen/ts_trolley_pay"
......
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
<dimen name="goods_price_margin">5px</dimen> <dimen name="goods_price_margin">5px</dimen>
<dimen name="category_padding_top">17px</dimen> <dimen name="category_padding_top">17px</dimen>
<dimen name="category_padding_bottom">32px</dimen> <dimen name="category_padding_bottom">32px</dimen>
<dimen name="category_padding_top_noimg">56px</dimen> <dimen name="category_padding_top_noimg">68px</dimen>
<dimen name="category_padding_bottom_noimg">70px</dimen> <dimen name="category_padding_bottom_noimg">68px</dimen>
<dimen name="category_padding_hor">35px</dimen> <dimen name="category_padding_hor">35px</dimen>
<dimen name="category_drawable_padding">10px</dimen> <dimen name="category_drawable_padding">10px</dimen>
<dimen name="category_drawable_width">100px</dimen> <dimen name="category_drawable_width">100px</dimen>
...@@ -140,37 +140,21 @@ ...@@ -140,37 +140,21 @@
<dimen name="confirm_order_text_one">62px</dimen> <dimen name="confirm_order_text_one">62px</dimen>
<dimen name="confirm_order_text_two">7px</dimen> <dimen name="confirm_order_text_two">7px</dimen>
<dimen name="interaction_padding_top">117px</dimen> <dimen name="interaction_padding_top">234px</dimen>
<dimen name="interaction_padding_left">75px</dimen> <dimen name="interaction_padding_left">150px</dimen>
<dimen name="interaction_padding_bottom">66px</dimen> <dimen name="interaction_padding_bottom">132px</dimen>
<dimen name="interaction_padding_right">58px</dimen> <dimen name="interaction_padding_right">106px</dimen>
<dimen name="interaction_text_space">40px</dimen> <dimen name="interaction_text_space">80px</dimen>
<dimen name="interaction_recommend_margin">55px</dimen> <dimen name="interaction_recommend_margin">115px</dimen>
<dimen name="interaction_goods_icon_width">230px</dimen> <dimen name="interaction_goods_icon_width">470px</dimen>
<dimen name="interaction_goods_icon_height">230px</dimen> <dimen name="interaction_goods_icon_height">470px</dimen>
<dimen name="ts_interaction_line1">130px</dimen> <dimen name="ts_interaction_line1">260px</dimen>
<dimen name="ts_interaction_line2">50px</dimen> <dimen name="ts_interaction_line2">100px</dimen>
<dimen name="ts_interaction_line3">50px</dimen> <dimen name="ts_interaction_line3">100px</dimen>
<dimen name="ts_interaction_recommend_small">60px</dimen> <dimen name="ts_interaction_recommend_small">100px</dimen>
<dimen name="ts_interaction_recommend_big">75px</dimen> <dimen name="ts_interaction_recommend_big">120px</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="ic_recommend">17px</dimen> <dimen name="ic_recommend">17px</dimen>
<dimen name="ic_clear_size">20px</dimen> <dimen name="ic_clear_size">20px</dimen>
......
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
<dimen name="goods_price_margin">5px</dimen> <dimen name="goods_price_margin">5px</dimen>
<dimen name="category_padding_top">17px</dimen> <dimen name="category_padding_top">17px</dimen>
<dimen name="category_padding_bottom">32px</dimen> <dimen name="category_padding_bottom">32px</dimen>
<dimen name="category_padding_top_noimg">20px</dimen> <dimen name="category_padding_top_noimg">68px</dimen>
<dimen name="category_padding_bottom_noimg">70px</dimen> <dimen name="category_padding_bottom_noimg">68px</dimen>
<dimen name="category_padding_hor">35px</dimen> <dimen name="category_padding_hor">35px</dimen>
<dimen name="category_drawable_padding">10px</dimen> <dimen name="category_drawable_padding">10px</dimen>
<dimen name="category_drawable_width">100px</dimen> <dimen name="category_drawable_width">100px</dimen>
...@@ -140,37 +140,37 @@ ...@@ -140,37 +140,37 @@
<dimen name="confirm_order_text_one">62px</dimen> <dimen name="confirm_order_text_one">62px</dimen>
<dimen name="confirm_order_text_two">7px</dimen> <dimen name="confirm_order_text_two">7px</dimen>
<dimen name="interaction_padding_top">117px</dimen> <!-- <dimen name="interaction_padding_top">117px</dimen>-->
<dimen name="interaction_padding_left">75px</dimen> <!-- <dimen name="interaction_padding_left">75px</dimen>-->
<dimen name="interaction_padding_bottom">66px</dimen> <!-- <dimen name="interaction_padding_bottom">66px</dimen>-->
<dimen name="interaction_padding_right">58px</dimen> <!-- <dimen name="interaction_padding_right">58px</dimen>-->
<dimen name="interaction_text_space">40px</dimen> <!-- <dimen name="interaction_text_space">40px</dimen>-->
<dimen name="interaction_recommend_margin">55px</dimen> <!-- <dimen name="interaction_recommend_margin">55px</dimen>-->
<dimen name="interaction_goods_icon_width">230px</dimen> <!-- <dimen name="interaction_goods_icon_width">230px</dimen>-->
<dimen name="interaction_goods_icon_height">230px</dimen> <!-- <dimen name="interaction_goods_icon_height">230px</dimen>-->
<dimen name="ts_interaction_line1">130px</dimen> <!-- <dimen name="ts_interaction_line1">130px</dimen>-->
<dimen name="ts_interaction_line2">50px</dimen> <!-- <dimen name="ts_interaction_line2">50px</dimen>-->
<dimen name="ts_interaction_line3">50px</dimen> <!-- <dimen name="ts_interaction_line3">50px</dimen>-->
<dimen name="ts_interaction_recommend_small">60px</dimen> <!-- <dimen name="ts_interaction_recommend_small">60px</dimen>-->
<dimen name="ts_interaction_recommend_big">75px</dimen> <!-- <dimen name="ts_interaction_recommend_big">75px</dimen>-->
<!-- <dimen name="interaction_padding_top">234px</dimen>--> <dimen name="interaction_padding_top">234px</dimen>
<!-- <dimen name="interaction_padding_left">150px</dimen>--> <dimen name="interaction_padding_left">150px</dimen>
<!-- <dimen name="interaction_padding_bottom">132px</dimen>--> <dimen name="interaction_padding_bottom">132px</dimen>
<!-- <dimen name="interaction_padding_right">106px</dimen>--> <dimen name="interaction_padding_right">106px</dimen>
<!-- <dimen name="interaction_text_space">80px</dimen>--> <dimen name="interaction_text_space">80px</dimen>
<!-- <dimen name="interaction_recommend_margin">115px</dimen>--> <dimen name="interaction_recommend_margin">115px</dimen>
<!-- <dimen name="interaction_goods_icon_width">470px</dimen>--> <dimen name="interaction_goods_icon_width">470px</dimen>
<!-- <dimen name="interaction_goods_icon_height">470px</dimen>--> <dimen name="interaction_goods_icon_height">470px</dimen>
<!-- <dimen name="ts_interaction_line1">260px</dimen>--> <dimen name="ts_interaction_line1">260px</dimen>
<!-- <dimen name="ts_interaction_line2">100px</dimen>--> <dimen name="ts_interaction_line2">100px</dimen>
<!-- <dimen name="ts_interaction_line3">100px</dimen>--> <dimen name="ts_interaction_line3">100px</dimen>
<!-- <dimen name="ts_interaction_recommend_small">120px</dimen>--> <dimen name="ts_interaction_recommend_small">100px</dimen>
<!-- <dimen name="ts_interaction_recommend_big">150px</dimen>--> <dimen name="ts_interaction_recommend_big">120px</dimen>
<dimen name="ic_recommend">17px</dimen> <dimen name="ic_recommend">17px</dimen>
<dimen name="ic_clear_size">20px</dimen> <dimen name="ic_clear_size">20px</dimen>
......
...@@ -16,9 +16,13 @@ allprojects { ...@@ -16,9 +16,13 @@ allprojects {
repositories { repositories {
google() google()
jcenter() jcenter()
mavenCentral()
maven { maven {
url "https://maven.aliyun.com/nexus/content/repositories/releases/" url "https://maven.aliyun.com/nexus/content/repositories/releases/"
} }
maven {
url 'https://jitpack.io'
}
} }
} }
......
## 未解决事项 TODO ## 未解决事项 TODO
***** *****
1、设置字体 购物袋总数量,购物袋item数量,商品详情数量
2、设置字体 购物袋总金额
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment