diff --git a/app/src/main/java/com/shuwei/dish/match/dialog/CommonDialog.kt b/app/src/main/java/com/shuwei/dish/match/dialog/CommonDialog.kt index 1494a67..3247361 100644 --- a/app/src/main/java/com/shuwei/dish/match/dialog/CommonDialog.kt +++ b/app/src/main/java/com/shuwei/dish/match/dialog/CommonDialog.kt @@ -1,6 +1,5 @@ package com.shuwei.dish.match.dialog -import android.app.Activity import android.app.Dialog import android.content.Context import android.graphics.drawable.ColorDrawable @@ -8,13 +7,12 @@ import android.os.Bundle import android.view.View import android.view.Window import android.widget.LinearLayout -import androidx.annotation.StyleRes import androidx.core.view.updateLayoutParams import com.shuwei.dish.match.base.DeviceRole import com.shuwei.dish.match.base.GlobalData import com.shuwei.dish.match.databinding.DialogCommonBinding import com.shuwei.dish.match.utils.ext.dp -import java.lang.ref.WeakReference +import com.shuwei.dish.match.R open class CommonDialog( context: Context @@ -77,7 +75,7 @@ open class CommonDialog( // 透明背景,让 shape_dialog_bg 的阴影层正常显示 setBackgroundDrawable(ColorDrawable()) // 应用缩放+淡入淡出动画 - setWindowAnimations(com.shuwei.dish.match.R.style.CommonDialogAnimation) + setWindowAnimations(R.style.CommonDialogAnimation) } // 主/从设备边距微调:主设备内容区域更大,适当增加上下留白 val verticalMargin = if (GlobalData.deviceRole == DeviceRole.MASTER) 48.dp else 36.dp diff --git a/app/src/main/java/com/shuwei/dish/match/entity/DataBean.kt b/app/src/main/java/com/shuwei/dish/match/entity/DataBean.kt index 825050f..099124c 100644 --- a/app/src/main/java/com/shuwei/dish/match/entity/DataBean.kt +++ b/app/src/main/java/com/shuwei/dish/match/entity/DataBean.kt @@ -5,7 +5,6 @@ import android.net.Uri import java.io.File data class HomeModeBean( - var modeName: String = "", var modeDesc: String = "", var modeIconId: Int = 0, @@ -14,34 +13,6 @@ data class HomeModeBean( var onClick: (() -> Unit)? = null ) -data class FoodRecordBean( - var records: MutableList? = null, - var total: Int, - var size: Int, - var current: Int, - var page: Int -) - -data class GoodsRecordBean( - var records: MutableList? = null, - var total: Int, - var size: Int, - var current: Int, - var page: Int -) - -data class SeasoningRecordBean( - var records: MutableList? = null, - var total: Int, - var size: Int, - var current: Int, - var page: Int -) - -data class ResetReasoningRecord( - val list: MutableList -) - data class FoodCollectionBean( var imageUri: Uri? = null, var bitmap: Bitmap? = null, @@ -80,25 +51,4 @@ data class FoodCollectionBean( } } -//data class DishDetailEntity( -// var foodId: String? = null, -// var foodWeight: Double? = null, -// var foodRealWeight: Double? = null, -// var voList: List? = null -//) - -//data class DishPartEntity( -// var foodId: String? = null, -// var foodName: String? = null, -// var foodWeight: Int? = null, -// var useWeight: Int? = null, -// var useRealWeight: Int? = null, -// var goodsId: Int? = null, -// var goodsName: String? = null, -// var materialType: Int? = null, -// var isSetFinished: Boolean = false, -// var isItemClicked: Boolean = false, -// var isSamplingPage: Boolean = false -//) - diff --git a/app/src/main/java/com/shuwei/dish/match/net/ApiService.kt b/app/src/main/java/com/shuwei/dish/match/net/ApiService.kt index 6068323..f3092bd 100644 --- a/app/src/main/java/com/shuwei/dish/match/net/ApiService.kt +++ b/app/src/main/java/com/shuwei/dish/match/net/ApiService.kt @@ -68,46 +68,4 @@ interface ApiService { @Body param: MutableMap ): ApiResponse?> - - - - - - -// /** -// *获取配置信息 -// */ -// @GET("/equipment/stEquipment/queryByEquipmentCode") -// suspend fun getDeviceInfo( -// @Query("equipmentCode") equipmentCode: String, -// @Query("appVersion") appVersion: String = App.appVersion -// ): ApiResponse -// -// @GET -// suspend fun getAccessToken( -// @Url url: String = UrlConfig.GET_ACCESS_TOKEN, -// @Query("qrcodeId") qrcodeId: String -// ): ApiResponse -// -// @GET -// suspend fun getShelfList( -// @Url url: String = UrlConfig.GET_SHELF_LIST, -// @Query("deviceId") deviceId: String -// ): ApiResponse -// -// @GET -// suspend fun getGoodsList( -// @Url url: String = UrlConfig.GET_GOODS_LIST, -// @Query("canteenId") canteenId: String = "0", -// @Query("goodsName") goodsName: String? = null, -// @Query("pageNo") pageNo: Int = 1, -// @Query("pageSize") pageSize: Int = 50 -// ): ApiResponse?> -// -// @POST -// suspend fun saveShelfGoodsList( -// @Url url: String = UrlConfig.SAVE_SHELF_GOODS_LIST, -// @Body body: ShelfBody -// ): ApiResponse - } \ No newline at end of file diff --git a/app/src/main/res/drawable/shape_white_dc_15_corners.xml b/app/src/main/res/drawable/shape_white_dc_15_corners.xml new file mode 100644 index 0000000..7853160 --- /dev/null +++ b/app/src/main/res/drawable/shape_white_dc_15_corners.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_master_scale.xml b/app/src/main/res/layout/activity_master_scale.xml index 7e3babb..24534c4 100644 --- a/app/src/main/res/layout/activity_master_scale.xml +++ b/app/src/main/res/layout/activity_master_scale.xml @@ -4,7 +4,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" - tools:background="@color/bg_color"> + tools:background="@drawable/bg_other_page"> @@ -30,18 +29,16 @@ app:layout_constraintTop_toBottomOf="@id/tvMasterTitle" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" - android:layout_marginBottom="16dp" - android:textColor="@color/home_sub_title" + android:textColor="@color/white" android:textSize="24sp" tools:text="已发现设备:3 台" /> @@ -55,7 +55,7 @@ android:gravity="center_vertical" android:layout_marginHorizontal="32dp" android:layout_marginTop="50dp" - android:background="@drawable/shape_white_fb_15_corners2" + android:background="@drawable/shape_white_dc_15_corners" android:foreground="?android:attr/selectableItemBackground" android:clipToOutline="true"> @@ -86,7 +86,7 @@ android:gravity="center_vertical" android:layout_marginHorizontal="32dp" android:layout_marginTop="50dp" - android:background="@drawable/shape_white_fb_15_corners2" + android:background="@drawable/shape_white_dc_15_corners" android:foreground="?android:attr/selectableItemBackground" android:clipToOutline="true">