Commit 47574b7a by qyw

查询ok

parent 9d39ad23
......@@ -23,6 +23,7 @@
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_LOGS" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
......
package com.ifavine.pay.adapter;
import android.content.Context;
import android.text.TextUtils;
import android.widget.TextView;
import com.ifavine.pay.R;
......@@ -60,7 +61,7 @@ public class ConsumRecordReportAdapter extends ListBaseAdapter<LocalRecordReport
V_Remark.setText(q.Remark);
V_TransactionNo.setText(q.TransactionNo);
V_WindowName.setText(q.WindowName);
if (q.Remark != null && q.Remark.contains("失败")) {
if (!TextUtils.isEmpty(q.Remark)) {
V_no.setTextColor(mContext.getResources().getColor(R.color.red));
V_AllowanceAmount.setTextColor(mContext.getResources().getColor(R.color.red));
V_Consumption.setTextColor(mContext.getResources().getColor(R.color.red));
......
package com.ifavine.pay.adapter;
import android.content.Context;
import android.text.TextUtils;
import android.widget.TextView;
import com.ifavine.pay.R;
......@@ -61,7 +62,7 @@ public class LocalRecordReportAdapter extends ListBaseAdapter<LocalRecordReport>
V_Remark.setText(q.Remark);
V_TransactionNo.setText(q.TransactionNo);
V_WindowName.setText(q.WindowName);
if (q.Remark != null && q.Remark.contains("失败")) {
if (!TextUtils.isEmpty(q.Remark)) {
V_no.setTextColor(mContext.getResources().getColor(R.color.red));
V_AllowanceAmount.setTextColor(mContext.getResources().getColor(R.color.red));
V_Consumption.setTextColor(mContext.getResources().getColor(R.color.red));
......
......@@ -116,6 +116,16 @@ public class MainActivity extends BaseActivity {
private SoundPool soundPool;
private String payCode = "";
private PopWindowMainSet popWindowMainSet;
private PopWindowMainReport popWindowMainReport;
private static int Current_Count_PopWindow = 0;
public static int Current_Count_DialogInput = 0;
private Dialog dialogInput = null;
public static int Current_Count_DialogWindow = 0;
private Dialog dialogWindow = null;
private static boolean isStart = false;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......@@ -144,30 +154,10 @@ public class MainActivity extends BaseActivity {
}
boolean isSend = false;
@Override
public void initData() {
super.initData();
//检查网络
handler.postDelayed(netRun, 1000);
handler.postDelayed(etRunnable, 250);
et_payCode.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable) {
}
});
}
private Runnable netRun = new Runnable() {
......@@ -192,16 +182,16 @@ public class MainActivity extends BaseActivity {
}
};
String lastCode;
String code;
private static String lastCode;
private static String code;
private Runnable etRunnable = new Runnable() {
@Override
public void run() {
code = et_payCode.getText().toString();
if (!TextUtils.isEmpty(code) && code.equals(lastCode)) {
doPay(code);
}
if (!TextUtils.isEmpty(code)) {
if (code.equals(lastCode)) {
doPay(code);
}
lastCode = code;
}
handler.postDelayed(this, 300);
......@@ -215,13 +205,32 @@ public class MainActivity extends BaseActivity {
updateCanTeenName();
getServerDate();
initPayInfo();
//检查网络
Current_Count = 0;
startTimer();
if (!isStart) {
handler.postDelayed(netRun, 1000);
handler.postDelayed(etRunnable, 250);
}
isStart = true;
Log.e("love", "onResume");
}
@Override
protected void onStop() {
super.onStop();
isStart = false;
stopTimer();
handler.removeCallbacks(netRun);
handler.removeCallbacks(etRunnable);
Log.e("love", "onStop");
}
@Override
protected void onDestroy() {
super.onDestroy();
stopTimer();
isStart = false;
handler.removeCallbacks(netRun);
handler.removeCallbacks(etRunnable);
}
......@@ -270,11 +279,13 @@ public class MainActivity extends BaseActivity {
Current_Count = 0;
switch (view.getId()) {
case R.id.tv_set:
new PopWindowMainSet(mContext, new PopWindowMainSet.CallBackPosition() {
Current_Count_PopWindow = 0;
popWindowMainSet = new PopWindowMainSet(mContext, new PopWindowMainSet.CallBackPosition() {
@Override
public void selectIndex(int i) {
if (i == 0) {
DialogMainSetUtils.showRSTSetDialog(mContext, "饭堂窗口设置", new View.OnClickListener() {
Current_Count_DialogInput = 0;
dialogInput = DialogMainSetUtils.showRSTSetDialog(mContext, "饭堂窗口设置", new View.OnClickListener() {
@Override
public void onClick(View view) {
updateCanTeenName();
......@@ -282,39 +293,49 @@ public class MainActivity extends BaseActivity {
}
}, null, true);
} else if (i == 1) {
DialogMainSetUtils.showSetAmtDialog(mContext, "消费金额设置", new View.OnClickListener() {
Current_Count_DialogWindow = 0;
dialogWindow = DialogMainSetUtils.showSetAmtDialog(mContext, "消费金额设置", new View.OnClickListener() {
@Override
public void onClick(View view) {
initPayInfo();
}
}, null, true);
} else if (i == 2) {
DialogMainSetUtils.showChangePwdDialog(mContext, "修改管理员密码", null, null, true);
Current_Count_DialogInput = 0;
dialogInput = DialogMainSetUtils.showChangePwdDialog(mContext, "修改管理员密码", null, null, true);
}
}
}).showAtBottom(tv_set);
});
popWindowMainSet.showAtBottom(tv_set);
break;
case R.id.tv_table:
new PopWindowMainReport(mContext, new PopWindowMainReport.CallBackPosition() {
Current_Count_PopWindow = 0;
popWindowMainReport = new PopWindowMainReport(mContext, new PopWindowMainReport.CallBackPosition() {
@Override
public void selectIndex(final int index) {
if (index == 0) {
DialogMainSetUtils.showReportLocalDialog(mContext, "本机消费记录查询", null, true);
Current_Count_DialogWindow = 0;
dialogWindow = DialogMainSetUtils.showReportLocalDialog(mContext, "本机消费记录查询", null, true);
} else if (index == 1) {
DialogMainSetUtils.showReportRecordDialog(mContext, "消费记录查询", null, true);
Current_Count_DialogWindow = 0;
dialogWindow = DialogMainSetUtils.showReportRecordDialog(mContext, "消费记录查询", null, true);
} else if (index == 2) {
DialogUtil.showInputDialog(mContext, null, "请输入管理员密码", "请输入管理员密码", "确定", "取消", new View.OnClickListener() {
Current_Count_DialogInput = 0;
dialogInput = DialogUtil.showInputDialog(mContext, null, "请输入管理员密码", "请输入管理员密码", "确定", "取消", new View.OnClickListener() {
@Override
public void onClick(View view) {
DialogMainSetUtils.showReportSumDialog(mContext, "每月消费汇总查询", null, true);
Current_Count_DialogWindow = 0;
dialogWindow = DialogMainSetUtils.showReportSumDialog(mContext, "每月消费汇总查询", null, true);
}
}, null, true);
}
}
}).showAtBottom(tv_table);
});
popWindowMainReport.showAtBottom(tv_table);
break;
case R.id.tv_close:
dialog = DialogUtil.showConfirmDialog(mContext, null, "系统提示", "确认关闭应用?", "确定", "取消", new View.OnClickListener() {
Current_Count_DialogInput = 0;
dialogInput = DialogUtil.showConfirmDialog(mContext, null, "系统提示", "确认关闭应用?", "确定", "取消", new View.OnClickListener() {
@Override
public void onClick(View view) {
System.exit(0);
......@@ -323,6 +344,8 @@ public class MainActivity extends BaseActivity {
break;
case R.id.tv_reflesh:
getServerDate();
GetCanteenWindows();
GetWindowCostAmount();
break;
case R.id.btn_pay:
String code = et_payCode.getText().toString();
......@@ -333,7 +356,6 @@ public class MainActivity extends BaseActivity {
}
}
Dialog dialog = null;
// 初始化定时器
private long dateTime;
......@@ -348,6 +370,21 @@ public class MainActivity extends BaseActivity {
@Override
public void run() {
dateTime += 1000;
Current_Count_PopWindow++;
if (Current_Count_PopWindow > 10) {
Current_Count_PopWindow = 0;
handler.sendEmptyMessage(4);
}
Current_Count_DialogInput++;
if (Current_Count_DialogInput > 10) {
Current_Count_DialogInput = 0;
handler.sendEmptyMessage(5);
}
Current_Count_DialogWindow++;
if (Current_Count_DialogWindow > 20) {
Current_Count_DialogWindow = 0;
handler.sendEmptyMessage(6);
}
handler.sendEmptyMessage(1);
}
}, 1000, 1000);
......@@ -368,7 +405,9 @@ public class MainActivity extends BaseActivity {
super.handleMessage(msg);
switch (msg.what) {
case 1:
tv_date.setText(BaseUtil.getDateFormat(dateTime, "yyyy-MM-dd HH:mm:ss"));
if (dateTime != 0) {
tv_date.setText(BaseUtil.getDateFormat(dateTime, "yyyy-MM-dd HH:mm:ss"));
}
break;
case 2:
tv_net.setText("网络错误!");
......@@ -378,6 +417,25 @@ public class MainActivity extends BaseActivity {
tv_net.setText("网络畅通");
tv_net.setTextColor(getResources().getColor(R.color.green));
break;
case 4:
if (popWindowMainSet != null && popWindowMainSet.isShowing()) {
popWindowMainSet.dismiss();
}
if (popWindowMainReport != null && popWindowMainReport.isShowing()) {
popWindowMainReport.dismiss();
}
break;
case 5:
if (dialogInput != null && dialogInput.isShowing()) {
dialogInput.dismiss();
}
break;
case 6:
DialogUtil.dismissTipDialog();
if (dialogWindow != null && dialogWindow.isShowing()) {
dialogWindow.dismiss();
}
break;
}
......@@ -386,21 +444,21 @@ public class MainActivity extends BaseActivity {
@Override
public boolean onTouchEvent(MotionEvent event) {
Log.e("ggg", "onTouchEvent");
Log.e("love", "onTouchEvent");
Current_Count = 0;
return super.onTouchEvent(event);
}
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
Log.e("ggg", "dispatchTouchEvent");
Log.e("love", "dispatchTouchEvent");
Current_Count = 0;
return super.dispatchTouchEvent(ev);
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
Log.e("ggg", "onKeyUp");
Log.e("love", "onKeyUp");
Current_Count = 0;
return super.onKeyUp(keyCode, event);
}
......@@ -432,7 +490,6 @@ public class MainActivity extends BaseActivity {
String data = response.body().ModelJson;
TLog.log("aaa", data);
dateTime = BaseUtil.getDateFormat(data, "yyyy/MM/dd hh:mm:ss");
startTimer();
initPayInfo();
}
}
......@@ -636,6 +693,8 @@ public class MainActivity extends BaseActivity {
*/
private void setSCREEN_OFF_TIMEOUT() {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
Settings.System.putInt(getContentResolver(), android.provider.Settings.System.SCREEN_OFF_TIMEOUT, 10 * 1000);
// Settings.System.putInt(getContentResolver(), android.provider.Settings.System.SCREEN_OFF_TIMEOUT, 10 * 1000);
}
//窗口计时处理
}
......@@ -83,7 +83,7 @@ public class WelcomeActivity extends BaseActivity {
SPUtil.getInstance().writeString("Mac", Mac);
SPUtil.getInstance().writeString("DeviceNo", MD5Util.MD5(Mac));
}
Log.i("ggg", Mac);
Log.i("ggg", "Mac:" + Mac);
gotoActivity(MainActivity.class);
finish();
}
......
......@@ -6,7 +6,9 @@ import android.app.TimePickerDialog;
import android.content.Context;
import android.os.Handler;
import android.support.v7.widget.LinearLayoutManager;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
......@@ -38,7 +40,9 @@ import com.ifavine.pay.adapter.SpinnerAdapter;
import com.ifavine.pay.api.APIWrapper;
import com.ifavine.pay.common.AppContext;
import com.ifavine.pay.common.Constants;
import com.ifavine.pay.ui.activity.MainActivity;
import com.ifavine.pay.view.AmountView;
import com.ifavine.pay.view.MDialog;
import com.ifavine.pay.view.datepicker.DateUtil;
import com.ifavine.pay.vo.CanteenWindow;
import com.ifavine.pay.vo.CommonListResponse;
......@@ -99,6 +103,7 @@ public class DialogMainSetUtils {
TextView tv_title = (TextView) view.findViewById(R.id.dialog_title);
ImageView iv_cancel = (ImageView) view.findViewById(R.id.iv_cancel);
final EditText dialog_msg = (EditText) view.findViewById(R.id.dialog_msg);
dialog_msg.addTextChangedListener(textWatcher);
final Spinner spinner1 = (Spinner) view.findViewById(R.id.dialog_sp1);
final Spinner spinner2 = (Spinner) view.findViewById(R.id.dialog_sp2);
......@@ -127,6 +132,7 @@ public class DialogMainSetUtils {
@Override
public void onClick(View v) {
MainActivity.Current_Count_DialogInput = 0;
if (!SPUtil.getInstance().readString("pwd").equals(MD5Util.MD5(dialog_msg.getText().toString().trim()))) {
AppContext.showToast("管理员密码不正确");
return;
......@@ -182,6 +188,7 @@ public class DialogMainSetUtils {
}
adapter2.setData(second.toArray());
adapter2.notifyDataSetChanged();
MainActivity.Current_Count_DialogInput = 0;
}
@Override
......@@ -322,6 +329,22 @@ public class DialogMainSetUtils {
return dialog;
}
public static TextWatcher textWatcher = new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable) {
MainActivity.Current_Count_DialogInput = 0;
}
};
public static Dialog showChangePwdDialog(final Context mContext, final String title, final View.OnClickListener okListener,
View.OnClickListener cancelListener, boolean cancelable) {
......@@ -340,7 +363,9 @@ public class DialogMainSetUtils {
TextView tv_title = (TextView) view.findViewById(R.id.dialog_title);
final TextView tips = (TextView) view.findViewById(R.id.tips);
ImageView iv_cancel = (ImageView) view.findViewById(R.id.iv_cancel);
et1.addTextChangedListener(textWatcher);
et2.addTextChangedListener(textWatcher);
et3.addTextChangedListener(textWatcher);
if (title != null) {
tv_title.setText(title);
tv_title.setVisibility(View.VISIBLE);
......@@ -363,6 +388,7 @@ public class DialogMainSetUtils {
@Override
public void onClick(View v) {
MainActivity.Current_Count_DialogInput = 0;
String old = et1.getText().toString().trim();
String newP = et2.getText().toString().trim();
String comP = et3.getText().toString().trim();
......@@ -419,6 +445,8 @@ public class DialogMainSetUtils {
}
View view = View.inflate(mContext, R.layout.dialog_amt_set, null);
final Dialog dialog = new Dialog(mContext, R.style.dialog_common);// 创建自定义样式dialog
dialog.setCancelable(cancelable);// 不可以用“返回键”取消
dialog.setCanceledOnTouchOutside(cancelable); // 设置点击屏幕Dialog不消失
......@@ -461,8 +489,14 @@ public class DialogMainSetUtils {
tv_title.setText(title);
tv_title.setVisibility(View.VISIBLE);
}
view.findViewById(R.id.ll).setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
Log.e("love", "MDialog");
MainActivity.Current_Count_DialogWindow = 0;
return false;
}
});
//set cancel listener
if (cancelListener != null) {
btn_cancel.setOnClickListener(cancelListener);
......@@ -481,6 +515,7 @@ public class DialogMainSetUtils {
@Override
public void onClick(View v) {
MainActivity.Current_Count_DialogWindow = 0;
DATA.get(0).StartTime = tv_date1.getText().toString();
DATA.get(0).EndTime = tv_date2.getText().toString();
DATA.get(1).StartTime = tv_date3.getText().toString();
......@@ -509,48 +544,56 @@ public class DialogMainSetUtils {
tv_date1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MainActivity.Current_Count_DialogWindow = 0;
DialogUtil.showTimePickerDialog(mContext, R.style.dialog_style, tv_date1, Calendar.getInstance());
}
});
tv_date2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MainActivity.Current_Count_DialogWindow = 0;
DialogUtil.showTimePickerDialog(mContext, R.style.dialog_style, tv_date2, Calendar.getInstance());
}
});
tv_date3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MainActivity.Current_Count_DialogWindow = 0;
DialogUtil.showTimePickerDialog(mContext, R.style.dialog_style, tv_date3, Calendar.getInstance());
}
});
tv_date4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MainActivity.Current_Count_DialogWindow = 0;
DialogUtil.showTimePickerDialog(mContext, R.style.dialog_style, tv_date4, Calendar.getInstance());
}
});
tv_date5.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MainActivity.Current_Count_DialogWindow = 0;
DialogUtil.showTimePickerDialog(mContext, R.style.dialog_style, tv_date5, Calendar.getInstance());
}
});
tv_date6.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MainActivity.Current_Count_DialogWindow = 0;
DialogUtil.showTimePickerDialog(mContext, R.style.dialog_style, tv_date6, Calendar.getInstance());
}
});
tv_date7.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MainActivity.Current_Count_DialogWindow = 0;
DialogUtil.showTimePickerDialog(mContext, R.style.dialog_style, tv_date7, Calendar.getInstance());
}
});
tv_date8.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MainActivity.Current_Count_DialogWindow = 0;
DialogUtil.showTimePickerDialog(mContext, R.style.dialog_style, tv_date8, Calendar.getInstance());
}
});
......@@ -589,6 +632,7 @@ public class DialogMainSetUtils {
public void onAmountChange(View view, double amount) {
DATA.get(0).DinnerAmount = amount;
et1.setText((DATA.get(0).DinnerAmount - DATA.get(0).AllowanceAmount) + "");
MainActivity.Current_Count_DialogWindow = 0;
}
});
amt2.setOnAmountChangeListener(new AmountView.OnAmountChangeListener() {
......@@ -596,6 +640,7 @@ public class DialogMainSetUtils {
public void onAmountChange(View view, double amount) {
DATA.get(0).AllowanceAmount = amount;
et1.setText((DATA.get(0).DinnerAmount - DATA.get(0).AllowanceAmount) + "");
MainActivity.Current_Count_DialogWindow = 0;
}
});
//保存操作
......@@ -604,6 +649,7 @@ public class DialogMainSetUtils {
public void onAmountChange(View view, double amount) {
DATA.get(1).DinnerAmount = amount;
et2.setText((DATA.get(1).DinnerAmount - DATA.get(1).AllowanceAmount) + "");
MainActivity.Current_Count_DialogWindow = 0;
}
});
amt4.setOnAmountChangeListener(new AmountView.OnAmountChangeListener() {
......@@ -611,6 +657,7 @@ public class DialogMainSetUtils {
public void onAmountChange(View view, double amount) {
DATA.get(1).AllowanceAmount = amount;
et2.setText((DATA.get(1).DinnerAmount - DATA.get(1).AllowanceAmount) + "");
MainActivity.Current_Count_DialogWindow = 0;
}
});
//保存操作
......@@ -619,6 +666,7 @@ public class DialogMainSetUtils {
public void onAmountChange(View view, double amount) {
DATA.get(2).DinnerAmount = amount;
et3.setText((DATA.get(2).DinnerAmount - DATA.get(2).AllowanceAmount) + "");
MainActivity.Current_Count_DialogWindow = 0;
}
});
amt6.setOnAmountChangeListener(new AmountView.OnAmountChangeListener() {
......@@ -626,6 +674,7 @@ public class DialogMainSetUtils {
public void onAmountChange(View view, double amount) {
DATA.get(2).AllowanceAmount = amount;
et3.setText((DATA.get(2).DinnerAmount - DATA.get(2).AllowanceAmount) + "");
MainActivity.Current_Count_DialogWindow = 0;
}
}); //保存操作
amt7.setOnAmountChangeListener(new AmountView.OnAmountChangeListener() {
......@@ -633,6 +682,7 @@ public class DialogMainSetUtils {
public void onAmountChange(View view, double amount) {
DATA.get(3).DinnerAmount = amount;
et4.setText((DATA.get(3).DinnerAmount - DATA.get(3).AllowanceAmount) + "");
MainActivity.Current_Count_DialogWindow = 0;
}
});
amt8.setOnAmountChangeListener(new AmountView.OnAmountChangeListener() {
......@@ -640,6 +690,7 @@ public class DialogMainSetUtils {
public void onAmountChange(View view, double amount) {
DATA.get(3).AllowanceAmount = amount;
et4.setText((DATA.get(3).DinnerAmount - DATA.get(3).AllowanceAmount) + "");
MainActivity.Current_Count_DialogWindow = 0;
}
});
......@@ -715,15 +766,21 @@ public class DialogMainSetUtils {
Button btn_search = (Button) view.findViewById(R.id.dialog_search);
Button btn_close = (Button) view.findViewById(R.id.dialog_close);
final TextView t0 = (TextView) view.findViewById(R.id.tv_Total);
final TextView t1 = (TextView) view.findViewById(R.id.tv_TotalDinnerAmount);
final TextView t2 = (TextView) view.findViewById(R.id.tv_TotalAllowanceAmount);
final TextView t3 = (TextView) view.findViewById(R.id.tv_TotalConsumption);
final TextView t4 = (TextView) view.findViewById(R.id.tv_BreakFastTotal);
final TextView t5 = (TextView) view.findViewById(R.id.tv_LunchTotal);
final TextView t6 = (TextView) view.findViewById(R.id.tv_SupperTotal);
final TextView t7 = (TextView) view.findViewById(R.id.tv_NightTotal);
final List<TextView> list = new ArrayList<>();
list.add(t0);
list.add(t1);
list.add(t2);
list.add(t3);
list.add(t4);
list.add(t5);
list.add(t6);
list.add(t7);
final TextView tv_date1 = (TextView) view.findViewById(R.id.tv_date1);
final TextView tv_date2 = (TextView) view.findViewById(R.id.tv_date2);
TextView tv_title = (TextView) view.findViewById(R.id.dialog_title);
......@@ -737,6 +794,15 @@ public class DialogMainSetUtils {
tv_date2.setText(DateUtil.formatDate(new Date().getTime(), "yyyy-MM-dd"));
final LRecyclerView mLRecyclerView = (LRecyclerView) view.findViewById(R.id.mLRecyclerView);
mLRecyclerView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
Log.e("love", "MDialog");
MainActivity.Current_Count_DialogWindow = 0;
return false;
}
});
final LocalRecordReportAdapter adapter = new LocalRecordReportAdapter(mContext);
LRecyclerViewAdapter mLRecyclerViewAdapter = new LRecyclerViewAdapter(adapter);
mLRecyclerView.setLayoutManager(new LinearLayoutManager(mContext) {
......@@ -749,10 +815,13 @@ public class DialogMainSetUtils {
mLRecyclerView.setOnRefreshListener(new OnRefreshListener() {
@Override
public void onRefresh() {
t0.setText(null);
t1.setText(null);
t2.setText(null);
t3.setText(null);
t4.setText(null);
t5.setText(null);
t6.setText(null);
t7.setText(null);
mCurrent = 1;
mLRecyclerView.setNoMore(false);
mLRecyclerView.setLoadMoreEnabled(true);
......@@ -780,6 +849,7 @@ public class DialogMainSetUtils {
mLRecyclerView.setOnLoadMoreListener(new OnLoadMoreListener() {
@Override
public void onLoadMore() {
MainActivity.Current_Count_DialogWindow = 0;
if (mCurrent * Constants.PAGE_SIZE < mCount) {
mCurrent++;
isLoadMore = true;
......@@ -818,11 +888,41 @@ public class DialogMainSetUtils {
android.R.layout.simple_spinner_item, options2);
spinner2.setAdapter(adapter2);
spinner2.setSelection(1);
spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
MainActivity.Current_Count_DialogWindow = 0;
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
spinner1.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
MainActivity.Current_Count_DialogWindow = 0;
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
if (title != null) {
tv_title.setText(title);
tv_title.setVisibility(View.VISIBLE);
}
view.findViewById(R.id.ll).setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
Log.e("love", "MDialog");
MainActivity.Current_Count_DialogWindow = 0;
return false;
}
});
//set confirm listener
if (okListener != null) {
......@@ -833,6 +933,7 @@ public class DialogMainSetUtils {
@Override
public void onClick(View v) {
mLRecyclerView.refresh();
MainActivity.Current_Count_DialogWindow = 0;
}
});
}
......@@ -847,6 +948,7 @@ public class DialogMainSetUtils {
tv_date1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MainActivity.Current_Count_DialogWindow = 0;
String date = tv_date1.getText().toString();
if (!TextUtils.isEmpty(date)) {
c.setTimeInMillis(DateUtil.formatDateStr(date, "yyyy-MM-dd").getTime());
......@@ -858,7 +960,7 @@ public class DialogMainSetUtils {
mMonth = c.get(Calendar.MONTH);
mDay = c.get(Calendar.DAY_OF_MONTH);
}
DatePickerDialog datePickerDialog = new DatePickerDialog(mContext, new DatePickerDialog.OnDateSetListener() {
DialogUtil.tipDialog = new DatePickerDialog(mContext, new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {
startcal.set(Calendar.YEAR, year);
......@@ -868,13 +970,14 @@ public class DialogMainSetUtils {
tv_date1.setText(DateUtil.formatDate(mis, "yyyy-MM-dd"));
}
}, mYear, mMonth, mDay);
datePickerDialog.show();
DialogUtil.tipDialog.show();
}
});
tv_date2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MainActivity.Current_Count_DialogWindow = 0;
String date = tv_date2.getText().toString();
if (!TextUtils.isEmpty(date)) {
c.setTimeInMillis(DateUtil.formatDateStr(date, "yyyy-MM-dd").getTime());
......@@ -886,7 +989,7 @@ public class DialogMainSetUtils {
mMonth = c.get(Calendar.MONTH);
mDay = c.get(Calendar.DAY_OF_MONTH);
}
DatePickerDialog datePickerDialog = new DatePickerDialog(mContext, new DatePickerDialog.OnDateSetListener() {
DialogUtil.tipDialog = new DatePickerDialog(mContext, new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {
startcal.set(Calendar.YEAR, year);
......@@ -896,7 +999,7 @@ public class DialogMainSetUtils {
tv_date2.setText(DateUtil.formatDate(mis, "yyyy-MM-dd"));
}
}, mYear, mMonth, mDay);
datePickerDialog.show();
DialogUtil.tipDialog.show();
}
});
......@@ -938,10 +1041,13 @@ public class DialogMainSetUtils {
isLoadMore = false;
}
if (tvs != null) {
tvs.get(0).setText(response.body().Total + "");
tvs.get(1).setText(response.body().TotalDinnerAmount);
tvs.get(2).setText(response.body().TotalAllowanceAmount);
tvs.get(3).setText(response.body().TotalConsumption);
tvs.get(0).setText(response.body().TotalDinnerAmount);
tvs.get(1).setText(response.body().TotalAllowanceAmount);
tvs.get(2).setText(response.body().TotalConsumption);
tvs.get(3).setText(response.body().BreakFastTotal);
tvs.get(4).setText(response.body().LunchTotal);
tvs.get(5).setText(response.body().SupperTotal);
tvs.get(6).setText(response.body().NightTotal);
}
}
......@@ -981,15 +1087,31 @@ public class DialogMainSetUtils {
Button btn_search = (Button) view.findViewById(R.id.dialog_search);
Button btn_close = (Button) view.findViewById(R.id.dialog_close);
final TextView t0 = (TextView) view.findViewById(R.id.tv_Total);
final TextView t1 = (TextView) view.findViewById(R.id.tv_TotalDinnerAmount);
final TextView t2 = (TextView) view.findViewById(R.id.tv_TotalAllowanceAmount);
final TextView t3 = (TextView) view.findViewById(R.id.tv_TotalConsumption);
final TextView t4 = (TextView) view.findViewById(R.id.tv_BreakFastTotal);
final TextView t5 = (TextView) view.findViewById(R.id.tv_LunchTotal);
final TextView t6 = (TextView) view.findViewById(R.id.tv_SupperTotal);
final TextView t7 = (TextView) view.findViewById(R.id.tv_NightTotal);
final List<TextView> list = new ArrayList<>();
list.add(t0);
list.add(t1);
list.add(t2);
list.add(t3);
list.add(t4);
list.add(t5);
list.add(t6);
list.add(t7);
view.findViewById(R.id.ll).setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
Log.e("love", "MDialog");
MainActivity.Current_Count_DialogWindow = 0;
return false;
}
});
final TextView tv_date1 = (TextView) view.findViewById(R.id.tv_date1);
final TextView tv_date2 = (TextView) view.findViewById(R.id.tv_date2);
TextView tv_title = (TextView) view.findViewById(R.id.dialog_title);
......@@ -1004,6 +1126,15 @@ public class DialogMainSetUtils {
tv_date2.setText(DateUtil.formatDate(new Date().getTime(), "yyyy-MM-dd"));
final LRecyclerView mLRecyclerView = (LRecyclerView) view.findViewById(R.id.mLRecyclerView);
mLRecyclerView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
Log.e("love", "MDialog");
MainActivity.Current_Count_DialogWindow = 0;
return false;
}
});
final ConsumRecordReportAdapter adapter = new ConsumRecordReportAdapter(mContext);
LRecyclerViewAdapter mLRecyclerViewAdapter = new LRecyclerViewAdapter(adapter);
mLRecyclerView.setLayoutManager(new LinearLayoutManager(mContext) {
......@@ -1016,10 +1147,13 @@ public class DialogMainSetUtils {
mLRecyclerView.setOnRefreshListener(new OnRefreshListener() {
@Override
public void onRefresh() {
t0.setText(null);
t1.setText(null);
t2.setText(null);
t3.setText(null);
t4.setText(null);
t5.setText(null);
t6.setText(null);
t7.setText(null);
mCurrent = 1;
mLRecyclerView.setNoMore(false);
mLRecyclerView.setLoadMoreEnabled(true);
......@@ -1048,6 +1182,7 @@ public class DialogMainSetUtils {
mLRecyclerView.setOnLoadMoreListener(new OnLoadMoreListener() {
@Override
public void onLoadMore() {
MainActivity.Current_Count_DialogWindow = 0;
if (mCurrent * Constants.PAGE_SIZE < mCount) {
mCurrent++;
isLoadMore = true;
......@@ -1087,6 +1222,28 @@ public class DialogMainSetUtils {
android.R.layout.simple_spinner_item, options2);
spinner2.setAdapter(adapter2);
spinner2.setSelection(1);
spinner1.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
MainActivity.Current_Count_DialogWindow = 0;
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
MainActivity.Current_Count_DialogWindow = 0;
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
//窗口设置
String CanTeenCode = SPUtil.getInstance().readString("CanTeenCode");
String data = SPUtil.getInstance().readString("CanteenWindows");
......@@ -1123,6 +1280,7 @@ public class DialogMainSetUtils {
@Override
public void onClick(View v) {
mLRecyclerView.refresh();
MainActivity.Current_Count_DialogWindow = 0;
}
});
}
......@@ -1137,6 +1295,7 @@ public class DialogMainSetUtils {
tv_date1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MainActivity.Current_Count_DialogWindow = 0;
String date = tv_date1.getText().toString();
if (!TextUtils.isEmpty(date)) {
c.setTimeInMillis(DateUtil.formatDateStr(date, "yyyy-MM-dd").getTime());
......@@ -1148,7 +1307,7 @@ public class DialogMainSetUtils {
mMonth = c.get(Calendar.MONTH);
mDay = c.get(Calendar.DAY_OF_MONTH);
}
DatePickerDialog datePickerDialog = new DatePickerDialog(mContext, new DatePickerDialog.OnDateSetListener() {
DialogUtil.tipDialog = new DatePickerDialog(mContext, new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {
startcal.set(Calendar.YEAR, year);
......@@ -1158,13 +1317,14 @@ public class DialogMainSetUtils {
tv_date1.setText(DateUtil.formatDate(mis, "yyyy-MM-dd"));
}
}, mYear, mMonth, mDay);
datePickerDialog.show();
DialogUtil.tipDialog.show();
}
});
tv_date2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MainActivity.Current_Count_DialogWindow = 0;
String date = tv_date2.getText().toString();
if (!TextUtils.isEmpty(date)) {
c.setTimeInMillis(DateUtil.formatDateStr(date, "yyyy-MM-dd").getTime());
......@@ -1176,7 +1336,7 @@ public class DialogMainSetUtils {
mMonth = c.get(Calendar.MONTH);
mDay = c.get(Calendar.DAY_OF_MONTH);
}
DatePickerDialog datePickerDialog = new DatePickerDialog(mContext, new DatePickerDialog.OnDateSetListener() {
DialogUtil.tipDialog = new DatePickerDialog(mContext, new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {
startcal.set(Calendar.YEAR, year);
......@@ -1186,7 +1346,7 @@ public class DialogMainSetUtils {
tv_date2.setText(DateUtil.formatDate(mis, "yyyy-MM-dd"));
}
}, mYear, mMonth, mDay);
datePickerDialog.show();
DialogUtil.tipDialog.show();
}
});
......@@ -1226,10 +1386,13 @@ public class DialogMainSetUtils {
isLoadMore = false;
}
if (tvs != null) {
tvs.get(0).setText(response.body().Total + "");
tvs.get(1).setText(response.body().TotalDinnerAmount);
tvs.get(2).setText(response.body().TotalAllowanceAmount);
tvs.get(3).setText(response.body().TotalConsumption);
tvs.get(0).setText(response.body().TotalDinnerAmount);
tvs.get(1).setText(response.body().TotalAllowanceAmount);
tvs.get(2).setText(response.body().TotalConsumption);
tvs.get(3).setText(response.body().BreakFastTotal);
tvs.get(4).setText(response.body().LunchTotal);
tvs.get(5).setText(response.body().SupperTotal);
tvs.get(6).setText(response.body().NightTotal);
}
}
......@@ -1268,11 +1431,28 @@ public class DialogMainSetUtils {
final TextView t2 = (TextView) view.findViewById(R.id.tv_TotalAllowanceAmount);
final TextView t3 = (TextView) view.findViewById(R.id.tv_TotalConsumption);
view.findViewById(R.id.ll).setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
Log.e("love", "MDialog");
MainActivity.Current_Count_DialogWindow = 0;
return false;
}
});
TextView tv_title = (TextView) view.findViewById(R.id.dialog_title);
final Spinner spinner1 = (Spinner) view.findViewById(R.id.sp_year);
final Spinner spinner2 = (Spinner) view.findViewById(R.id.spinner2);
final LRecyclerView mLRecyclerView = (LRecyclerView) view.findViewById(R.id.mLRecyclerView);
mLRecyclerView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
Log.e("love", "MDialog");
MainActivity.Current_Count_DialogWindow = 0;
return false;
}
});
final MonthRecordReportAdapter adapter = new MonthRecordReportAdapter(mContext);
LRecyclerViewAdapter mLRecyclerViewAdapter = new LRecyclerViewAdapter(adapter);
mLRecyclerView.setLayoutManager(new LinearLayoutManager(mContext) {
......@@ -1284,6 +1464,7 @@ public class DialogMainSetUtils {
mLRecyclerView.setOnRefreshListener(new OnRefreshListener() {
@Override
public void onRefresh() {
MainActivity.Current_Count_DialogWindow = 0;
t1.setText(null);
t2.setText(null);
t3.setText(null);
......@@ -1298,6 +1479,7 @@ public class DialogMainSetUtils {
mLRecyclerView.setOnLoadMoreListener(new OnLoadMoreListener() {
@Override
public void onLoadMore() {
MainActivity.Current_Count_DialogWindow = 0;
if (mCurrent * Constants.PAGE_SIZE < mCount) {
adapter.clear();
mCurrent++;
......@@ -1322,6 +1504,28 @@ public class DialogMainSetUtils {
SpinnerAdapter adapter2 = new SpinnerAdapter(mContext,
android.R.layout.simple_spinner_item, options2);
spinner2.setAdapter(adapter2);
spinner1.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
MainActivity.Current_Count_DialogWindow = 0;
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
spinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
MainActivity.Current_Count_DialogWindow = 0;
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
if (title != null) {
tv_title.setText(title);
......
......@@ -5,7 +5,9 @@ import android.app.Dialog;
import android.app.TimePickerDialog;
import android.content.Context;
import android.graphics.Typeface;
import android.text.Editable;
import android.text.InputType;
import android.text.TextWatcher;
import android.text.method.PasswordTransformationMethod;
import android.view.LayoutInflater;
import android.view.View;
......@@ -18,11 +20,12 @@ import android.widget.TimePicker;
import com.ifavine.pay.R;
import com.ifavine.pay.common.AppContext;
import com.ifavine.pay.ui.activity.MainActivity;
import java.util.Calendar;
public class DialogUtil {
private static Dialog tipDialog;
public static Dialog tipDialog;
private static TextView tipTextView;
public static final int OK = 0xff888801;
......@@ -182,6 +185,22 @@ public class DialogUtil {
return tipDialog;
}
public static TextWatcher textWatcher = new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable) {
MainActivity.Current_Count_DialogInput = 0;
}
};
/**
* showConfirmDialog
......@@ -203,6 +222,7 @@ public class DialogUtil {
Button btn_ok = (Button) view.findViewById(R.id.dialog_ok);
Button btn_cancel = (Button) view.findViewById(R.id.dialog_cancel);
final EditText tv_msg = (EditText) view.findViewById(R.id.dialog_msg);
tv_msg.addTextChangedListener(textWatcher);
TextView tv_title = (TextView) view.findViewById(R.id.dialog_title);
ImageView iv = (ImageView) view.findViewById(R.id.dialog_iv);
ImageView iv_cancel = (ImageView) view.findViewById(R.id.iv_cancel);
......@@ -268,6 +288,7 @@ public class DialogUtil {
dialog.dismiss();
}
});
tipDialog = dialog;
dialog.show();
return dialog;
}
......@@ -279,7 +300,7 @@ public class DialogUtil {
String[] times = tv.getText().toString().split(":");
calendar.set(Calendar.HOUR_OF_DAY, Integer.parseInt(times[0]));
calendar.set(Calendar.MINUTE, Integer.parseInt(times[1]));
new TimePickerDialog(activity, themeResId,
tipDialog = new TimePickerDialog(activity, themeResId,
// 绑定监听器
new TimePickerDialog.OnTimeSetListener() {
@Override
......@@ -291,6 +312,7 @@ public class DialogUtil {
, calendar.get(Calendar.HOUR_OF_DAY)
, calendar.get(Calendar.MINUTE)
// true表示采用24小时制
, true).show();
, true);
tipDialog.show();
}
}
package com.ifavine.pay.view;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.util.Log;
import android.view.Display;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import android.widget.TextView;
import com.ifavine.pay.R;
import java.util.ArrayList;
import java.util.List;
public class MDialog extends android.app.Dialog {
public MDialog(Context context, int defStyle) {
super(context, defStyle);
}
@Override
public boolean onTouchEvent(@NonNull MotionEvent event) {
Log.e("ggg", "MDialog");
return super.onTouchEvent(event);
}
@Override
public boolean dispatchKeyEvent(@NonNull KeyEvent event) {
Log.e("ggg", "MDialog");
return super.dispatchKeyEvent(event);
}
@Override
public boolean dispatchTrackballEvent(@NonNull MotionEvent ev) {
Log.e("ggg", "MDialog");
return super.dispatchTrackballEvent(ev);
}
@Override
public boolean dispatchGenericMotionEvent(@NonNull MotionEvent ev) {
Log.e("ggg", "MDialog");
return super.dispatchGenericMotionEvent(ev);
}
@Override
public boolean onTrackballEvent(@NonNull MotionEvent event) {
Log.e("ggg", "MDialog");
return super.onTrackballEvent(event);
}
@Override
public boolean onGenericMotionEvent(@NonNull MotionEvent event) {
Log.e("ggg", "MDialog");
return super.onGenericMotionEvent(event);
}
}
\ No newline at end of file
......@@ -17,6 +17,10 @@ public class CommonListResponse<T> extends Entity {
public String TotalDinnerAmount;
public String TotalAllowanceAmount;
public String TotalConsumption;
public String BreakFastTotal;
public String LunchTotal;
public String SupperTotal;
public String NightTotal;
public int Total;
public class Data<T> {
......
......@@ -8,6 +8,7 @@
<LinearLayout
android:id="@+id/ll"
android:layout_width="fill_parent"
android:layout_height="800dp"
android:layout_centerHorizontal="true"
......
......@@ -8,6 +8,7 @@
<LinearLayout
android:id="@+id/ll"
android:layout_width="fill_parent"
android:layout_height="800dp"
android:layout_centerHorizontal="true"
......@@ -339,28 +340,101 @@
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="10dp"
android:text="消费人数:"
android:text="消费人数:(早餐:"
android:textColor="@color/font_black_32"
android:textSize="23dp" />
<TextView
android:id="@+id/tv_Total"
android:id="@+id/tv_BreakFastTotal"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="10dp"
android:paddingRight="5dp"
android:textColor="@color/red"
android:textSize="23dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginLeft="150dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="10dp"
android:paddingRight="5dp"
android:text="午餐:"
android:textColor="@color/font_black_32"
android:textSize="23dp" />
<TextView
android:id="@+id/tv_LunchTotal"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="5dp"
android:textColor="@color/red"
android:textSize="23dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="5dp"
android:text="晚餐:"
android:textColor="@color/font_black_32"
android:textSize="23dp" />
<TextView
android:id="@+id/tv_SupperTotal"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="5dp"
android:textColor="@color/red"
android:textSize="23dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="5dp"
android:text="夜宵:"
android:textColor="@color/font_black_32"
android:textSize="23dp" />
<TextView
android:id="@+id/tv_NightTotal"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:textColor="@color/red"
android:textSize="23dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="5dp"
android:text=")"
android:textColor="@color/font_black_32"
android:textSize="23dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginLeft="30dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="5dp"
android:text="合计:(消费金额:"
android:textColor="@color/font_black_32"
android:textSize="23dp" />
......@@ -371,7 +445,7 @@
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="10dp"
android:paddingRight="5dp"
android:textColor="@color/red"
android:textSize="23dp" />
......@@ -380,8 +454,8 @@
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="10dp"
android:text=" 公司补助: "
android:paddingRight="5dp"
android:text="公司补助: "
android:textColor="@color/font_black_32"
android:textSize="23dp" />
......@@ -391,7 +465,7 @@
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="10dp"
android:paddingRight="5dp"
android:textColor="@color/red"
android:textSize="23dp" />
......@@ -400,8 +474,8 @@
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="10dp"
android:text=" 个人消费: "
android:paddingRight="5dp"
android:text="个人消费: "
android:textColor="@color/font_black_32"
android:textSize="23dp" />
......@@ -411,7 +485,6 @@
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="10dp"
android:textColor="@color/red"
android:textSize="23dp" />
......
......@@ -8,6 +8,7 @@
<LinearLayout
android:id="@+id/ll"
android:layout_width="fill_parent"
android:layout_height="800dp"
android:layout_alignParentLeft="true"
......@@ -356,28 +357,102 @@
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="10dp"
android:text="消费人数:"
android:text="消费人数:(早餐:"
android:textColor="@color/font_black_32"
android:textSize="23dp" />
<TextView
android:id="@+id/tv_Total"
android:id="@+id/tv_BreakFastTotal"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="10dp"
android:paddingRight="5dp"
android:textColor="@color/red"
android:textSize="23dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginLeft="150dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="10dp"
android:paddingRight="5dp"
android:text="午餐:"
android:textColor="@color/font_black_32"
android:textSize="23dp" />
<TextView
android:id="@+id/tv_LunchTotal"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="5dp"
android:textColor="@color/red"
android:textSize="23dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="5dp"
android:text="晚餐:"
android:textColor="@color/font_black_32"
android:textSize="23dp" />
<TextView
android:id="@+id/tv_SupperTotal"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="5dp"
android:textColor="@color/red"
android:textSize="23dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="5dp"
android:text="夜宵:"
android:textColor="@color/font_black_32"
android:textSize="23dp" />
<TextView
android:id="@+id/tv_NightTotal"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:textColor="@color/red"
android:textSize="23dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="5dp"
android:text=")"
android:textColor="@color/font_black_32"
android:textSize="23dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginLeft="30dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="5dp"
android:text="合计:(消费金额:"
android:textColor="@color/font_black_32"
android:textSize="23dp" />
......@@ -388,7 +463,7 @@
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="10dp"
android:paddingRight="5dp"
android:textColor="@color/red"
android:textSize="23dp" />
......@@ -397,8 +472,8 @@
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="10dp"
android:text=" 公司补助: "
android:paddingRight="5dp"
android:text="公司补助: "
android:textColor="@color/font_black_32"
android:textSize="23dp" />
......@@ -408,7 +483,7 @@
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="10dp"
android:paddingRight="5dp"
android:textColor="@color/red"
android:textSize="23dp" />
......@@ -417,8 +492,8 @@
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="10dp"
android:text=" 个人消费: "
android:paddingRight="5dp"
android:text="个人消费: "
android:textColor="@color/font_black_32"
android:textSize="23dp" />
......@@ -428,7 +503,6 @@
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingRight="10dp"
android:textColor="@color/red"
android:textSize="23dp" />
......
......@@ -8,6 +8,7 @@
<LinearLayout
android:id="@+id/ll"
android:layout_width="fill_parent"
android:layout_height="800dp"
android:layout_centerHorizontal="true"
......
......@@ -126,6 +126,7 @@
android:layout_width="300dp"
android:layout_height="60dp"
android:gravity="center"
android:paddingRight="20dp"
android:text="备注"
android:textColor="@color/font_black_20"
android:textSize="25dp" />
......
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