增加 出库
parent
3d6133e17b
commit
5a71af1ce6
@ -1,15 +1,79 @@
|
||||
package com.example.jingyuan_mes;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.example.jingyuan_mes.base.BaseActivity;
|
||||
import com.example.jingyuan_mes.base.MyRecultCall;
|
||||
import com.example.jingyuan_mes.base.MyResult;
|
||||
import com.example.jingyuan_mes.databinding.ActivityMainBinding;
|
||||
import com.example.jingyuan_mes.uitls.SharedPreferencesUtils;
|
||||
import com.example.jingyuan_mes.vm.LoginVm;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.callback.StringCallback;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
public class MainActivity extends BaseActivity {
|
||||
private LoginVm loginVm;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
|
||||
loginVm = new LoginVm();
|
||||
boolean isRemember = SharedPreferencesUtils.getboolean("isRemember", false);
|
||||
if (isRemember) {
|
||||
loginVm.setUsername(SharedPreferencesUtils.getstring("user", ""));
|
||||
loginVm.setPassword(SharedPreferencesUtils.getstring("pass", ""));
|
||||
loginVm.setRemember(isRemember);
|
||||
}
|
||||
binding.setUser(loginVm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sanCodeCall(String code) {
|
||||
|
||||
}
|
||||
|
||||
public void login_click(View view) {
|
||||
String pass = loginVm.getPassword();
|
||||
String name = loginVm.getUsername();
|
||||
if (pass == null || name == null || pass.isEmpty() || name.isEmpty()) return;
|
||||
OkGo.<MyResult>post("http://175.27.215.92:7018/prod-api/auth/pdaLogin")
|
||||
.upRequestBody(RequestBody.create(JSON, gson.toJson(loginVm)))
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
if (body.getCode() == 200) {
|
||||
// gson.fromJson(body)
|
||||
String accessToken = JSONObject.parseObject(body.getData().toString()).get("access_token").toString();
|
||||
SharedPreferencesUtils.putstring("access_token",accessToken);
|
||||
boolean remember = loginVm.isRemember();
|
||||
if (remember) {
|
||||
SharedPreferencesUtils.putboolean("isRemember", remember);
|
||||
SharedPreferencesUtils.putstring("user", name);
|
||||
SharedPreferencesUtils.putstring("pass", pass);
|
||||
}
|
||||
// Intent intent=new Intent(MainActivity.this, HomePageActivity.class);
|
||||
// intent.putExtra("json",response.body());
|
||||
// startActivity(intent);
|
||||
// finish();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,78 @@
|
||||
package com.example.jingyuan_mes.base;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.media.MediaPlayer;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import okhttp3.MediaType;
|
||||
|
||||
public abstract class BaseActivity extends AppCompatActivity {
|
||||
public static String url = "http://175.27.215.92:7018/prod-api";
|
||||
// public static String url = "http://172.20.10.2:90/api";
|
||||
public ProgressDialog dialog;
|
||||
public Gson gson;
|
||||
public MediaType JSON = MediaType.parse("application/json; charset=utf-8");
|
||||
private MyReceiver myReceiver;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
gson = new Gson();
|
||||
initDialog();
|
||||
initSan();
|
||||
|
||||
}
|
||||
|
||||
public class MyReceiver extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void initDialog() {
|
||||
dialog = new ProgressDialog(this);
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
dialog.setCanceledOnTouchOutside(false);
|
||||
dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
|
||||
dialog.setMessage("请求网络中...");
|
||||
}
|
||||
private void initSan(){
|
||||
myReceiver = new MyReceiver();
|
||||
IntentFilter intentFilter = new IntentFilter();
|
||||
intentFilter.addAction("android.rfid.FUN_KEY");
|
||||
registerReceiver(myReceiver, intentFilter);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
unregisterReceiver(myReceiver);
|
||||
}
|
||||
|
||||
public void titleToolClick(View view){
|
||||
finish();
|
||||
}
|
||||
|
||||
public abstract void sanCodeCall(String code);
|
||||
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.example.jingyuan_mes.base;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.lzy.okgo.callback.AbsCallback;
|
||||
import com.lzy.okgo.model.Response;
|
||||
import com.lzy.okgo.request.base.Request;
|
||||
|
||||
import okhttp3.ResponseBody;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2023/11/20 14:27
|
||||
*/
|
||||
public class MyRecultCall extends AbsCallback<MyResult> {
|
||||
private ProgressDialog dialog;
|
||||
private Context context;
|
||||
|
||||
public MyRecultCall(ProgressDialog dialog, Context context) {
|
||||
this.dialog = dialog;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MyResult convertResponse(okhttp3.Response response) throws Throwable {
|
||||
ResponseBody body = response.body();
|
||||
if (body == null) return null;
|
||||
Gson gson = new Gson();
|
||||
MyResult resust = gson.fromJson(body.string(), MyResult.class);
|
||||
resust.setData(gson.toJson(resust.getData()));
|
||||
return resust;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
dialog.dismiss();
|
||||
// Log.e("网络请求情况", "onSuccess:");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Response<MyResult> response) {
|
||||
super.onError(response);
|
||||
dialog.dismiss();
|
||||
Log.e("网络请求情况", "onError:" );
|
||||
Toast.makeText(context, "网络连接错误", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart(Request<MyResult, ? extends Request> request) {
|
||||
super.onStart(request);
|
||||
dialog.show();
|
||||
// Log.e("网络请求情况", "onStart:" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
super.onFinish();
|
||||
dialog.dismiss();
|
||||
Log.e("网络请求情况", "onFinish:" );
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.example.jingyuan_mes.base;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2023/12/21 15:31
|
||||
*/
|
||||
public class MyResult {
|
||||
private int code;
|
||||
private String msg;
|
||||
private Object data;
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public Object getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(Object data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.example.jingyuan_mes.entity;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/1/30 11:19
|
||||
*/
|
||||
public class MaterialIn {
|
||||
private String materialBarcode;
|
||||
private String locationCode;
|
||||
private String instockAmount;
|
||||
private String poNo;
|
||||
private String batchCode;
|
||||
private String materialId;
|
||||
|
||||
public String getMaterialBarcode() {
|
||||
return materialBarcode;
|
||||
}
|
||||
|
||||
public void setMaterialBarcode(String materialBarcode) {
|
||||
this.materialBarcode = materialBarcode;
|
||||
}
|
||||
|
||||
public String getLocationCode() {
|
||||
return locationCode;
|
||||
}
|
||||
|
||||
public void setLocationCode(String locationCode) {
|
||||
this.locationCode = locationCode;
|
||||
}
|
||||
|
||||
public String getInstockAmount() {
|
||||
return instockAmount;
|
||||
}
|
||||
|
||||
public void setInstockAmount(String instockAmount) {
|
||||
this.instockAmount = instockAmount;
|
||||
}
|
||||
|
||||
public String getPoNo() {
|
||||
return poNo;
|
||||
}
|
||||
|
||||
public void setPoNo(String poNo) {
|
||||
this.poNo = poNo;
|
||||
}
|
||||
|
||||
public String getBatchCode() {
|
||||
return batchCode;
|
||||
}
|
||||
|
||||
public void setBatchCode(String batchCode) {
|
||||
this.batchCode = batchCode;
|
||||
}
|
||||
|
||||
public String getMaterialId() {
|
||||
return materialId;
|
||||
}
|
||||
|
||||
public void setMaterialId(String materialId) {
|
||||
this.materialId = materialId;
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.example.jingyuan_mes.store;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.databinding.Bindable;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableField;
|
||||
import androidx.databinding.ObservableInt;
|
||||
import androidx.databinding.ViewDataBinding;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.example.jingyuan_mes.R;
|
||||
import com.example.jingyuan_mes.base.BaseActivity;
|
||||
import com.example.jingyuan_mes.base.MyRecultCall;
|
||||
import com.example.jingyuan_mes.base.MyResult;
|
||||
import com.example.jingyuan_mes.databinding.ActivityMaterialInBinding;
|
||||
import com.example.jingyuan_mes.entity.MaterialIn;
|
||||
import com.example.jingyuan_mes.uitls.SharedPreferencesUtils;
|
||||
import com.example.jingyuan_mes.vm.MaterialInVm;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
public class MaterialInActivity extends BaseActivity {
|
||||
private MaterialInVm vm;
|
||||
private MaterialIn materialIn;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
ActivityMaterialInBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_material_in);
|
||||
binding.setTitle("原材料入库");
|
||||
vm=new MaterialInVm();
|
||||
binding.setVm(vm);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sanCodeCall(String code) {
|
||||
|
||||
}
|
||||
|
||||
public void material_in_submit(View view){
|
||||
OkGo.<MyResult>post(url+"/wms/mobile/addRawInstock")
|
||||
.headers("Authorization", SharedPreferencesUtils.getstring("access_token", ""))
|
||||
.upRequestBody(RequestBody.create(JSON,gson.toJson(materialIn)))
|
||||
.execute(new MyRecultCall(dialog,this){
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
if (body.getCode()==200){
|
||||
finish();
|
||||
}
|
||||
Toast.makeText(MaterialInActivity.this, body.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.example.jingyuan_mes.store;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.example.jingyuan_mes.R;
|
||||
|
||||
public class MaterialOutListActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_material_out);
|
||||
}
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
package com.example.jingyuan_mes.uitls;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
/**
|
||||
* Created by wang 18/7/5
|
||||
*/
|
||||
|
||||
public class SharedPreferencesUtils {
|
||||
private static SharedPreferences sharedPreferences;
|
||||
private static SharedPreferences.Editor edit;
|
||||
|
||||
public static void init(Context context, String name) {
|
||||
sharedPreferences = context.getSharedPreferences(name, context.MODE_PRIVATE);
|
||||
edit = sharedPreferences.edit();
|
||||
edit.commit();
|
||||
}
|
||||
|
||||
public static void putstring(String key, String value) {
|
||||
if (edit != null) {
|
||||
edit.putString(key, value);
|
||||
edit.commit();
|
||||
}
|
||||
}
|
||||
public static void putInt(String key, int value) {
|
||||
if (edit != null) {
|
||||
edit.putInt(key, value);
|
||||
edit.commit();
|
||||
}
|
||||
}
|
||||
|
||||
public static int getInt(String key, int value) {
|
||||
if (sharedPreferences != null) {
|
||||
return sharedPreferences.getInt(key,value);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public static void putboolean(String key, boolean value) {
|
||||
if (edit != null) {
|
||||
edit.putBoolean(key, value);
|
||||
edit.commit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 取得方法
|
||||
*/
|
||||
|
||||
public static String getstring(String key, String deaflut) {
|
||||
if (sharedPreferences != null) {
|
||||
return sharedPreferences.getString(key, deaflut);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public static boolean getboolean(String key, boolean aaa) {
|
||||
if (sharedPreferences != null) {
|
||||
boolean aBoolean = sharedPreferences.getBoolean(key, aaa);
|
||||
return aBoolean;
|
||||
}
|
||||
return aaa;
|
||||
}
|
||||
|
||||
/**
|
||||
* remo
|
||||
*/
|
||||
public static void removeKey(String key) {
|
||||
if (edit != null) {
|
||||
edit.remove(key);
|
||||
edit.commit();
|
||||
}
|
||||
}
|
||||
public static void Clean() {
|
||||
//清空数据
|
||||
try {
|
||||
edit.clear();
|
||||
edit.commit();
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.example.jingyuan_mes.vm;
|
||||
|
||||
import androidx.databinding.BaseObservable;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2023/12/21 14:00
|
||||
*/
|
||||
public class LoginVm extends BaseObservable {
|
||||
private String username;
|
||||
private String password;
|
||||
private boolean remember;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
notifyChange();
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
notifyChange();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public boolean isRemember() {
|
||||
return remember;
|
||||
}
|
||||
|
||||
public void setRemember(boolean remember) {
|
||||
this.remember = remember;
|
||||
notifyChange();
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.example.jingyuan_mes.vm;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/1/30 13:49
|
||||
*/
|
||||
public class MaterialInVm {
|
||||
private String goodsCode;
|
||||
private String locationCode;
|
||||
private int number;
|
||||
|
||||
public String getGoodsCode() {
|
||||
return goodsCode;
|
||||
}
|
||||
|
||||
public void setGoodsCode(String goodsCode) {
|
||||
this.goodsCode = goodsCode;
|
||||
}
|
||||
|
||||
public String getLocationCode() {
|
||||
return locationCode;
|
||||
}
|
||||
|
||||
public void setLocationCode(String locationCode) {
|
||||
this.locationCode = locationCode;
|
||||
}
|
||||
|
||||
public int getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(int number) {
|
||||
this.number = number;
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="8dp"/>
|
||||
<stroke android:color="@color/black" android:width="1dp"/>
|
||||
<solid android:color="@color/white"/>
|
||||
</shape>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white"/>
|
||||
<corners android:radius="6dp"/>
|
||||
</shape>
|
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:bind="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="title"
|
||||
type="String" />
|
||||
<variable
|
||||
name="vm"
|
||||
type="com.example.jingyuan_mes.vm.MaterialInVm" />
|
||||
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".store.MaterialInActivity"
|
||||
android:orientation="vertical">
|
||||
<include layout="@layout/toolbar"
|
||||
bind:title="@{title}"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="扫描物料:" />
|
||||
|
||||
<EditText
|
||||
style="@style/text_san"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@={vm.goodsCode}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="扫描库位:" />
|
||||
<!-- -->
|
||||
<EditText
|
||||
style="@style/text_san"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="45dp"
|
||||
android:text="@={vm.locationCode}"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="输入数量:" />
|
||||
|
||||
<EditText
|
||||
style="@style/text_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:inputType="numberDecimal"
|
||||
android:text='@={vm.number + "" }' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
style="@style/button_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="55dp"
|
||||
android:layout_margin="20dp"
|
||||
android:onClick="material_in_submit"
|
||||
android:text="提交" />
|
||||
</LinearLayout>
|
||||
</layout>
|
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:bind="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="title"
|
||||
type="String" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".store.MaterialOutListActivity">
|
||||
|
||||
<include
|
||||
bind:title="@{title}"
|
||||
layout="@layout/toolbar" />
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="10dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/text_bg">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="title"
|
||||
type="String" />
|
||||
</data>
|
||||
|
||||
<FrameLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="66dp"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/ic_back"
|
||||
android:padding="16dp"
|
||||
android:onClick="titleToolClick" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="22sp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:letterSpacing="0.2"
|
||||
android:textStyle="bold"
|
||||
android:text="@{title}" />
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
</layout>
|
Binary file not shown.
After Width: | Height: | Size: 642 B |
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Loading…
Reference in New Issue