Commit 0eb5f0e1 by 宁斌

1、解決butterknife R2 問題導致項目整合編譯不過問題

2、增加食品點選送單流程
parent e82b2c21
......@@ -18,6 +18,8 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath'com.jakewharton:butterknife-gradle-plugin:10.2.1'
classpath 'com.novoda:bintray-release:0.9.2'
classpath 'com.billy.android:cc-register:1.1.2'
......
package com.billy.android.register.cc
import com.billy.android.register.RegisterPlugin
import groovy.util.logging.Log
import org.gradle.api.Project
import org.gradle.util.GradleVersion
import java.util.logging.Logger
import java.util.regex.Pattern
/**
......
......@@ -5,7 +5,8 @@
// 完成组件、拦截器及跨进程json解释器等CC库自身需要的自动注册功能
// 支持新增自定义的其它自动注册功能,参考AutoRegister,用法参考cc-settings-demo.gradle
project.apply plugin: 'cc-register'
project.dependencies.add('api', "com.billy.android:cc:2.1.6") //用最新版
project.dependencies.add('api', project(':cc')) //用最新版
//project.dependencies.add('api', "com.billy.android:cc:2.1.6") //用最新版
dependencies {
if (project.name != 'public-base' && project.name != 'arms' && project.name !='public-database') {
......@@ -32,6 +33,7 @@ dependencies {
implementation rootProject.ext.dependencies["multidex"]
implementation rootProject.ext.dependencies["constraintlayout"]
implementation 'org.jetbrains:annotations:15.0'
}
//此文件是作为组件化配置的公共gradle脚本文件,在每个组件中都apply此文件,下载到工程根目录后,可以在下方添加一些自己工程中通用的配置
......
......@@ -34,7 +34,8 @@ android {
dependencies {
//发布到bintray时,要写成compile才行
implementation "com.billy.android:pools:0.0.6"
compile "com.billy.android:pools:0.0.6"
// compileOnly project(':pools')
compileOnly rootProject.ext.dependencies["appcompat-v7"]
compileOnly project(':android_internal')
}
......
......@@ -12,9 +12,9 @@ ext {
version = [
androidSupportSdkVersion: "28+",
retrofitSdkVersion : '2.3.0',
dagger2SdkVersion : "2.14.1",
dagger2SdkVersion : "2.19",
glideSdkVersion : "4.9.0",
butterknifeSdkVersion : "10.1.0",
butterknifeSdkVersion : "10.2.1",
rxlifecycleSdkVersion : "1.0",
rxlifecycle2SdkVersion : "2.2.1",
espressoSdkVersion : "3.0.1",
......
apply from: rootProject.file('cc-settings.gradle')
apply plugin: 'com.jakewharton.butterknife'
android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"]
......@@ -35,16 +36,26 @@ android {
}
}
}
lintOptions {
disable 'InvalidPackage'
disable "ResourceType"
abortOnError false
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
annotationProcessor rootProject.ext.dependencies["dagger2-compiler"]
// test
// if (project.ext.runAsApp) {
annotationProcessor rootProject.ext.dependencies["dagger2-compiler"]
debugImplementation rootProject.ext.dependencies["canary-debug"]
releaseImplementation rootProject.ext.dependencies["canary-release"]
testImplementation rootProject.ext.dependencies["canary-release"]
// }else {
// compileOnly rootProject.ext.dependencies["dagger2-compiler"]
// compileOnly rootProject.ext.dependencies["canary-debug"]
// compileOnly rootProject.ext.dependencies["canary-release"]
// compileOnly rootProject.ext.dependencies["canary-release"]
// }
testImplementation rootProject.ext.dependencies["junit"]
debugImplementation rootProject.ext.dependencies["canary-debug"]
releaseImplementation rootProject.ext.dependencies["canary-release"]
testImplementation rootProject.ext.dependencies["canary-release"]
}
......@@ -58,7 +58,6 @@
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_LOGS" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
</manifest>
\ No newline at end of file
package com.gingersoft.gsa.cloud.download;
import android.content.Context;
import android.text.TextUtils;
import com.billy.cc.core.component.CC;
import com.billy.cc.core.component.CCResult;
import com.billy.cc.core.component.CCUtil;
import com.billy.cc.core.component.IComponent;
import com.gingersoft.gsa.cloud.base.utils.gson.GsonUtils;
import com.gingersoft.gsa.cloud.database.bean.Food;
import com.gingersoft.gsa.cloud.database.utils.FoodDaoUtils;
import com.gingersoft.gsa.cloud.download.mvp.ui.activity.DownloadActivity;
import java.util.List;
public class ComponentDownload implements IComponent {
......@@ -21,23 +29,28 @@ public class ComponentDownload implements IComponent {
* 组件被调用时的入口
* 要确保每个逻辑分支都会调用到CC.sendCCResult,
* 包括try-catch,if-else,switch-case-default,startActivity
*
* @param cc 组件调用对象,可从此对象中获取相关信息
* @return true:将异步调用CC.sendCCResult(...),用于异步实现相关功能,例如:文件加载、网络请求等
* false:会同步调用CC.sendCCResult(...),即在onCall方法return之前调用,否则将被视为不合法的实现
* false:会同步调用CC.sendCCResult(...),即在onCall方法return之前调用,否则将被视为不合法的实现
*/
@Override
public boolean onCall(CC cc) {
String actionName = cc.getActionName();
Context context = cc.getContext();
switch (actionName) {
case "showDownloadActivity":
openActivity(cc);
break;
case "getLifecycleFragment":
case "getFunctionlist":
//demo for provide fragment object to other component
getLifecycleFragment(cc);
getFunctionlist(cc);
break;
case "lifecycleFragment.addText":
lifecycleFragmentDoubleText(cc);
case "getFoodGroupList":
getFoodGroupList(cc);
break;
case "getFoodListByParentId":
getFoodListByParentId(cc);
break;
case "getInfo":
getInfo(cc);
......@@ -51,19 +64,45 @@ public class ComponentDownload implements IComponent {
return false;
}
private void lifecycleFragmentDoubleText(CC cc) {
// LifecycleFragment lifecycleFragment = cc.getParamItem("fragment");
// if (lifecycleFragment != null) {
// String text = cc.getParamItem("text", "");
// lifecycleFragment.addText(text);
// CC.sendCCResult(cc.getCallId(), CCResult.success());
// } else {
// CC.sendCCResult(cc.getCallId(), CCResult.error("no fragment params"));
// }
private void getFunctionlist(CC cc) {
String parentId = cc.getParamItem("parentId");
if (TextUtils.isEmpty(parentId)) {
} else {
}
}
private void getFoodGroupList(CC cc) {
List<Food> foodGroupList = queryDB_FoodGroupList(cc.getContext());
if (foodGroupList != null) {
CCResult ccResult = CCResult.success("foodGroupList", GsonUtils.GsonString(foodGroupList));
CC.sendCCResult(cc.getCallId(), ccResult);
} else {
CC.sendCCResult(cc.getCallId(), CCResult.error("foodGroupList is null"));
}
}
private void getFoodListByParentId(CC cc) {
int parentId = cc.getParamItem("parentId");
List<Food> foodList = queryDB_FoodList(cc.getContext(), parentId);
if (foodList != null) {
CC.sendCCResult(cc.getCallId(), CCResult.success("foodList", GsonUtils.GsonString(foodList)));
} else {
CC.sendCCResult(cc.getCallId(), CCResult.error("foodList is null"));
}
}
public List<Food> queryDB_FoodGroupList(Context context) {
FoodDaoUtils foodDaoUtils = new FoodDaoUtils(context);
return foodDaoUtils.queryFoodGroupByQueryBuilder();
}
private void getLifecycleFragment(CC cc) {
// CC.sendCCResult(cc.getCallId(), CCResult.successWithNoKey(new LifecycleFragment()));
public List<Food> queryDB_FoodList(Context context, int parentId) {
FoodDaoUtils foodDaoUtils = new FoodDaoUtils(context);
return foodDaoUtils.queryFoodByQueryBuilder(parentId);
}
private void getInfo(CC cc) {
......
package com.gingersoft.gsa.cloud.download.mvp.contract;
import com.gingersoft.gsa.cloud.download.mvp.model.bean.FoodBean;
import android.content.Context;
import com.gingersoft.gsa.cloud.base.bean.FoodBean;
import com.gingersoft.gsa.cloud.database.bean.Food;
import com.gingersoft.gsa.cloud.download.mvp.model.bean.FunctionBean;
import com.jess.arms.base.DefaultAdapter;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
import java.util.HashMap;
import java.util.List;
import androidx.recyclerview.widget.RecyclerView;
import io.reactivex.Observable;
......@@ -35,6 +40,10 @@ public interface DownloadContract {
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface Model extends IModel {
List<Food> queryDB_FoodGroupList(Context context);
List<Food> queryDB_FoodList(Context context, int parentId);
Observable<FunctionBean> downFunctionList();
Observable<FoodBean> downFoodList(String restaurantId);
......
package com.gingersoft.gsa.cloud.download.mvp.model;
import android.app.Application;
import android.content.Context;
import com.gingersoft.gsa.cloud.download.mvp.model.bean.FoodBean;
import com.gingersoft.gsa.cloud.base.bean.FoodBean;
import com.gingersoft.gsa.cloud.database.bean.Food;
import com.gingersoft.gsa.cloud.database.utils.FoodDaoUtils;
import com.gingersoft.gsa.cloud.download.mvp.model.bean.FunctionBean;
import com.gingersoft.gsa.cloud.download.mvp.model.service.DownloadService;
import com.google.gson.Gson;
......@@ -11,6 +14,9 @@ import com.jess.arms.mvp.BaseModel;
import com.jess.arms.di.scope.ActivityScope;
import javax.inject.Inject;
import com.gingersoft.gsa.cloud.download.mvp.contract.DownloadContract;
import java.util.List;
import io.reactivex.Observable;
......@@ -46,6 +52,18 @@ public class DownloadModel extends BaseModel implements DownloadContract.Model {
}
@Override
public List<Food> queryDB_FoodGroupList(Context context) {
FoodDaoUtils foodDaoUtils = new FoodDaoUtils(context);
return foodDaoUtils.queryFoodGroupByQueryBuilder();
}
@Override
public List<Food> queryDB_FoodList(Context context, int parentId) {
FoodDaoUtils foodDaoUtils = new FoodDaoUtils(context);
return foodDaoUtils.queryFoodByQueryBuilder(parentId);
}
@Override
public Observable<FunctionBean> downFunctionList() {
return mRepositoryManager.obtainRetrofitService(DownloadService.class)
.downFunctionList();
......@@ -56,4 +74,7 @@ public class DownloadModel extends BaseModel implements DownloadContract.Model {
return mRepositoryManager.obtainRetrofitService(DownloadService.class)
.downFoodList(restaurantId);
}
}
\ No newline at end of file
......@@ -21,6 +21,7 @@ public class FunctionBean {
*/
private boolean success;
private String errMsg;
private double sysTime;
private List<Function> data;
......@@ -32,6 +33,14 @@ public class FunctionBean {
this.success = success;
}
public String getErrMsg() {
return errMsg;
}
public void setErrMsg(String errMsg) {
this.errMsg = errMsg;
}
public double getSysTime() {
return sysTime;
}
......
package com.gingersoft.gsa.cloud.download.mvp.model.service;
import com.gingersoft.gsa.cloud.download.mvp.model.bean.FoodBean;
import com.gingersoft.gsa.cloud.base.bean.FoodBean;
import com.gingersoft.gsa.cloud.download.mvp.model.bean.FunctionBean;
import io.reactivex.Observable;
import me.jessyan.retrofiturlmanager.RetrofitUrlManager;
import retrofit2.http.GET;
import retrofit2.http.Query;
import retrofit2.http.Url;
/**
* Created by Wyh on 2019/12/20.
......
package com.gingersoft.gsa.cloud.download.mvp.presenter;
import android.app.Application;
import android.util.Log;
import com.billy.cc.core.component.CC;
import com.gingersoft.gsa.cloud.base.Api;
import com.gingersoft.gsa.cloud.base.bean.FoodBean;
import com.gingersoft.gsa.cloud.base.utils.constans.HttpsConstans;
import com.gingersoft.gsa.cloud.database.bean.Food;
import com.gingersoft.gsa.cloud.database.bean.Function;
import com.gingersoft.gsa.cloud.database.greendao.FoodDao;
import com.gingersoft.gsa.cloud.database.utils.FoodDaoUtils;
import com.gingersoft.gsa.cloud.database.utils.FunctionDaoUtils;
import com.gingersoft.gsa.cloud.download.mvp.model.bean.DataDownLoadState;
import com.gingersoft.gsa.cloud.download.mvp.model.bean.FoodBean;
import com.gingersoft.gsa.cloud.download.mvp.model.bean.FunctionBean;
import com.gingersoft.gsa.cloud.download.mvp.ui.activity.DownloadActivity;
import com.gingersoft.gsa.cloud.download.mvp.ui.adapter.DataDownLoadAdapter;
......@@ -23,7 +20,6 @@ import com.jess.arms.http.imageloader.ImageLoader;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.annotations.NonNull;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
......@@ -32,14 +28,12 @@ import me.jessyan.rxerrorhandler.handler.ErrorHandleSubscriber;
import javax.inject.Inject;
import com.gingersoft.gsa.cloud.download.mvp.contract.DownloadContract;
import com.jess.arms.mvp.IView;
import com.jess.arms.utils.DeviceUtils;
import com.jess.arms.utils.RxLifecycleUtils;
import java.net.URLEncoder;
import org.simple.eventbus.EventBus;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
......@@ -219,12 +213,14 @@ public class DownloadPresenter extends BasePresenter<DownloadContract.Model, Dow
}
private void endDownReturn() {
CC.obtainBuilder("Component.Main")
.setActionName("showMainActivity")
.build()
.call();
mRootView.killMyself();
}
public void initDataDownItem() {
......
......@@ -4,6 +4,7 @@ import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import com.gingersoft.gsa.cloud.download.R;
import com.gingersoft.gsa.cloud.download.R2;
import com.gingersoft.gsa.cloud.download.di.component.DaggerDownloadComponent;
import com.gingersoft.gsa.cloud.ui.dialog.LoadingDialog;
import com.jess.arms.base.BaseActivity;
......@@ -13,6 +14,9 @@ import com.jess.arms.utils.ArmsUtils;
import com.gingersoft.gsa.cloud.download.mvp.contract.DownloadContract;
import com.gingersoft.gsa.cloud.download.mvp.presenter.DownloadPresenter;
import com.qmuiteam.qmui.widget.QMUITopBar;
import org.simple.eventbus.EventBus;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
......@@ -36,9 +40,9 @@ import static com.jess.arms.utils.Preconditions.checkNotNull;
*/
public class DownloadActivity extends BaseActivity<DownloadPresenter> implements DownloadContract.View {
@BindView(R.id.topbar)
@BindView(R2.id.topbar)
QMUITopBar mTopBar;
@BindView(R.id.recycle_download)
@BindView(R2.id.recycle_download)
RecyclerView recycle_download;
......@@ -53,6 +57,11 @@ public class DownloadActivity extends BaseActivity<DownloadPresenter> implements
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public int initView(@Nullable Bundle savedInstanceState) {
return R.layout.download_data_activity_download; //如果你不需要框架帮你设置 setContentView(id) 需要自行设置,请返回 0
}
......
......@@ -6,6 +6,7 @@ import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.gingersoft.gsa.cloud.download.R;
import com.gingersoft.gsa.cloud.download.R2;
import com.gingersoft.gsa.cloud.download.mvp.model.bean.DataDownLoadState;
import com.jess.arms.base.BaseHolder;
import com.jess.arms.base.DefaultAdapter;
......@@ -46,11 +47,11 @@ public class DataDownLoadAdapter extends DefaultAdapter<DataDownLoadState> {
class DataDownLoadItemHolder extends BaseHolder<DataDownLoadState> {
@BindView(R.id.iv_state)
@BindView(R2.id.iv_state)
ImageView iv_state;
@BindView(R.id.tv_title)
@BindView(R2.id.tv_title)
TextView tv_title;
@BindView(R.id.pb_progress)
@BindView(R2.id.pb_progress)
ProgressBar pb_progress;
public DataDownLoadItemHolder(View itemView) {
......
apply from: rootProject.file('cc-settings.gradle')
apply plugin: 'com.jakewharton.butterknife'
android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"]
......@@ -19,6 +20,7 @@ android {
targetSdkVersion rootProject.ext.android["targetSdkVersion"]
versionCode rootProject.ext.android["versionCode"]
versionName rootProject.ext.android["versionName"]
multiDexEnabled true
}
resourcePrefix "main"
......@@ -38,14 +40,16 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// if (project.ext.runAsApp) {
annotationProcessor rootProject.ext.dependencies["dagger2-compiler"]
// test
testImplementation rootProject.ext.dependencies["junit"]
debugImplementation rootProject.ext.dependencies["canary-debug"]
releaseImplementation rootProject.ext.dependencies["canary-release"]
testImplementation rootProject.ext.dependencies["canary-release"]
// }else {
// compileOnly rootProject.ext.dependencies["dagger2-compiler"]
// compileOnly rootProject.ext.dependencies["canary-debug"]
// compileOnly rootProject.ext.dependencies["canary-release"]
// compileOnly rootProject.ext.dependencies["canary-release"]
// }
testImplementation rootProject.ext.dependencies["junit"]
}
......@@ -75,15 +75,16 @@ public class MainPresenter extends BasePresenter<MainContract.Model, MainContrac
public void initItemClickListener(Context context) {
mAdapter.setOnItemClickListener(new FunctionAdapter.OnItemClickListener() {
@Override
public void onItemClick(int position) {
String clas = mList.get(position).getResUrl();
if (TextUtils.isEmpty(clas)) {
Intent intent = null;
try {
intent = new Intent(context, Class.forName(clas));
Intent intent = new Intent(context, Class.forName(clas));
context.startActivity(intent);
} catch (ClassNotFoundException e) {
......
......@@ -6,9 +6,12 @@ import android.view.KeyEvent;
import android.view.View;
import android.widget.BaseAdapter;
import android.widget.GridView;
import com.billy.cc.core.component.CC;
import com.gingersoft.gsa.cloud.database.bean.Function;
import com.gingersoft.gsa.cloud.database.utils.FunctionDaoUtils;
import com.gingersoft.gsa.cloud.main.R;
import com.gingersoft.gsa.cloud.main.R2;
import com.gingersoft.gsa.cloud.main.di.component.DaggerMainComponent;
import com.gingersoft.gsa.cloud.main.mvp.contract.MainContract;
import com.gingersoft.gsa.cloud.main.mvp.presenter.MainPresenter;
......@@ -39,9 +42,9 @@ import static com.jess.arms.utils.Preconditions.checkNotNull;
*/
public class MainActivity extends BaseActivity<MainPresenter> implements MainContract.View {
@BindView(R.id.topbar)
@BindView(R2.id.topbar)
QMUITopBar mTopBar;
@BindView(R.id.gv_function)
@BindView(R2.id.gv_function)
GridView gv_function;
......@@ -65,16 +68,8 @@ public class MainActivity extends BaseActivity<MainPresenter> implements MainCon
mPresenter.initAdapter(this);
mPresenter.initItemClickListener(this);
initFunction();
}
private void initFunction() {
FunctionDaoUtils functionDao = new FunctionDaoUtils(this);
List<Function> functionList = functionDao.queryAllFunction();
}
@Override
public void initIntent() {
......@@ -86,6 +81,15 @@ public class MainActivity extends BaseActivity<MainPresenter> implements MainCon
mTopBar.setBackgroundColor(ContextCompat.getColor(this, R.color.theme_color));
mTopBar.addLeftBackImageButton().setVisibility(View.INVISIBLE);
mTopBar.setTitle("首頁");
mTopBar.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
CC.obtainBuilder("Component.Table")
.setActionName("showTableActivity")
.build()
.call();
}
});
}
@Override
......
......@@ -2,6 +2,8 @@ package com.gingersoft.cloud.gsa;
import org.junit.Test;
import java.math.BigDecimal;
import static org.junit.Assert.*;
/**
......@@ -10,8 +12,16 @@ import static org.junit.Assert.*;
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
BigDecimal bigDecimal = new BigDecimal(13.456);
// BigDecimal bigDecimal2 = new BigDecimal(1.56);
System.out.println("bigDecimal: "+bigDecimal.setScale(2, BigDecimal.ROUND_DOWN).doubleValue());
}
}
\ No newline at end of file
apply from: rootProject.file('cc-settings.gradle')
apply plugin: 'com.jakewharton.butterknife'
android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"]
......@@ -19,6 +20,12 @@ android {
targetSdkVersion rootProject.ext.android["targetSdkVersion"]
versionCode rootProject.ext.android["versionCode"]
versionName rootProject.ext.android["versionName"]
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
includeCompileClasspath true
}
}
}
resourcePrefix "meal"
......@@ -38,12 +45,21 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
annotationProcessor rootProject.ext.dependencies["dagger2-compiler"]
// if (project.ext.runAsApp) {
annotationProcessor rootProject.ext.dependencies["dagger2-compiler"]
debugImplementation rootProject.ext.dependencies["canary-debug"]
releaseImplementation rootProject.ext.dependencies["canary-release"]
testImplementation rootProject.ext.dependencies["canary-release"]
// }else {
// compileOnly rootProject.ext.dependencies["dagger2-compiler"]
// compileOnly rootProject.ext.dependencies["canary-debug"]
// compileOnly rootProject.ext.dependencies["canary-release"]
// compileOnly rootProject.ext.dependencies["canary-release"]
// }
// test
testImplementation rootProject.ext.dependencies["junit"]
debugImplementation rootProject.ext.dependencies["canary-debug"]
releaseImplementation rootProject.ext.dependencies["canary-release"]
testImplementation rootProject.ext.dependencies["canary-release"]
// debugImplementation rootProject.ext.dependencies["canary-debug"]
// releaseImplementation rootProject.ext.dependencies["canary-release"]
// testImplementation rootProject.ext.dependencies["canary-release"]
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gingersoft.gsa.cloud.mealstand">
package="com.gingersoft.gsa.cloud.meal">
<application>
<activity android:name=".mvp.ui.activity.MealStandActivity">
......
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gingersoft.gsa.cloud.mealstand">
package="com.gingersoft.gsa.cloud.meal">
<application
android:name="com.gingersoft.gsa.cloud.base.application.GsaCloudApplication"
......@@ -9,9 +9,12 @@
android:label="@string/meal_app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme.Base">
android:theme="@style/AppTheme">
<activity android:name=".mvp.ui.activity.MealStandActivity">
<activity
android:name="com.gingersoft.gsa.cloud.meal.mvp.ui.activity.MealStandActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
......@@ -31,6 +34,7 @@
android:name="design_height_in_dp"
android:value="540" />
</application>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
......
package com.gingersoft.gsa.cloud.mealstand;
package com.gingersoft.gsa.cloud.meal;
import com.billy.cc.core.component.CC;
import com.billy.cc.core.component.CCResult;
import com.billy.cc.core.component.CCUtil;
import com.billy.cc.core.component.IComponent;
import com.gingersoft.gsa.cloud.mealstand.mvp.ui.activity.MealStandActivity;
import com.gingersoft.gsa.cloud.database.bean.Food;
import com.gingersoft.gsa.cloud.meal.mvp.ui.activity.MealStandActivity;
import java.util.List;
public class ComponentMealStand implements IComponent {
......@@ -20,9 +23,10 @@ public class ComponentMealStand implements IComponent {
* 组件被调用时的入口
* 要确保每个逻辑分支都会调用到CC.sendCCResult,
* 包括try-catch,if-else,switch-case-default,startActivity
*
* @param cc 组件调用对象,可从此对象中获取相关信息
* @return true:将异步调用CC.sendCCResult(...),用于异步实现相关功能,例如:文件加载、网络请求等
* false:会同步调用CC.sendCCResult(...),即在onCall方法return之前调用,否则将被视为不合法的实现
* false:会同步调用CC.sendCCResult(...),即在onCall方法return之前调用,否则将被视为不合法的实现
*/
@Override
public boolean onCall(CC cc) {
......
package com.gingersoft.gsa.cloud.meal.app;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 创建日期:2020-01-08
* 修订历史:2020-01-08
* 描述:
*/
public interface GoldConstants {
int DetailColCount = 5;
}
package com.gingersoft.gsa.cloud.meal.app;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 创建日期:2020-01-09
* 修订历史:2020-01-09
* 描述:
*/
public class OpenTableContract {
private String TAG = getClass().getSimpleName();
private static OpenTableContract sDefaultOpenTableManage;
public OpenTableContract() {
}
public static OpenTableContract getDefault() {
if (sDefaultOpenTableManage == null) {
sDefaultOpenTableManage = new OpenTableContract();
}
return sDefaultOpenTableManage;
}
}
package com.gingersoft.gsa.cloud.mealstand.di.component;
package com.gingersoft.gsa.cloud.meal.di.component;
import dagger.BindsInstance;
import dagger.Component;
import com.jess.arms.di.component.AppComponent;
import com.gingersoft.gsa.cloud.mealstand.di.module.MealStandModule;
import com.gingersoft.gsa.cloud.mealstand.mvp.contract.MealStandContract;
import com.gingersoft.gsa.cloud.meal.di.module.MealStandModule;
import com.gingersoft.gsa.cloud.meal.mvp.contract.MealStandContract;
import com.jess.arms.di.scope.ActivityScope;
import com.gingersoft.gsa.cloud.mealstand.mvp.ui.activity.MealStandActivity;
import com.gingersoft.gsa.cloud.meal.mvp.ui.activity.MealStandActivity;
/**
......
package com.gingersoft.gsa.cloud.mealstand.di.module;
import com.jess.arms.di.scope.ActivityScope;
package com.gingersoft.gsa.cloud.meal.di.module;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import com.gingersoft.gsa.cloud.mealstand.mvp.contract.MealStandContract;
import com.gingersoft.gsa.cloud.mealstand.mvp.model.MealStandModel;
import com.gingersoft.gsa.cloud.meal.mvp.contract.MealStandContract;
import com.gingersoft.gsa.cloud.meal.mvp.model.MealStandModel;
/**
......
package com.gingersoft.gsa.cloud.mealstand.mvp.contract;
package com.gingersoft.gsa.cloud.meal.mvp.contract;
import android.app.Activity;
import android.widget.BaseAdapter;
import com.gingersoft.gsa.cloud.base.bean.BaseRespose;
import com.gingersoft.gsa.cloud.base.bean.FoodBean;
import com.gingersoft.gsa.cloud.database.bean.Food;
import com.gingersoft.gsa.cloud.meal.mvp.model.bean.request.SendOrderRequest;
import com.jess.arms.base.DefaultAdapter;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
import java.util.List;
import androidx.recyclerview.widget.RecyclerView;
import io.reactivex.Observable;
import okhttp3.RequestBody;
/**
* ================================================
......@@ -20,10 +34,73 @@ public interface MealStandContract {
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
interface View extends IView {
boolean isInitFineItemLayout();
void initFineItemTabBarViewPage();
void showFinePage();
void setPluMode();
void resetPluMode();
void recordOperat(boolean isPressButtonSound);
void showChoosePeopleNumDialog(boolean isNeedCancel);
void setPrinterLocalmachine(boolean isPrint);
void setTableInfoDialogAdapter(BaseAdapter adapter);
void setSelectFoodAdapter(RecyclerView.Adapter adapter);
void setFoodGroupAdapter(DefaultAdapter adapter);
void setFoodAdapter(DefaultAdapter adapter);
void setComboAdapter(DefaultAdapter adapter);
void setDiscountAdapter(DefaultAdapter adapter);
void setSelectFoodRecycleLayoutManager();
void setFoodGroupRecycleLayoutManager(int orientation);
void setFoodRecycleLayoutManager(int orientation);
void setComboRecycleLayoutManager(int orientation);
void setDiscountRecycleLayoutManager(int orientation);
void setFoodGroupRecycleSpanCount(int size);
void setFoodRecycleSpanCount(int size);
void setComboRecycleSpanCount(int size);
void setDiscountRecycleSpanCount(int size);
void showViewModeVisibility(int... viewMode);
void showModifyLayoutVisibility(boolean show);
Activity getActivity();
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface Model extends IModel {
Observable<BaseRespose> loadOrder(RequestBody requestBody);
Observable<BaseRespose> sendOrder(List<SendOrderRequest> foods);
Observable<BaseRespose> addFood(RequestBody requestBody);
Observable<BaseRespose> deleteFood(RequestBody requestBody);
List<Food> queryDB_FoodGroupList();
List<Food> queryDB_FoodList(long parentId);
}
}
package com.gingersoft.gsa.cloud.mealstand.mvp.model;
package com.gingersoft.gsa.cloud.meal.mvp.model;
import android.app.Application;
import com.gingersoft.gsa.cloud.base.bean.BaseRespose;
import com.gingersoft.gsa.cloud.base.bean.FoodBean;
import com.gingersoft.gsa.cloud.database.bean.Food;
import com.gingersoft.gsa.cloud.database.utils.FoodDaoUtils;
import com.gingersoft.gsa.cloud.meal.mvp.model.bean.request.SendOrderRequest;
import com.gingersoft.gsa.cloud.meal.mvp.model.service.MealService;
import com.google.gson.Gson;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
......@@ -10,7 +16,12 @@ import com.jess.arms.di.scope.ActivityScope;
import javax.inject.Inject;
import com.gingersoft.gsa.cloud.mealstand.mvp.contract.MealStandContract;
import com.gingersoft.gsa.cloud.meal.mvp.contract.MealStandContract;
import java.util.List;
import io.reactivex.Observable;
import okhttp3.RequestBody;
/**
......@@ -43,4 +54,40 @@ public class MealStandModel extends BaseModel implements MealStandContract.Model
this.mGson = null;
this.mApplication = null;
}
@Override
public Observable<BaseRespose> loadOrder(RequestBody requestBody) {
return mRepositoryManager.obtainRetrofitService(MealService.class)
.loadOrder(requestBody);
}
@Override
public Observable<BaseRespose> sendOrder(List<SendOrderRequest> foods) {
return mRepositoryManager.obtainRetrofitService(MealService.class)
.sendOrder(foods);
}
@Override
public Observable<BaseRespose> addFood(RequestBody requestBody) {
return mRepositoryManager.obtainRetrofitService(MealService.class)
.addFood(requestBody);
}
@Override
public Observable<BaseRespose> deleteFood(RequestBody requestBody) {
return mRepositoryManager.obtainRetrofitService(MealService.class)
.deleteFood(requestBody);
}
@Override
public List<Food> queryDB_FoodGroupList() {
FoodDaoUtils foodDaoUtils = new FoodDaoUtils(mApplication);
return foodDaoUtils.queryFoodGroupByQueryBuilder();
}
@Override
public List<Food> queryDB_FoodList(long parentId) {
FoodDaoUtils foodDaoUtils = new FoodDaoUtils(mApplication);
return foodDaoUtils.queryFoodByQueryBuilder(parentId);
}
}
\ No newline at end of file
package com.gingersoft.gsa.cloud.meal.mvp.model.bean.request;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 创建日期:2020-01-06
* 修订历史:2020-01-06
* 描述:
*/
public class SendOrderRequest {
private long productId;
private String productName;
private double price;
private double lunchboxPrice;
private int number;
public SendOrderRequest(long productId, String productName, double price, double lunchboxPrice, int number) {
this.productId = productId;
this.productName = productName;
this.price = price;
this.lunchboxPrice = lunchboxPrice;
this.number = number;
}
public long getProductId() {
return productId;
}
public void setProductId(long productId) {
this.productId = productId;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public double getLunchboxPrice() {
return lunchboxPrice;
}
public void setLunchboxPrice(double lunchboxPrice) {
this.lunchboxPrice = lunchboxPrice;
}
public int getNumber() {
return number;
}
public void setNumber(int number) {
this.number = number;
}
}
package com.gingersoft.gsa.cloud.meal.mvp.model.constant;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 创建日期:2020-01-04
* 修订历史:2020-01-04
* 描述:
*/
public interface MealConstant {
int food_group_ViewMode = 100;
int food_ViewMode = 101;
int combo_ViewMode = 102;
int discount_ViewMode = 104;
int fine_ViewMode = 105;
int fine_tabs_ViewMode = 106;
int ViewMode_keys = 503;
//堂食
int hall_food_mode = 1;
//外賣
int takeaway_food_mode = 2;
String ADD_FOOD_MODIFIER = "add_food_modifier";
String UPDATE_MODIFIER_MAX_QTY = "update_modifier_max_qty";
String EXIT_IS_PLU_MODE = "ExitIsPluMode";
}
package com.gingersoft.gsa.cloud.meal.mvp.model.service;
import com.gingersoft.gsa.cloud.base.bean.BaseRespose;
import com.gingersoft.gsa.cloud.database.bean.Food;
import com.gingersoft.gsa.cloud.meal.mvp.model.bean.request.SendOrderRequest;
import java.util.List;
import io.reactivex.Observable;
import me.jessyan.retrofiturlmanager.RetrofitUrlManager;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.POST;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 创建日期:2020-01-06
* 修订历史:2020-01-06
* 描述:
*/
public interface MealService {
@POST("order/send" + RetrofitUrlManager.IDENTIFICATION_PATH_SIZE + 2)
Observable<BaseRespose> sendOrder(@Body List<SendOrderRequest> foods);
@POST("orderDetails/add" + RetrofitUrlManager.IDENTIFICATION_PATH_SIZE + 2)
Observable<BaseRespose> addFood(@Body RequestBody requestBody);
@POST("orderDetails/add" + RetrofitUrlManager.IDENTIFICATION_PATH_SIZE + 2)
Observable<BaseRespose> loadOrder(@Body RequestBody requestBody);
@POST("orderDetails/delete" + RetrofitUrlManager.IDENTIFICATION_PATH_SIZE + 2)
Observable<BaseRespose> deleteFood(@Body RequestBody requestBody);
}
package com.gingersoft.gsa.cloud.meal.mvp.ui.adapter;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import com.gingersoft.gsa.cloud.database.bean.Food;
import com.gingersoft.gsa.cloud.meal.R;
import com.jess.arms.utils.ArmsUtils;
import java.util.List;
import androidx.recyclerview.widget.GridLayoutManager;
public class HorizontalGridViewAdpter extends BaseAdapter {
private Context context;
private List<Food> lists;//数据源
private int mIndex; // 页数下标,标示第几页,从0开始
private int mPargerSize;// 每页显示的最大的数量
private int currentSelectPosition;
public HorizontalGridViewAdpter(Context context, List<Food> lists, int mIndex, int mPargerSize) {
this.context = context;
this.lists = lists;
this.mIndex = mIndex;
this.mPargerSize = mPargerSize;
}
/**
* 先判断数据及的大小是否显示满本页lists.size() > (mIndex + 1)*mPagerSize
* 如果满足,则此页就显示最大数量lists的个数
* 如果不够显示每页的最大数量,那么剩下几个就显示几个
*/
@Override
public int getCount() {
return lists.size() > (mIndex + 1) * mPargerSize ?
mPargerSize : (lists.size() - mIndex * mPargerSize);
}
@Override
public Food getItem(int arg0) {
return lists.get(arg0 + mIndex * mPargerSize);
}
@Override
public long getItemId(int arg0) {
return arg0 + mIndex * mPargerSize;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
//重新确定position因为拿到的总是数据源,数据源是分页加载到每页的GridView上的
final int pos = position + mIndex * mPargerSize;//假设mPageSiez
Food food = lists.get(pos);
final ViewHolder holder;
if (convertView == null) {
holder = new ViewHolder();
convertView = View.inflate(context, R.layout.meal_item_name, null);
holder.tv_name = (TextView) convertView.findViewById(R.id.tv_text);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
//假设mPagerSize=8,假如点击的是第二页(即mIndex=1)上的第二个位置item(position=1),那么这个item的实际位置就是pos=9
holder.tv_name.setText(lists.get(pos).getFoodName());
if (food.isSelected()){
holder.tv_name.setBackgroundColor(context.getResources().getColor(R.color.orange_500));
}else {
holder.tv_name.setBackgroundColor(ArmsUtils.getColor(context, R.color.Grass_green));
}
holder.tv_name.setMaxHeight(100);
holder.tv_name.setHeight(ArmsUtils.dip2px(context, 40));
// ViewGroup.LayoutParams layoutParams = (ViewGroup.LayoutParams) holder.tv_name.getLayoutParams();
// layoutParams.height = 40;
// holder.tv_name.setLayoutParams(layoutParams);
holder.tv_name.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Food food = lists.get(pos);
if (currentSelectPosition != pos) {
//设置当前选中item颜色
food.setSelected(true);
if (currentSelectPosition < lists.size()) {
//重置上次选中item的颜色
lists.get(currentSelectPosition).setSelected(false);
}
notifyDataSetChanged();
//保存上次操作的position
currentSelectPosition = pos;
if (mOnItemClickListener != null)
mOnItemClickListener.onItemClick(food, pos);
}
}
});
return convertView;
}
static class ViewHolder {
private TextView tv_name;
}
private OnItemClickListener mOnItemClickListener;
public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
mOnItemClickListener = onItemClickListener;
}
public interface OnItemClickListener {
void onItemClick(Food food, int position);
}
}
package com.gingersoft.gsa.cloud.meal.mvp.ui.adapter.meal;
import android.content.Context;
import android.graphics.Color;
import android.text.TextUtils;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.gingersoft.gsa.cloud.base.bean.FoodBean;
import com.gingersoft.gsa.cloud.base.utils.ViewUtils;
import com.gingersoft.gsa.cloud.database.bean.Food;
import com.gingersoft.gsa.cloud.meal.R;
import com.gingersoft.gsa.cloud.meal.R2;
import com.jess.arms.base.BaseHolder;
import com.jess.arms.base.DefaultAdapter;
import com.jess.arms.utils.ArmsUtils;
import com.jess.arms.utils.DeviceUtils;
import java.util.List;
import androidx.recyclerview.widget.GridLayoutManager;
import butterknife.BindView;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 创建日期:2018/6/27
* 修订历史:2018/6/27
* 描述:
*/
public class FoodAdapter extends DefaultAdapter<Food> {
private Context mContext;
private int mOrderNumberShowSize;
private int mOrderNumberFontSize;
private int mFoodFontSize;
private int mColwidth;
private int mColHeight;
private int mLayoutQtyHeight;
private int currentSelectPosition = 0;
private int user_qty;//在进入的的数量
public boolean check_qty = false;//是否检查数理
public FoodAdapter(Context context, List<Food> infos) {
super(infos);
this.mContext = context;
this.mOrderNumberShowSize = 10;
this.mOrderNumberFontSize = 7;
this.mFoodFontSize = 14;
this.mColwidth = (int) ((DeviceUtils.getScreenWidth(context) / 5));
this.mColHeight = 80;
this.mLayoutQtyHeight = 10;
}
@Override
public int getItemCount() {
return mInfos.size();
}
@Override
public BaseHolder<Food> getHolder(View v, int viewType) {
return new FoodItemHolder(v);
}
@Override
public int getLayoutId(int viewType) {
return R.layout.meal_item_food;
}
class FoodItemHolder extends BaseHolder<Food> {
@BindView(R2.id.rl_container)
RelativeLayout rl_container;
@BindView(R2.id.tv_food_name)
TextView tv_food_name;
@BindView(R2.id.tv_number)
TextView tv_number;
@BindView(R2.id.tv_soldout)
TextView tv_soldout;
@BindView(R2.id.iv_qtySold)
ImageView iv_qtySold;
public FoodItemHolder(View itemView) {
super(itemView);
}
@Override
public void setData(Food datasBean, int position) {
setFood(datasBean);
setNumber(datasBean);
setColor(datasBean);
setStatus(datasBean);
setOnItemClickListener(new OnViewClickListener() {
@Override
public void onViewClick(View view, int position) {
if (ViewUtils.isFastClick2()) {
if (currentSelectPosition == 0 || currentSelectPosition != position) {
if (currentSelectPosition < mInfos.size()) {
//重置上次选中item的颜色
mInfos.get(currentSelectPosition).setSelected(false);
notifyItemChanged(currentSelectPosition);
}
//设置当前选中item颜色
datasBean.setSelected(true);
notifyItemChanged(position);
//保存上次操作的position
currentSelectPosition = position;
}
if (mOnItemClickListener != null)
mOnItemClickListener.onItemClick(datasBean, position);
}
}
});
}
public void setFood(Food datasBean) {
// String desc = "";
// switch (GSAApplication.androidSetting.getDataLanguage()) {
// case 1:
// desc = datasBean.getDesc1();
// break;
// case 2:
// desc = datasBean.getDesc2();
// break;
// case 3:
// desc = datasBean.getDesc3();
// break;
// }
// if (desc == null || desc.trim().length() == 0) {
// desc = datasBean.getDesc1();
// }
tv_food_name.setMaxWidth(mColwidth);
tv_food_name.setMinWidth(mColwidth);
tv_food_name.setWidth(mColwidth);
tv_food_name.setText(datasBean.getFoodName());
tv_food_name.setTextSize(mFoodFontSize);
tv_food_name.setHeight(mColHeight);
tv_food_name.setGravity(Gravity.CENTER);
tv_food_name.setSingleLine(false);
GridLayoutManager.LayoutParams lp = (GridLayoutManager.LayoutParams) rl_container.getLayoutParams();
lp.height = mColHeight;
lp.width = mColwidth;
rl_container.setLayoutParams(lp);
}
public void setNumber(Food datasBean) {
ViewGroup.MarginLayoutParams mp = new ViewGroup.MarginLayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); //item的宽高
mp.setMargins(0, 0, 0, 0);//分别是margin_top那四个属性
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(mp);
lp.width = ArmsUtils.dip2px(mContext, 16);
lp.height = ArmsUtils.dip2px(mContext, 16);
tv_number.setLayoutParams(lp);
tv_number.setTextSize(10);
// if (datasBean.getNumber() == 0) {
// tv_number.setVisibility(View.INVISIBLE);
// } else {
// tv_number.setVisibility(View.VISIBLE);
tv_number.setText(datasBean.getNumber() + "");
// }
}
private void setStatus(Food datasBean) {
tv_soldout.setMaxHeight(mOrderNumberShowSize);
tv_soldout.setMinHeight(mOrderNumberShowSize);
tv_soldout.setTextSize(mOrderNumberShowSize);
tv_soldout.setTextColor(android.graphics.Color.parseColor("#000000"));
tv_soldout.setBackgroundDrawable(mContext.getResources().getDrawable(R.drawable.ui_selector_white_rect));
tv_soldout.setMinWidth(20);
tv_soldout.setTextSize(10);
tv_soldout.setGravity(Gravity.CENTER);
RelativeLayout.LayoutParams lp2 = new RelativeLayout.LayoutParams(new ViewGroup.MarginLayoutParams(60, 40));
lp2.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
lp2.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
tv_soldout.setLayoutParams(lp2);
tv_soldout.setVisibility(View.INVISIBLE);
iv_qtySold.setVisibility(View.INVISIBLE);
int isSold = datasBean.getIsSold();
if (isSold == 1) {
iv_qtySold.setVisibility(View.VISIBLE);
} else {
iv_qtySold.setVisibility(View.INVISIBLE);
}
}
private void setColor(Food datasBean) {
if (datasBean.isSelected()) {
tv_food_name.setBackgroundColor(ArmsUtils.getColor(mContext, R.color.orange_500));
tv_food_name.setTextColor(ArmsUtils.getColor(mContext, R.color.theme_white_color));
} else {
tv_food_name.setBackgroundColor(ArmsUtils.getColor(mContext, R.color.light_blue_500));
tv_food_name.setTextColor(ArmsUtils.getColor(mContext, R.color.theme_white_color));
}
}
}
public int getCurrentSelectPosition() {
return currentSelectPosition;
}
public void setCurrentSelectPosition(int currentSelectPosition) {
this.currentSelectPosition = currentSelectPosition;
}
public int getUser_qty() {
return user_qty;
}
public void setUser_qty(int user_qty) {
this.user_qty = user_qty;
}
public boolean isCheck_qty() {
return check_qty;
}
public void setCheck_qty(boolean check_qty) {
this.check_qty = check_qty;
}
private OnItemClickListener mOnItemClickListener;
public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
mOnItemClickListener = onItemClickListener;
}
public interface OnItemClickListener {
void onItemClick(Food datasBean, int position);
}
}
package com.gingersoft.gsa.cloud.meal.mvp.ui.adapter.meal;
import android.view.View;
import android.view.ViewGroup;
import java.util.List;
import androidx.viewpager.widget.PagerAdapter;
public class MyViewPagerAdapter extends PagerAdapter {
private List<View> viewList;//View就二十GridView
public MyViewPagerAdapter(List<View> viewList) {
this.viewList = viewList;
}
@Override
public int getCount() {
return viewList != null ? viewList.size() : 0;
}
@Override
public boolean isViewFromObject(View arg0, Object arg1) {
return arg0 == arg1;
}
/**
* 将当前的View添加到ViewGroup容器中
* 这个方法,return一个对象,这个对象表明了PagerAdapter适配器选择哪个对象放在当前的ViewPage上
*/
@Override
public Object instantiateItem(ViewGroup container, int position) {
container.addView(viewList.get(position));
return viewList.get(position);
}
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
container.removeView((View) object);
}
}
package com.gingersoft.gsa.cloud.meal.mvp.ui.widget;
import android.app.Dialog;
import android.content.Context;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import com.gingersoft.gsa.cloud.meal.R;
import com.gingersoft.gsa.cloud.meal.R2;
import com.jess.arms.utils.ArmsUtils;
import com.jess.arms.utils.ThirdViewUtil;
import butterknife.BindView;
import butterknife.OnClick;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 创建日期:2018/8/17
* 修订历史:2018/8/17
* 描述:输入数字Dialog
*/
public class ChooseNumberDialog {
private Context mContext;
private Dialog dialog;
@BindView(R2.id.ll_container)
LinearLayout ll_container;
// @BindView(R2.id.rl_head)
// RelativeLayout rl_head;
// @BindView(R2.id.ib_back_page)
// ImageButton ib_back_page;
// @BindView(R2.id.tv_title)
// TextView tv_title;
@BindView(R2.id.ed_value)
EditText ed_value;
@BindView(R2.id.btn_0)
Button btn_0;
@BindView(R2.id.btn_1)
Button btn_1;
@BindView(R2.id.btn_2)
Button btn_2;
@BindView(R2.id.btn_3)
Button btn_3;
@BindView(R2.id.btn_4)
Button btn_4;
@BindView(R2.id.btn_5)
Button btn_5;
@BindView(R2.id.btn_6)
Button btn_6;
@BindView(R2.id.btn_7)
Button btn_7;
@BindView(R2.id.btn_8)
Button btn_8;
@BindView(R2.id.btn_9)
Button btn_9;
@BindView(R2.id.btn_back)
Button btn_back;
@BindView(R2.id.btn_ten_plus)
Button btn_ten_plus;
//没有输入点击确认的提示
private String emptyInputTip;
//1、選擇人數、2、選擇食品數量
private int type = 1;
//选中10+的次数
private int currentTenPlus = 0;
public ChooseNumberDialog(Context context) {
this.mContext = context;
initView();
}
private void initView() {
// 获取Dialog布局
View view = LayoutInflater.from(mContext).inflate(R.layout.ui_dialog_input_number, null);
ThirdViewUtil.bindTarget(this, view);//绑定
// 定义Dialog布局和参数
dialog = new Dialog(mContext, R.style.QMUI_Dialog);
dialog.setContentView(view);
dialog.setCancelable(false);
// 调整dialog背景大小
ll_container.setLayoutParams(
new FrameLayout.LayoutParams((int) (ArmsUtils.getScreenWidth(mContext) * 0.92), ViewGroup.LayoutParams.WRAP_CONTENT));
}
public ChooseNumberDialog builder() {
initLanguage();
return this;
}
private void initLanguage() {
btn_back.setText("返回");
ed_value.setHint( "請按鍵錄入數量");
}
public void setValueHint(String hint) {
ed_value.setHint(hint);
}
@OnClick({R2.id.btn_0, R2.id.btn_1, R2.id.btn_2, R2.id.btn_3, R2.id.btn_4, R2.id.btn_5, R2.id.btn_6, R2.id.btn_7, R2.id.btn_8, R2.id.btn_9, R2.id.btn_back, R2.id.btn_ten_plus})
public void onClick(View v) {
switch (v.getId()) {
case R2.id.btn_0:
case R2.id.btn_1:
case R2.id.btn_2:
case R2.id.btn_3:
case R2.id.btn_4:
case R2.id.btn_5:
case R2.id.btn_6:
case R2.id.btn_7:
case R2.id.btn_8:
case R2.id.btn_9:
int i = Integer.parseInt(v.getTag().toString());
String values = String.valueOf(i);
if (currentTenPlus > 0) {
//有选择十整位
values = (currentTenPlus * 10) + "_" + values;
}
if (values.length() > 0 && Integer.parseInt(split_value(values)) > 99) {
//最大选择数99
values = "99";
ed_value.setText(values);
} else {
ed_value.setText(values);
}
if (!TextUtils.isEmpty(getInputNumber())) {
if (onClickListener != null) {
onClickListener.onComfirmClick(getInputNumber());
clearValueText();
}
cancel();
}
break;
case R2.id.btn_back:
if (onBackClickListener != null) {
onBackClickListener.OnBackClick();
}
cancel();
break;
// case R.id.ib_back_page:
// if (onClickListener != null) {
// onClickListener.onBackPage();
// }
// break;
case R2.id.btn_ten_plus:
currentTenPlus++;
ed_value.setText(currentTenPlus + "_");
break;
}
}
public void clearValueText() {
currentTenPlus = 0;
ed_value.setText("");
}
public String getInputNumber() {
return split_value(ed_value.getText().toString().trim());
}
private String split_value(String value) {
if (value.contains("_")) {
String[] values = value.split("_");
int tenBit = Integer.parseInt(values[0]);
value = (tenBit + Integer.parseInt(values[1])) + "";
}
return value;
}
public String getEmptyInputTip() {
return emptyInputTip;
}
public void setEmptyInputTip(String emptyInputTip) {
this.emptyInputTip = emptyInputTip;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
// public void setTitle(String title) {
// tv_title.setText(title);
// }
//
// public void setHeadLayoutVisibility(int visibility) {
// rl_head.setVisibility(visibility);
// }
//
// public void setBackPageBtnVisibility(int visibility) {
// ib_back_page.setVisibility(visibility);
// }
public ChooseNumberDialog setCancelable(boolean cancelable) {
dialog.setCancelable(cancelable);
return this;
}
public void show() {
dialog.show();
}
public void cancel() {
dialog.cancel();
}
private OnBackClickListener onBackClickListener;
private OnClickListener onClickListener;
public void setOnBackClickListener(OnBackClickListener clickListener) {
onBackClickListener = clickListener;
}
public void setOnClickListener(OnClickListener clickListener) {
onClickListener = clickListener;
}
public interface OnBackClickListener {
void OnBackClick();
}
public interface OnClickListener {
void onComfirmClick(String number);
void onBackPage();
}
}
package com.gingersoft.gsa.cloud.mealstand.mvp.presenter;
import android.app.Application;
import com.jess.arms.integration.AppManager;
import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.mvp.BasePresenter;
import com.jess.arms.http.imageloader.ImageLoader;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
import javax.inject.Inject;
import com.gingersoft.gsa.cloud.mealstand.mvp.contract.MealStandContract;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 12/27/2019 19:17
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
public class MealStandPresenter extends BasePresenter<MealStandContract.Model, MealStandContract.View> {
@Inject
RxErrorHandler mErrorHandler;
@Inject
Application mApplication;
@Inject
ImageLoader mImageLoader;
@Inject
AppManager mAppManager;
@Inject
public MealStandPresenter(MealStandContract.Model model, MealStandContract.View rootView) {
super(model, rootView);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mErrorHandler = null;
this.mAppManager = null;
this.mImageLoader = null;
this.mApplication = null;
}
}
package com.gingersoft.gsa.cloud.mealstand.mvp.ui.activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import android.widget.Chronometer;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.gingersoft.gsa.cloud.mealstand.di.component.DaggerMealStandComponent;
import com.gingersoft.gsa.cloud.ui.view.PagerSlidingTabStrip;
import com.gingersoft.gsa.cloud.ui.view.SearchKeyBoardView;
import com.jess.arms.base.BaseActivity;
import com.jess.arms.di.component.AppComponent;
import com.jess.arms.utils.ArmsUtils;
import com.gingersoft.gsa.cloud.mealstand.mvp.contract.MealStandContract;
import com.gingersoft.gsa.cloud.mealstand.mvp.presenter.MealStandPresenter;
import com.gingersoft.gsa.cloud.mealstand.R;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import androidx.viewpager.widget.ViewPager;
import butterknife.BindView;
import static com.jess.arms.utils.Preconditions.checkNotNull;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 12/27/2019 19:17
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public class MealStandActivity extends BaseActivity<MealStandPresenter> implements MealStandContract.View {
@BindView(R.id.ctime)
Chronometer chronometer;
@BindView(R.id.rv_select_meal)
RecyclerView rv_select_meal;
@BindView(R.id.rv_food_group)
RecyclerView rv_food_group;
@BindView(R.id.rv_food)
RecyclerView rv_food;
@BindView(R.id.rv_combo)
RecyclerView rv_combo;
@BindView(R.id.rv_discount)
RecyclerView rv_discount;
@BindView(R.id.rl_fine_tabs)
RelativeLayout rl_fine_tabs;
@BindView(R.id.iv_fine_back)
ImageView iv_fine_back;
@BindView(R.id.tabs_fine)
PagerSlidingTabStrip tabs_fine;
@BindView(R.id.pager_fine)
ViewPager pager_fine;
@BindView(R.id.meal_stand_search_keyboard_view)
SearchKeyBoardView keyView;
@BindView(R.id.rl_stand_oper)
RelativeLayout rl_stand_oper;
@BindView(R.id.tv_no_save_return)
TextView tv_no_save_return;
// @BindView(R.id.tv_send_order)
// TextView tv_send_order;
@BindView(R.id.fl_order_content)
FrameLayout fl_order_content;
@BindView(R.id.tv_order_content)
TextView tv_order_content;
@BindView(R.id.btn_order_count)
Button btn_order_count;
//送单
@BindView(R.id.fl_send_order)
FrameLayout fl_send_order;
@BindView(R.id.btn_send_order)
Button btn_send_order;
// @BindView(R.id.btn_send_order_machine_name)
// TextView btn_send_order_machine_name;
//印单
@BindView(R.id.fl_printer_order)
FrameLayout fl_printer_order;
@BindView(R.id.btn_order_printer)
Button btn_order_printer;
@BindView(R.id.btn_printer_machine_name)
TextView btn_printer_machine_name;
@BindView(R.id.ll_meals)
LinearLayout ll_meals;
@BindView(R.id.ll_meals_main)
LinearLayout ll_meals_main;
@BindView(R.id.ll_mm)
LinearLayout ll_mm;
@BindView(R.id.btn_table)
Button btn_table;
@BindView(R.id.btn_numberman)
Button btn_numberman;
@BindView(R.id.btn_fid)
TextView btn_fid;
@BindView(R.id.btn_temporary)
TextView btn_temporary;
@BindView(R.id.btn_meal_discount)
TextView btn_meal_discount;
@BindView(R.id.btn_meal_delete)
TextView btn_meal_delete;
@BindView(R.id.btn_meal_modify_restore)
ImageButton btn_meal_modify_restore;
@BindView(R.id.btn_change_Language)
ImageButton btn_change_Language;
@BindView(R.id.btn_food_merge)
ImageButton btn_food_merge;
@BindView(R.id.btn_food_mode)
TextView btn_food_mode;
@BindView(R.id.ll_Keys)
LinearLayout ll_Keys;
@BindView(R.id.btn_key0)
Button btn_key0;
@BindView(R.id.btn_key1)
Button btn_key1;
@BindView(R.id.btn_key2)
Button btn_key2;
@BindView(R.id.btn_key3)
Button btn_key3;
@BindView(R.id.btn_key4)
Button btn_key4;
@BindView(R.id.btn_keys)
Button btn_keys;
@BindView(R.id.ll_modify)
LinearLayout ll_modify;
@BindView(R.id.btn_add_delete)
Button btn_add_delete;
@BindView(R.id.btn_msg)
Button btn_msg;
@BindView(R.id.btn_delete)
Button btn_delete;
@BindView(R.id.btn_end)
Button btn_end;
@Override
public void setupActivityComponent(@NonNull AppComponent appComponent) {
DaggerMealStandComponent //如找不到该类,请编译一下项目
.builder()
.appComponent(appComponent)
.view(this)
.build()
.inject(this);
}
@Override
public int initView(@Nullable Bundle savedInstanceState) {
return R.layout.meal_activity_meal_stand; //如果你不需要框架帮你设置 setContentView(id) 需要自行设置,请返回 0
}
@Override
public void initData(@Nullable Bundle savedInstanceState) {
}
@Override
public void initIntent() {
}
@Override
public void initTopBar() {
}
@Override
public void initLanguage() {
}
@Override
public void initLayoutParams() {
}
@Override
public void initLayoutVisible() {
}
@Override
public void showLoading(String message) {
}
@Override
public void hideLoading() {
}
@Override
public void showMessage(@NonNull String message) {
checkNotNull(message);
ArmsUtils.snackbarText(message);
}
@Override
public void launchActivity(@NonNull Intent intent) {
checkNotNull(intent);
ArmsUtils.startActivity(intent);
}
@Override
public void killMyself() {
finish();
}
}
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/theme_color" />
<size
android:width="15dp"
android:height="2dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/theme_grey_color" />
<size
android:width="15dp"
android:height="2dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true" android:state_focused="false"
android:state_pressed="false" android:color="@color/theme_white_color"/>
<item android:state_pressed="true" android:color="@color/colorAccent"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<com.gingersoft.gsa.cloud.ui.view.LineGridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gv_food_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:numColumns="6">
</com.gingersoft.gsa.cloud.ui.view.LineGridView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rl_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_food_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="1px"
android:layout_marginTop="1px"
android:text="food"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@drawable/meal_selector_food_backgroup" />
<TextView
android:id="@+id/tv_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ui_shape_red_oval"
android:gravity="center"
android:text="number"
android:visibility="gone"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/theme_white_color" />
<TextView
android:id="@+id/tv_soldout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_gravity="right"
android:layout_marginRight="2px"
android:layout_marginTop="2px"
android:visibility="gone"
android:background="@drawable/ui_selector_white_rect"
android:text="sold" />
<!--<TextView-->
<!--android:id="@+id/tv_status"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_alignParentRight="true"-->
<!--android:layout_gravity="right"-->
<!--android:layout_marginRight="3px"-->
<!--android:layout_marginTop="2px"-->
<!--android:background="@drawable/selector_white_rect"-->
<!--android:text="sold" />-->
<ImageView
android:id="@+id/iv_qtySold"
android:layout_width="40dp"
android:layout_height="20dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_gravity="right"
android:layout_marginRight="1px"
android:layout_marginTop="1px"
android:src="@drawable/sold"
android:text="sold" />
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rl_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="2px"
android:layout_marginTop="2px"
android:text="food"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@drawable/meal_selector_food_backgroup" />
<TextView
android:id="@+id/tv_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ui_shape_red_oval"
android:gravity="center"
android:text="number"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/theme_white_color" />
<TextView
android:id="@+id/tv_soldout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_gravity="right"
android:layout_marginRight="2px"
android:layout_marginTop="2px"
android:background="@drawable/ui_selector_white_rect"
android:text="sold" />
<View
android:id="@+id/right_line"
android:layout_width="2px"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:background="@color/theme_black" />
<View
android:id="@+id/top_line"
android:layout_width="match_parent"
android:layout_height="2px"
android:layout_alignParentTop="true"
android:background="@color/theme_black" />
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tv_text"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
android:gravity="center"
android:text="和風牛肉"
android:maxLines="2"
android:background="@color/green_400"
android:textColor="@color/theme_white_color"
android:textSize="@dimen/font_normal"/>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rl_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/img_lock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/tv_number"
android:src="@drawable/lock" />
<RelativeLayout
android:id="@+id/rl_select"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/img_lock">
<LinearLayout
android:id="@+id/ll_tvname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/dp_90">
<com.gingersoft.gsa.cloud.ui.view.MarqueeTextView
android:id="@+id/tv_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:singleLine="true"
android:text="TextView"
android:textColor="@color/theme_black"
android:textSize="@dimen/sp_20" />
</LinearLayout>
<TextView
android:id="@+id/tv_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="$20"
android:layout_marginRight="@dimen/dp_5"
android:textColor="@color/theme_black"
android:textSize="@dimen/sp_20" />
<TextView
android:id="@+id/tv_mix"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignWithParentIfMissing="true"
android:layout_marginBottom="@dimen/dp_1"
android:layout_marginRight="@dimen/dp_1"
android:layout_marginTop="@dimen/dp_1"
android:layout_toLeftOf="@+id/tv_discount_money"
android:background="@color/red"
android:text="1"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/green"
android:textSize="@dimen/sp_20"
android:visibility="invisible" />
<TextView
android:id="@+id/tv_discount_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/tv_money"
android:layout_marginRight="@dimen/dp_5"
android:layout_toLeftOf="@+id/tv_D"
android:text="D"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/red"
android:visibility="invisible" />
<TextView
android:id="@+id/tv_D"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignWithParentIfMissing="true"
android:layout_marginRight="@dimen/dp_1"
android:layout_toLeftOf="@+id/tv_D_1"
android:background="@color/white"
android:text="D"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/red"
android:textSize="@dimen/sp_10"
android:visibility="invisible" />
<TextView
android:id="@+id/tv_S"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/tv_money"
android:layout_alignWithParentIfMissing="true"
android:layout_below="@+id/tv_D"
android:layout_marginRight="1dp"
android:layout_toLeftOf="@+id/tv_D_1"
android:background="@color/white"
android:text="S"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/red"
android:textSize="@dimen/sp_10"
android:visibility="invisible" />
<TextView
android:id="@+id/tv_D_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignWithParentIfMissing="true"
android:layout_marginRight="@dimen/dp_90"
android:layout_toLeftOf="@+id/tv_money"
android:background="@color/blue"
android:text="D"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/white"
android:textSize="@dimen/sp_10"
android:visibility="invisible" />
<TextView
android:id="@+id/tv_S_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/tv_money"
android:layout_alignParentRight="true"
android:layout_below="@+id/tv_D_1"
android:layout_marginRight="@dimen/dp_90"
android:background="@color/blue"
android:text="S"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/white"
android:textSize="@dimen/sp_10"
android:visibility="invisible" />
</RelativeLayout>
<TextView
android:id="@+id/tv_number"
android:layout_width="@dimen/dp_35"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="20"
android:gravity="center"
android:textColor="@color/theme_black"
android:textSize="@dimen/sp_20" />
<TextView
android:id="@+id/tv_food_table_mode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_28"
android:background="@color/red_400"
android:gravity="center"
android:padding="@dimen/dp_3"
android:text="外"
android:textColor="@color/theme_white_color"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
android:visibility="invisible"/>
<TextView
android:id="@+id/tv_modify_before_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/tv_number"
android:text="30"
android:visibility="invisible"
android:textColor="@color/orange_200"
android:textSize="@dimen/sp_14" />
</RelativeLayout>
\ No newline at end of file
apply from: rootProject.file("cc-settings.gradle")
android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"]
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
minSdkVersion rootProject.ext.android["minSdkVersion"]
targetSdkVersion rootProject.ext.android["targetSdkVersion"]
if (project.ext.runAsApp) {
applicationId 'com.gingersoft.cloud.gsa.order.detail'
}
versionCode rootProject.ext.android["versionCode"]
versionName rootProject.ext.android["versionName"]
}
resourcePrefix "order_detail"
buildTypes {
release {
postprocessing {
removeUnusedCode false
removeUnusedResources false
obfuscate false
optimizeCode false
proguardFiles 'proguard.cfg'
}
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
annotationProcessor rootProject.ext.dependencies["dagger2-compiler"]
}
package com.gingersoft.cloud.gsa.component.order.list;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.gingersoft.cloud.gsa.component.order.list", appContext.getPackageName());
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gingersoft.gsa.cloud.order.detail">
<application>
<activity android:name=".OrderDetailActivity"></activity>
</application>
</manifest>
\ No newline at end of file
package com.gingersoft.gsa.cloud.order.detail;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
/**
* @author billy.qi
*/
public class OrderDetailActivity extends AppCompatActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.order_detail_activity_main);
TextView textView = new TextView(this);
textView.setGravity(Gravity.CENTER);
textView.setText("ActivityA\nClick to finish this activity");
setContentView(textView);
textView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
}
}
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeColor="#00000000"
android:strokeWidth="1" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillColor="#008577"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/login_user_state_observer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
/>
<TextView
android:id="@+id/login_user"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
/>
</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
>
</ScrollView>
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:background="#cccccc"
android:scrollbars="vertical"
>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/console"
android:padding="10dp"
/>
</ScrollView>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- <color name="colorPrimary">#008577</color>-->
<!-- <color name="colorPrimaryDark">#00574B</color>-->
<!-- <color name="colorAccent">#D81B60</color>-->
</resources>
<resources>
<string name="order_detail_app_name">component-order-detail</string>
</resources>
package com.gingersoft.cloud.gsa.component.order.list;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
apply from: rootProject.file("cc-settings.gradle")
android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"]
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
minSdkVersion rootProject.ext.android["minSdkVersion"]
targetSdkVersion rootProject.ext.android["targetSdkVersion"]
if (project.ext.runAsApp) {
applicationId 'com.gingersoft.cloud.gsa.order.list'
}
versionCode rootProject.ext.android["versionCode"]
versionName rootProject.ext.android["versionName"]
}
resourcePrefix "gsa_order_detail"
buildTypes {
release {
postprocessing {
removeUnusedCode false
removeUnusedResources false
obfuscate false
optimizeCode false
proguardFiles 'proguard.cfg'
}
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
annotationProcessor rootProject.ext.dependencies["dagger2-compiler"]
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package com.gingersoft.cloud.gsa.component.order.list;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.gingersoft.cloud.gsa.component.order.list", appContext.getPackageName());
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gingersoft.gsa.cloud.order.list">
</manifest>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeColor="#00000000"
android:strokeWidth="1" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillColor="#008577"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
</resources>
<resources>
<string name="app_name">component-order-list</string>
</resources>
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