新增优博讯适配器的部分代码
This commit is contained in:
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
BIN
app/libs/urobo.jar
Normal file
BIN
app/libs/urobo.jar
Normal file
Binary file not shown.
@ -61,6 +61,8 @@ import java.io.IOException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.*;
|
||||
|
||||
import android.device.ScanManager;
|
||||
import android.device.scanner.configuration.Triggering;
|
||||
/**
|
||||
* 富力叶不兼容版本代码
|
||||
* import com.olc.scan.IScanCallBack;
|
||||
@ -70,6 +72,10 @@ import java.util.*;
|
||||
/*
|
||||
* DecodeInfoCallBack 接口 是seuic的 扫描 后 的 回调接口
|
||||
*/
|
||||
|
||||
/**
|
||||
* 单据窗口
|
||||
*/
|
||||
public class DjActivity extends TabActivity implements OnInitListener, DecodeInfoCallBack,
|
||||
BarcodeReader.BarcodeListener,
|
||||
BarcodeReader.TriggerListener {
|
||||
@ -136,24 +142,7 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
ttsNr = null;
|
||||
}
|
||||
}
|
||||
};// 声音提示停止接口
|
||||
// /* 单据内容查询 */
|
||||
// public Runnable downloadRun = new Runnable() {
|
||||
// public void run() {
|
||||
// Object ob;
|
||||
// try {
|
||||
// ob = getWeather(formlx);
|
||||
// Message message = new Message();
|
||||
// message.obj = ob;
|
||||
// handler.sendMessage(message);
|
||||
// } catch (Exception e) {
|
||||
// Message message = new Message();
|
||||
// message.obj = e.toString();
|
||||
// message.what = -1;
|
||||
// handler.sendMessage(message);
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
};
|
||||
/* 菜单栏查询 */
|
||||
Runnable menuRun = new Runnable() {
|
||||
public void run() {
|
||||
@ -180,7 +169,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
// 当有消息发送出来的时候就执行Handler的这个方法
|
||||
public void handleMessage(Message msg) {
|
||||
super.handleMessage(msg);
|
||||
System.out.println("=========sd=================================" + msg.what);
|
||||
if (msg.what == -1) {
|
||||
if (pd != null) {
|
||||
pd.cancel();
|
||||
@ -244,12 +232,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
pd.cancel();
|
||||
DialogUtil.builder(DjActivity.this, "错误信息", "检索方案内容解析失败!", 0);
|
||||
}
|
||||
// String sql = msg.obj.toString();
|
||||
// String return_one = sql.substring(0, 1);
|
||||
// sql = sql.substring(1, sql.length());
|
||||
// Map map = SqlUtil.regSql(sql, hzTab, pageMap);
|
||||
// pd.setMessage("正在执行检索方案");
|
||||
// runSearch(map, return_one);
|
||||
} else if (msg.arg1 == 1) {
|
||||
String sql = null;
|
||||
try {
|
||||
@ -260,15 +242,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
return;
|
||||
}
|
||||
Map map = SqlUtil.regSql(sql, hzTab, pageMap);
|
||||
// if (mxData.size() > 0) {
|
||||
// map.put("mxSql", mxSql);
|
||||
// map.put("mxData",
|
||||
// DjUtil.organizationMxData(mxData,
|
||||
// pageMap.get("GZID")));
|
||||
// } else {
|
||||
// map.put("mxSql", "");
|
||||
// map.put("mxData", null);
|
||||
// }
|
||||
map.put("gzid", pageMap.get("GZID"));
|
||||
map.put("mxTempTable", mxTempTable);
|
||||
Map hzData = DjUtil.organizationHzData(hzTab, pageMap.get("GZID"));
|
||||
@ -315,25 +288,12 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
super.handleMessage(msg);
|
||||
View rootview = DjActivity.this.getWindow().getDecorView();
|
||||
View aaa = rootview.findFocus();
|
||||
// View bbb =
|
||||
// hzTab.findViewWithTag(defaultFocus2.toUpperCase().trim());
|
||||
// if (aaa == bbb && defaultFocus2 != null) {
|
||||
// DjUtil.setFocus(hzTab, defaultFocus2);
|
||||
// }
|
||||
if (aaa instanceof SelfEditText) {
|
||||
m_view = aaa;
|
||||
SelfEditText set = (SelfEditText) aaa;
|
||||
if (set.getText().length() > 0)
|
||||
set.selectAll();
|
||||
}
|
||||
/*
|
||||
if (defaultFocus2 != null) {
|
||||
View bbb = hzTab.findViewWithTag(defaultFocus2.toUpperCase().trim());
|
||||
if (bbb instanceof SelfEditText) {
|
||||
if (((SelfEditText)bbb).getText().length() > 0)
|
||||
DjUtil.setFocus(hzTab, defaultFocus2);
|
||||
}
|
||||
}*/
|
||||
if (msg.what == -1) {
|
||||
pd.cancel();
|
||||
DialogUtil.builder(DjActivity.this, "错误信息", "检索方案执行失败:" + msg.obj.toString(), 0);
|
||||
@ -368,12 +328,9 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
}
|
||||
String speakFld = (map.get("audioFld")).toString();
|
||||
if (map.get("return_one").equals("Y") && len < 2) {
|
||||
// System.out.println("检索方案");
|
||||
// if (len > 0) {
|
||||
Map paramValueMap = (Map) dg.getTableData().get(0);
|
||||
play(paramValueMap, speakFld);
|
||||
DjUtil.setUiValue(hzTab, paramValueMap, pageMap, imgHandler);
|
||||
// }
|
||||
} else {
|
||||
Intent intent = new Intent();
|
||||
intent.setClass(getApplicationContext(), ParamActivity.class);
|
||||
@ -387,31 +344,7 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
}
|
||||
pd.cancel();
|
||||
} else if (msg.arg1 == 2) {// 页面修改方案
|
||||
// byte[] bb = org.kobjects.base64.Base64.decode(msg.obj
|
||||
// .toString());
|
||||
Object ob = msg.obj;
|
||||
// try {
|
||||
// ob = IoUtil.byte_obj(bb);
|
||||
// } catch (Exception e) {
|
||||
// DialogUtil.builder(DjActivity.this, "提示信息",
|
||||
// "数据转换失败");
|
||||
// }
|
||||
// if (ob instanceof Map) {
|
||||
// Map map = (Map) ob;
|
||||
// DjUtil.setUiValue(hzTab, (List) map.get("hz"),
|
||||
// pageMap, imgHandler);
|
||||
// // mxData.clear();
|
||||
// // mxData.addAll((List) map.get("mx"));
|
||||
// // mxAdapter.notifyDataSetChanged();
|
||||
// // System.out.println(map.get("msg"));
|
||||
// if (map.get("msg") != null) {
|
||||
// DialogUtil.builder(DjActivity.this, "提示信息", map
|
||||
// .get("msg").toString());
|
||||
// }
|
||||
// } else {
|
||||
// DialogUtil.builder(DjActivity.this, "提示信息",
|
||||
// ob.toString());
|
||||
// }
|
||||
if (ob instanceof Map) {
|
||||
Map map = (Map) ob;
|
||||
List<Map<String, Object>> list = (List<Map<String, Object>>) map.get("hz");
|
||||
@ -422,10 +355,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
} else if ("MESSAGE_AUDIO".equals(tm.get("fieldname")))
|
||||
paramValueMap = tm;
|
||||
}
|
||||
// Map paramValueMap = (Map)
|
||||
// dg.getTableData().get(0);
|
||||
// String speakFld =
|
||||
// (map.get("audioFld")).toString();
|
||||
play(paramValueMap, "fieldValue");
|
||||
DjUtil.setUiValue(hzTab, (List) map.get("hz"), pageMap, imgHandler);
|
||||
|
||||
@ -468,14 +397,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
String mess = msg.obj.toString();
|
||||
if (mess.substring(0, 2).equals("ok")) {
|
||||
String djbh = mess.substring(2, mess.length());
|
||||
// if(pageMap.containsKey("DJBH")){
|
||||
// djbh=pageMap.get("DJBH").toString();
|
||||
// }else{
|
||||
// View et=hzTab.findViewWithTag("DJBH");
|
||||
// if(et instanceof InputInterface){
|
||||
// djbh=((InputInterface)et).getText().toString();
|
||||
// }
|
||||
// }
|
||||
mxData.clear();
|
||||
mxAdapter.notifyDataSetChanged();
|
||||
hzTab.setCurrentTab(0);
|
||||
@ -492,7 +413,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
pd.cancel();
|
||||
} else if (msg.arg1 == 4) {
|
||||
if (tabhost.getCurrentTab() != 0) {
|
||||
// hzTab.setCurrentTab(0);
|
||||
hzTab.clearAllTabs();
|
||||
mxData.clear();
|
||||
fangAMap.clear();
|
||||
@ -524,17 +444,12 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
|
||||
}
|
||||
if (nextFocusTag != null) {
|
||||
// System.out.println(nextFocusTag
|
||||
// + "----------------------------");
|
||||
setNextFocus(nextFocusTag);
|
||||
nextFocusTag = null;
|
||||
}
|
||||
if (isLinghtScreen) {
|
||||
releaseLinghtScreen();
|
||||
}
|
||||
// if (dc != null) {
|
||||
// dc.start();
|
||||
// }
|
||||
if (newScanControler != null) {
|
||||
newScanControler.scanOnce();// 如果PDA是ht518 则一进入单据就打开扫描
|
||||
}
|
||||
@ -551,7 +466,9 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
androidHandheldTerminal.start();
|
||||
if (nr510ScanControl != null)
|
||||
nr510ScanControl.start(DjActivity.this);
|
||||
|
||||
if(uroBoScannerControl!=null){
|
||||
uroBoScannerControl.start();
|
||||
}
|
||||
if (barcodeReader != null) {
|
||||
continuousScanning(true);
|
||||
}
|
||||
@ -564,17 +481,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
reReadCode = true;
|
||||
}
|
||||
};
|
||||
/*
|
||||
* mt35a 扫描所需变量 private DeviceControl DevCtrl; private SerialPort
|
||||
* mSerialPort; public int fd; private ReadThread mReadThread; private
|
||||
* static final String TAG = "SerialPort"; private boolean key_start =
|
||||
* true;// 指明scan键的状态 private boolean Powered = false;// 指明扫头是否上电 private
|
||||
* boolean Opened = false;// // 指明串口是否打开 private Timer timer = new Timer();
|
||||
* private Timer retrig_timer = new Timer(); private SoundPool soundPool;
|
||||
* private int soundId; private Handler succeed_handler = null; private
|
||||
* Handler t_handler = null; private Handler n_handler = null; private
|
||||
* boolean ops = false;// 指明程序是否初始化**
|
||||
*/
|
||||
/* 事件 */
|
||||
public OnFocusChangeEvent focusEvent;
|
||||
public OnClickEvent clickEvent;
|
||||
@ -601,7 +507,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
try {
|
||||
DanJuEntity dj = (DanJuEntity) IoUtil.byte_obj2(danju.getFORM());
|
||||
if (SysData.is_lx) {// 如果是离线单据就在PDA上生成临时表
|
||||
System.out.println(danju.getFORMbs() + "-----" + formlx);
|
||||
String tableName = "CR_DJBS_".concat(danju.getFORMbs()).concat(formlx);
|
||||
String createMxTableSql = "create table ".concat(tableName).concat("(gzid char(11),dj_sn int null default 0,");
|
||||
HashMap mxFiledMap = null;
|
||||
@ -626,7 +531,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
}
|
||||
createMxTableSql = createMxTableSql.concat(" CONSTRAINT cr_").concat(danju.getFORMbs()).concat("_").concat(formlx)
|
||||
.concat("_PK PRIMARY KEY (gzid,dj_sn))");
|
||||
System.out.println(dj.mxzdArray.size() + "------------sql:" + createMxTableSql);
|
||||
if (dbManager.existsTable(tableName) > 0) {
|
||||
dbManager.exeSql("drop table ".concat(tableName));
|
||||
}
|
||||
@ -641,13 +545,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
Dom4jUtil.testParseXMLData(in, DjActivity.this);
|
||||
if (dj.mxzdArray.size() > 0) {
|
||||
mxTitle.setText(((Map) dj.mxzdArray.get(0)).get("chnname").toString().trim());
|
||||
// mxAdapter = new SimpleAdapter(
|
||||
// DjActivity.this,
|
||||
// mxData,
|
||||
// R.layout.activity_menu,
|
||||
// new String[] { ((Map) dj.mxzdArray.get(0))
|
||||
// .get("fdname").toString().trim().toUpperCase() },
|
||||
// new int[] { R.id.title });
|
||||
if (mxAdapter != null) {
|
||||
mxAdapter.clear();
|
||||
}
|
||||
@ -699,7 +596,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
in = null;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -723,7 +619,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
|
||||
public void queryMx(View v) {
|
||||
if (mxQuerySql == null) {
|
||||
// DialogUtil.builder(DjActivity.this, "提示信息", "明细未设置", 0);
|
||||
return;
|
||||
}
|
||||
DialogUtil.setDialog(pd, "正在查询单据内容", "正在查询明细……");
|
||||
@ -736,15 +631,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
DialogUtil.builder(DjActivity.this, "提示信息", "请下载单据表", 0);
|
||||
return;
|
||||
}
|
||||
// if (dbManager.existsTable("sys_SearchOptions".toUpperCase()) < 1)
|
||||
// {
|
||||
// DialogUtil.builder(DjActivity.this, "提示信息", "请下载检索方案表");
|
||||
// return;
|
||||
// }
|
||||
// if (dbManager.existsTable("sys_YmupOptions".toUpperCase()) < 1) {
|
||||
// DialogUtil.builder(DjActivity.this, "提示信息", "请下载页面修改方案表");
|
||||
// return;
|
||||
// }
|
||||
}
|
||||
DialogUtil.setDialog(pd, "正在查询单据内容", "正在下载……");
|
||||
Map map = (Map) menuData.get(currentDjId);
|
||||
@ -759,7 +645,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
mxTempTable = null;
|
||||
mxSql = null;
|
||||
tabhost.setCurrentTab(1);
|
||||
// hzTab.setCurrentTab(0);
|
||||
hzTab.clearAllTabs();
|
||||
if (SysData.is_lx) {
|
||||
new Thread(new LxDJNrThread(dbManager, handler, formlx)).start();
|
||||
@ -772,10 +657,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_dj);
|
||||
// layout = new RelativeLayout(this);
|
||||
// layout.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
|
||||
// layout.setBackgroundColor(Color.WHITE);
|
||||
// setContentView(layout);
|
||||
if (SysData.url != null) {
|
||||
this.setTitle(SysData.no + " " + SysData.url.substring(SysData.url.indexOf("//") + 2, 24));
|
||||
}
|
||||
@ -811,9 +692,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
}
|
||||
tabhost = getTabHost();
|
||||
tabhost.addTab(tabhost.newTabSpec("djmenu").setIndicator("菜单").setContent(R.id.djmenu));
|
||||
// tabhost.addTab(tabhost.newTabSpec("hz").setIndicator("汇总")
|
||||
// .setContent(R.id.hz));
|
||||
// mxActivity=new MxActivity();
|
||||
tabhost.addTab(tabhost.newTabSpec("hz").setIndicator("汇总").setContent(R.id.hz));
|
||||
tabhost.addTab(tabhost.newTabSpec("mx").setIndicator("明细").setContent(R.id.mx));
|
||||
TabWidget tabwidget = tabhost.getTabWidget();
|
||||
@ -874,12 +752,8 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// TODO Auto-generated method stub
|
||||
((Button) findViewById(R.id.mxbut)).performClick();
|
||||
tabhost.setCurrentTab(2);
|
||||
// tabhost.getTabWidget().setCurrentTab(2);
|
||||
// DialogUtil.builder(DjActivity.this, "测试标题","测试内容!" +
|
||||
// v.getLeft(), 18);
|
||||
}
|
||||
});
|
||||
|
||||
@ -887,7 +761,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// TODO Auto-generated method stub
|
||||
tabhost.setCurrentTab(1);
|
||||
if (defaultFocus2 != null) {
|
||||
DjUtil.setFocus(hzTab, defaultFocus2);
|
||||
@ -895,8 +768,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
}
|
||||
});
|
||||
|
||||
// mxAdapter = new SimpleAdapter(this, mxData, R.layout.activity_menu,
|
||||
// new String[] { "mname" }, new int[] { R.id.title });
|
||||
phoneModel = android.os.Build.MODEL.toLowerCase();
|
||||
System.out.println(phoneModel + "--------------phoneModel---------------");
|
||||
if (phoneModel.equals("zk-r322a") || phoneModel.equals("zk-r322") || phoneModel.equals("zk-r323") || phoneModel.equals("zk-r323a")) {
|
||||
@ -916,6 +787,8 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
//androidHandheldTerminal = new AndroidHandheldTerminal();
|
||||
} else if ("nr510".equals(phoneModel) || "android".equals(phoneModel)) {
|
||||
nr510ScanControl = new Nr510ScanControl();
|
||||
}else if("i6200series".equals(phoneModel)){
|
||||
uroBoScannerControl=new UroBoScannerControl();
|
||||
} else if ("scanpal eda50".equals(phoneModel)) {
|
||||
// get bar code instance from MainActivity
|
||||
// DialogUtil.builder(DjActivity.this, "信息", "初始化失败:111111111111111111", 0);
|
||||
@ -1181,6 +1054,8 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
androidHandheldTerminal0.start();
|
||||
} else if (haixinN1SDemoReceiver != null) {
|
||||
haixinN1sStart();
|
||||
}else if(uroBoScannerControl!=null){
|
||||
uroBoScannerControl.start();
|
||||
}
|
||||
if (seuicScanner != null) {// seuic PDA操作
|
||||
boolean b = seuicScanner.open();
|
||||
@ -1208,13 +1083,14 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
System.out.println("onStart");
|
||||
if (newScanControler != null) {
|
||||
newScanControler.scanOnce();
|
||||
}
|
||||
else if (seuicScanner != null) {
|
||||
} else if (seuicScanner != null) {
|
||||
seuicScanner.setDecodeInfoCallBack(this);
|
||||
seuicScanner.open();
|
||||
}
|
||||
else if (cr5wScanControl != null)
|
||||
} else if (cr5wScanControl != null)
|
||||
cr5wScanControl.start(DjActivity.this);
|
||||
else if(uroBoScannerControl!=null){
|
||||
uroBoScannerControl.start();
|
||||
}
|
||||
else if (nr510ScanControl != null)
|
||||
nr510ScanControl.start(DjActivity.this);
|
||||
else if (androidHandheldTerminal != null)
|
||||
@ -1238,8 +1114,7 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
super.onPause();
|
||||
if (newScanControler != null) {
|
||||
newScanControler.stopScan();
|
||||
}
|
||||
else if (cr5wScanControl != null)
|
||||
} else if (cr5wScanControl != null)
|
||||
cr5wScanControl.stop(DjActivity.this);
|
||||
else if (nr510ScanControl != null)
|
||||
nr510ScanControl.stop(DjActivity.this);
|
||||
@ -1249,6 +1124,8 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
androidHandheldTerminal0.stop();
|
||||
} else if (haixinN1SDemoReceiver != null) {
|
||||
haixinN1sStop();
|
||||
}else if(uroBoScannerControl!=null){
|
||||
uroBoScannerControl.stop();
|
||||
}
|
||||
System.out.println("onPause");
|
||||
if (seuicScanner != null) {// seuic PDA操作
|
||||
@ -1700,6 +1577,8 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
nr510ScanControl.stop(DjActivity.this);
|
||||
else if (haixinN1SDemoReceiver != null) {
|
||||
haixinN1sStop();
|
||||
}else if(uroBoScannerControl!=null){
|
||||
uroBoScannerControl.stop();
|
||||
}
|
||||
// else if (androidHandheldTerminal0 != null)
|
||||
// androidHandheldTerminal0.stop();
|
||||
@ -1726,6 +1605,8 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
androidHandheldTerminal.stop();
|
||||
else if (haixinN1SDemoReceiver != null) {
|
||||
haixinN1sStop();
|
||||
}else if(uroBoScannerControl!=null){
|
||||
uroBoScannerControl.stop();
|
||||
}
|
||||
// else if (androidHandheldTerminal0 != null)
|
||||
// androidHandheldTerminal0.stop();
|
||||
@ -1802,13 +1683,10 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
|
||||
/* 运行检索方案 */
|
||||
public void runSearch(Map map, String return_one, String audioFld) {
|
||||
// new SearchThread(formlx, "WMSW87_01", sqlHandler).start();
|
||||
try {
|
||||
new RunSearchThread(map.get("sql").toString(), IoUtil.ob_base64(map.get("param")), runHandler, return_one, audioFld).start();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
DialogUtil.builder(this, "错误信息", "转换成Base64编码失败!", 0);
|
||||
// e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1821,9 +1699,7 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
public void onInit(int status) {
|
||||
if (status == TextToSpeech.SUCCESS) {
|
||||
tts.setLanguage(Locale.CHINA);
|
||||
}
|
||||
|
||||
else if (status == TextToSpeech.ERROR) {
|
||||
} else if (status == TextToSpeech.ERROR) {
|
||||
Toast.makeText(DjActivity.this, "始化文本到语音引擎时发生错误", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
@ -1974,8 +1850,10 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
|
||||
// 富力叶 android handheld terminal 扫描头
|
||||
AndroidHandheldTerminal0 androidHandheldTerminal0 = null;
|
||||
|
||||
public class AndroidHandheldTerminal0 {
|
||||
public boolean running = true;
|
||||
|
||||
public AndroidHandheldTerminal0(final Context context) {
|
||||
ScanHelper.setScanSwitchLeft(context, true);
|
||||
ScanHelper.setScanSwitchRight(context, true);
|
||||
@ -2009,9 +1887,10 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
|
||||
private String m_Broadcastname = null;
|
||||
private MyCodeReceiver myCodeReceiver = new MyCodeReceiver();
|
||||
public class MyCodeReceiver extends BroadcastReceiver
|
||||
{
|
||||
|
||||
public class MyCodeReceiver extends BroadcastReceiver {
|
||||
private static final String TAG = "MycodeReceiver";
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (androidHandheldTerminal0.running && intent.getAction().equals(m_Broadcastname)) {
|
||||
@ -2045,6 +1924,7 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 海信 n1s 设备扫描头控制
|
||||
public static final String HAIXIN_N1S_ACTION_SCAN_RESULT = "android.provider.sdlMessage";
|
||||
public static boolean haixinN1SStart = false;
|
||||
@ -2080,7 +1960,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
if (aaa instanceof SelfEditText) {
|
||||
SelfEditText set = (SelfEditText) aaa;
|
||||
set.setText(scanResultStr);
|
||||
//
|
||||
new Thread(new Runnable() {
|
||||
|
||||
@Override
|
||||
@ -2095,7 +1974,6 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
});
|
||||
}
|
||||
}
|
||||
//
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -2118,6 +1996,7 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
// 富力叶 android handheld terminal 扫描头
|
||||
|
||||
public static AndroidHandheldTerminal androidHandheldTerminal = null;
|
||||
|
||||
/* 富力叶不兼容代码
|
||||
private Handler androidHandheldTerminalHandler = new MainHandler();
|
||||
|
||||
@ -2248,7 +2127,7 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
};
|
||||
/**
|
||||
* cr5w 设备扫描头控制
|
||||
* */
|
||||
*/
|
||||
public static CR5WScanControl cr5wScanControl = null;
|
||||
|
||||
/**
|
||||
@ -2546,4 +2425,70 @@ public class DjActivity extends TabActivity implements OnInitListener, DecodeInf
|
||||
//continuousScanning(true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 优博讯控制器
|
||||
*/
|
||||
UroBoScannerControl uroBoScannerControl=null;
|
||||
public class UroBoScannerControl extends BroadcastReceiver {
|
||||
private ScanManager mScanManager;
|
||||
private Vibrator mVibrator;
|
||||
private SoundPool soundPool;
|
||||
private int soundid;
|
||||
|
||||
public UroBoScannerControl() {
|
||||
mScanManager = new ScanManager();
|
||||
mScanManager.openScanner();
|
||||
mScanManager.switchOutputMode(0);
|
||||
if (mScanManager.getTriggerMode() != Triggering.CONTINUOUS)
|
||||
mScanManager.setTriggerMode(Triggering.CONTINUOUS);
|
||||
|
||||
|
||||
soundPool = new SoundPool(1, AudioManager.STREAM_NOTIFICATION, 100); // MODE_RINGTONE
|
||||
soundid = soundPool.load(DjActivity.this, R.raw.beep, 1);
|
||||
|
||||
mVibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
Window window = getWindow();
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
}
|
||||
|
||||
public void start() {
|
||||
mScanManager.startDecode();
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.addAction(""); //添加action
|
||||
registerReceiver(this, filter);
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
unregisterReceiver(this);
|
||||
mScanManager.stopDecode();
|
||||
mVibrator.cancel();
|
||||
soundPool.release();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
soundPool.play(soundid, 1, 1, 0, 0, 1);
|
||||
mVibrator.vibrate(100);
|
||||
|
||||
byte[] barcode = intent.getByteArrayExtra("barocode");
|
||||
int barocodelen = intent.getIntExtra("length", 0);
|
||||
String barcodeStr = new String(barcode, 0, barocodelen);
|
||||
handler.post(new Runnable() {
|
||||
public void run() {
|
||||
View rootview = DjActivity.this.getWindow().getDecorView();
|
||||
View aaa = rootview.findFocus();
|
||||
if (aaa instanceof SelfEditText) {
|
||||
SelfEditText set = (SelfEditText) aaa;
|
||||
if (set.closeKeyBoard) {
|
||||
set.setText(barcodeStr);
|
||||
set.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_ENTER));
|
||||
set.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_ENTER));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,23 +1,5 @@
|
||||
package com.example.chaoran;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.kobjects.base64.Base64;
|
||||
|
||||
import com.chaoran.component.MyAdapter;
|
||||
import com.chaoran.entiry.DataGrid;
|
||||
import com.chaoran.entiry.Djselefa;
|
||||
import com.example.chaoran.R;
|
||||
import com.util.DialogUtil;
|
||||
import com.util.IoUtil;
|
||||
import com.util.SqlUtil;
|
||||
import com.util.SysUtil;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
@ -27,11 +9,26 @@ import android.os.Message;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.ListView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.TextView;
|
||||
import com.chaoran.component.MyAdapter;
|
||||
import com.chaoran.entiry.DataGrid;
|
||||
import com.chaoran.entiry.Djselefa;
|
||||
import com.util.DialogUtil;
|
||||
import com.util.IoUtil;
|
||||
import com.util.SqlUtil;
|
||||
import com.util.SysUtil;
|
||||
import org.kobjects.base64.Base64;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* 单据提取窗口
|
||||
*/
|
||||
public class DjtqActivity extends Activity {
|
||||
private ListView listview;
|
||||
private int cur_pos = -1;// 当前显示的一行
|
||||
|
||||
@ -11,6 +11,9 @@ import android.util.Log;
|
||||
|
||||
import com.sys.SysData;
|
||||
|
||||
/**
|
||||
* 退出线程
|
||||
*/
|
||||
public class ExitThread extends Thread {
|
||||
public String gzid;
|
||||
public String mxTempTable;
|
||||
|
||||
@ -1,64 +1,23 @@
|
||||
package com.example.chaoran;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.ksoap2.SoapEnvelope;
|
||||
import org.ksoap2.serialization.SoapObject;
|
||||
import org.ksoap2.serialization.SoapSerializationEnvelope;
|
||||
import org.ksoap2.transport.HttpTransportSE;
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
import com.chaoran.db.DBManager;
|
||||
import com.chaoran.db.SqlHelpUtil;
|
||||
import com.chaoran.entiry.UpdataInfo;
|
||||
import com.chaoran.entiry.UserList;
|
||||
import com.chaoran.lx.activity.DownDataActivity;
|
||||
import com.chaoran.thread.DownApk;
|
||||
import com.example.chaoran.R;
|
||||
import com.honeywell.aidc.AidcManager;
|
||||
import com.honeywell.aidc.AidcManager.CreatedCallback;
|
||||
import com.honeywell.aidc.BarcodeReader;
|
||||
import com.sys.SysData;
|
||||
import com.util.DialogUtil;
|
||||
import com.util.Dom4jUtil;
|
||||
import com.util.InstallUtil;
|
||||
import com.util.IoUtil;
|
||||
import com.util.SysUtil;
|
||||
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager.NameNotFoundException;
|
||||
|
||||
import android.net.wifi.WifiManager;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.Context;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.SharedPreferences.Editor;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.PackageManager.NameNotFoundException;
|
||||
import android.content.res.Configuration;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
@ -67,7 +26,29 @@ import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import com.chaoran.db.DBManager;
|
||||
import com.chaoran.db.SqlHelpUtil;
|
||||
import com.chaoran.entiry.UpdataInfo;
|
||||
import com.chaoran.entiry.UserList;
|
||||
import com.chaoran.lx.activity.DownDataActivity;
|
||||
import com.chaoran.thread.DownApk;
|
||||
import com.honeywell.aidc.AidcManager;
|
||||
import com.honeywell.aidc.AidcManager.CreatedCallback;
|
||||
import com.honeywell.aidc.BarcodeReader;
|
||||
import com.sys.SysData;
|
||||
import com.util.*;
|
||||
import org.ksoap2.SoapEnvelope;
|
||||
import org.ksoap2.serialization.SoapObject;
|
||||
import org.ksoap2.serialization.SoapSerializationEnvelope;
|
||||
import org.ksoap2.transport.HttpTransportSE;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
|
||||
/**
|
||||
* 主活动窗口
|
||||
*/
|
||||
public class MainActivity extends Activity {
|
||||
SqlHelpUtil db;
|
||||
SQLiteDatabase sDatabase;
|
||||
@ -103,8 +84,6 @@ public class MainActivity extends Activity {
|
||||
DialogUtil.builder(MainActivity.this, "错误信息", "更新文件失败!",0);
|
||||
} else if (msg.what == 1) {
|
||||
UpdataInfo info = (UpdataInfo) msg.obj;
|
||||
System.out.println(info+"---------------------");
|
||||
System.out.println(versionStr+"---------------------");
|
||||
if (info!=null&&!info.getVersion().equals(versionStr)) {
|
||||
showUpdataDialog(info);
|
||||
}
|
||||
@ -115,7 +94,6 @@ public class MainActivity extends Activity {
|
||||
DialogUtil.builder(MainActivity.this, "提示信息", "该功能未授权!",0);
|
||||
} else {
|
||||
UserList user = (UserList) msg.obj;
|
||||
// System.out.println(so.hasProperty("lgnname"));
|
||||
if (user.getLgnname() == null) {
|
||||
String udesc = user.getUdesc();
|
||||
if (udesc.equals("0")) {
|
||||
@ -136,29 +114,8 @@ public class MainActivity extends Activity {
|
||||
}
|
||||
|
||||
} else {
|
||||
// SysData.username=
|
||||
// so.getProperty("username").toString().trim();
|
||||
SysData.is_lx = false;
|
||||
login_end(user);
|
||||
// SysData.jigid = user.getJigid();
|
||||
// SysData.lgnname = user.getLgnname();
|
||||
// SysData.userid = String.valueOf(user.getUserid());
|
||||
// SysData.scale = MainActivity.this.getResources()
|
||||
// .getDisplayMetrics().density + 1;
|
||||
// SharedPreferences sp = MainActivity.this
|
||||
// .getSharedPreferences("userTxt", MODE_PRIVATE);
|
||||
// Editor editor = sp.edit();
|
||||
// editor.putString("name", name.getText().toString()
|
||||
// .trim());
|
||||
// editor.putString("pwd",
|
||||
// pwd.getText().toString().trim());
|
||||
// editor.commit();
|
||||
// Intent intent = new Intent();
|
||||
// intent.putExtra("displaymode",
|
||||
// user.getDisplaymode());
|
||||
// intent.setClass(getApplicationContext(),
|
||||
// DjActivity.class);
|
||||
// startActivity(intent);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -185,16 +142,10 @@ public class MainActivity extends Activity {
|
||||
SysData.lgnname = user.getLgnname();
|
||||
SysData.userid = String.valueOf(user.getUserid());
|
||||
SysData.scale = MainActivity.this.getResources().getDisplayMetrics().density + 1;
|
||||
//SysData.t_scale = MainActivity.this.getResources().getDisplayMetrics().densityDpi >= 200f ? 200f / MainActivity.this.getResources().getDisplayMetrics().densityDpi : 200f * 0.95f / MainActivity.this.getResources().getDisplayMetrics().densityDpi;
|
||||
SysData.t_scale = MainActivity.this.getResources().getDisplayMetrics().densityDpi >= 300f ? 1 : 300f * def_pbl / MainActivity.this.getResources().getDisplayMetrics().densityDpi;
|
||||
SysData.exectime=Integer.parseInt(user.getUdesc() == null ? "60" : user.getUdesc());
|
||||
System.out.println(SysData.exectime+"---------------------------------------SysData.exectime");
|
||||
SharedPreferences sp = MainActivity.this.getSharedPreferences(
|
||||
"userTxt", MODE_PRIVATE);
|
||||
// Editor editor = sp.edit();
|
||||
// editor.putString("name", name.getText().toString().trim());
|
||||
// editor.putString("pwd", pwd.getText().toString().trim());
|
||||
// editor.commit();
|
||||
if (checkBox.isChecked()) {
|
||||
Editor editor = sp.edit();
|
||||
editor.putString("name", name.getText().toString().trim());
|
||||
@ -245,8 +196,6 @@ public class MainActivity extends Activity {
|
||||
TextView version = (TextView) findViewById(R.id.version);
|
||||
versionStr=getVersionName();
|
||||
version.setText("版本".concat(versionStr));
|
||||
// SysData.clientid = Secure.getString(getContentResolver(),
|
||||
// Secure.ANDROID_ID);
|
||||
SysData.clientid = SysUtil.getLocalMacAddress(MainActivity.this);
|
||||
db = new SqlHelpUtil(getApplicationContext());
|
||||
sDatabase = db.getWritableDatabase();
|
||||
@ -269,7 +218,6 @@ public class MainActivity extends Activity {
|
||||
new Thread(new CheckVersionTask()).start();
|
||||
new Thread(queryZcrq).start();
|
||||
}
|
||||
//
|
||||
BufferedReader br = null;
|
||||
BufferedWriter bw = null;
|
||||
File file = new File(getFilesDir().getAbsolutePath() + "/cr_pda_config");
|
||||
@ -311,7 +259,6 @@ public class MainActivity extends Activity {
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
if ("scanpal eda50".equals(android.os.Build.MODEL.toLowerCase())) {
|
||||
AidcManager.create(this, new CreatedCallback() {
|
||||
|
||||
@ -339,10 +286,6 @@ public class MainActivity extends Activity {
|
||||
public void run() {
|
||||
try {
|
||||
String url = SysData.url + "/webservice/ServiceInterface?wsdl";
|
||||
// System.out
|
||||
// .println(url
|
||||
// +
|
||||
// "--------------============================================");
|
||||
String method = "regEndRq";
|
||||
SoapObject rpc = new SoapObject("", method);
|
||||
HttpTransportSE ht = new HttpTransportSE(url, SysData.timeout);
|
||||
@ -391,27 +334,15 @@ public class MainActivity extends Activity {
|
||||
public void onset(View v) {
|
||||
Intent intent = new Intent();
|
||||
intent.setClass(this, NetWorkSet.class);
|
||||
// intent.setClass(getApplicationContext(), BDMapActivity.class);
|
||||
startActivity(intent);
|
||||
// startActivityForResult(intent,0);
|
||||
}
|
||||
|
||||
public void onopentest(View v) {
|
||||
DialogUtil.builder(this, "测试标题","测试内容!open" + v.getLeft(), 18);
|
||||
// ScanManager sm = (ScanManager) getSystemService("olc_service_scan");
|
||||
//
|
||||
// sm.setScanSwitchLeft(false);
|
||||
// sm.setScanSwitchRight(false);
|
||||
// sm.setScanSwitchMiddle(false);
|
||||
}
|
||||
|
||||
public void onclosetest(View v) {
|
||||
DialogUtil.builder(this, "测试标题","测试内容!close" + v.getLeft(), 18);
|
||||
// ScanManager sm = (ScanManager) getSystemService("olc_service_scan");
|
||||
//
|
||||
// sm.setScanSwitchLeft(true);
|
||||
// sm.setScanSwitchRight(true);
|
||||
// sm.setScanSwitchMiddle(true);
|
||||
}
|
||||
|
||||
// 设置按钮监听
|
||||
@ -445,10 +376,6 @@ public class MainActivity extends Activity {
|
||||
|
||||
// 设置按钮监听
|
||||
public void onsub(View v) {
|
||||
// if (SysData.url == null) {
|
||||
// DialogUtil.builder(this, "错误信息", "请检查网络!");
|
||||
// return;
|
||||
// }
|
||||
loginTy = 1;
|
||||
start_login();
|
||||
}
|
||||
@ -482,20 +409,12 @@ public class MainActivity extends Activity {
|
||||
DialogUtil.setDialog(pd, "提示", "正在登录……");
|
||||
}
|
||||
|
||||
// DialogUtil.setDialog(pd, "提示", "" + MainActivity.this.getResources().getDisplayMetrics().densityDpi);
|
||||
new Thread(downloadRun).start();
|
||||
}
|
||||
|
||||
public void login(String name, String pwd) {
|
||||
// WifiManager wifiManager=(WifiManager)
|
||||
// this.getSystemService(Context.WIFI_SERVICE);
|
||||
// wifiManager.disconnect();
|
||||
// wifiManager.reconnect();
|
||||
try {
|
||||
String url = SysData.url + "/webservice/ServiceInterface?wsdl";
|
||||
// System.out
|
||||
// .println(url
|
||||
// + "--------------============================================");
|
||||
String method = "login";
|
||||
SoapObject rpc = new SoapObject("", method);
|
||||
rpc.addProperty("name", name);
|
||||
@ -510,10 +429,6 @@ public class MainActivity extends Activity {
|
||||
envelope.setOutputSoapObject(rpc);
|
||||
ht.call("", envelope);
|
||||
if (envelope.getResponse() != null) {
|
||||
// SoapObject result = (SoapObject) envelope.bodyIn;
|
||||
// SoapObject soapChilds = (SoapObject) result.getProperty(0);
|
||||
// System.out.println(soapChilds+"---"+soapChilds.getProperty("jigid"));
|
||||
// System.out.println(soapChilds.getProperty("jigid"));
|
||||
byte[] bb = org.kobjects.base64.Base64.decode(envelope
|
||||
.getResponse().toString());
|
||||
Message message = new Message();
|
||||
@ -601,16 +516,13 @@ public class MainActivity extends Activity {
|
||||
HttpURLConnection conn = null;
|
||||
try {
|
||||
String path = SysData.url + "/apk.xml";
|
||||
System.out.println(path+"----------------------");
|
||||
URL url = new URL(path);
|
||||
conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setConnectTimeout(5000);
|
||||
if (conn.getResponseCode() == 200) {
|
||||
is = conn.getInputStream();
|
||||
// UpdataInfo info = getUpdataInfo(is);
|
||||
Message msg = new Message();
|
||||
msg.what = 1;
|
||||
System.out.println(versionStr);
|
||||
msg.obj = Dom4jUtil.parserXml(is,versionStr);
|
||||
handler.sendMessage(msg);
|
||||
}
|
||||
@ -637,9 +549,6 @@ public class MainActivity extends Activity {
|
||||
case R.id.lxdatadown:
|
||||
loginTy = 2;
|
||||
start_login();
|
||||
// Intent intent = new Intent();
|
||||
// intent.setClass(getApplicationContext(), DownDataActivity.class);
|
||||
// startActivity(intent);
|
||||
break;
|
||||
case R.id.lxlogin:
|
||||
if (!isNull()) {
|
||||
@ -687,7 +596,6 @@ public class MainActivity extends Activity {
|
||||
* 该方法解决屏幕旋转程序崩溃,需要对应 AndroidManifest.xml 文件 android:configChanges="orientation|screenSize|keyboardHidden" 配置
|
||||
*/
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
// TODO Auto-generated method stub
|
||||
super.onConfigurationChanged(newConfig);
|
||||
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
Toast.makeText(this, "转换横屏", Toast.LENGTH_SHORT).show();
|
||||
|
||||
@ -1,34 +1,31 @@
|
||||
package com.example.chaoran;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.view.Menu;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.ListView;
|
||||
import android.widget.SimpleAdapter;
|
||||
import com.sys.SysData;
|
||||
import org.ksoap2.SoapEnvelope;
|
||||
import org.ksoap2.serialization.SoapObject;
|
||||
import org.ksoap2.serialization.SoapSerializationEnvelope;
|
||||
import org.ksoap2.transport.HttpTransportSE;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.chaoran.entiry.DanJuEntity;
|
||||
import com.example.chaoran.R;
|
||||
import com.sys.SysData;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.view.Menu;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.SimpleAdapter;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
|
||||
/**
|
||||
* 菜单窗口
|
||||
*/
|
||||
public class MenuActivity extends Activity {
|
||||
private ListView listView;
|
||||
private List mData;
|
||||
|
||||
@ -33,6 +33,9 @@ import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
/**
|
||||
* 网络相关窗口
|
||||
*/
|
||||
@SuppressLint("NewApi")
|
||||
public class NetWorkSet extends Activity {
|
||||
private EditText ip;
|
||||
|
||||
@ -1,28 +1,25 @@
|
||||
package com.example.chaoran;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
import com.chaoran.component.MyAdapter;
|
||||
import com.chaoran.entiry.DataGrid;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.chaoran.component.MyAdapter;
|
||||
import com.chaoran.entiry.DataGrid;
|
||||
import com.example.chaoran.R;
|
||||
import com.util.DialogUtil;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Menu;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.SimpleAdapter;
|
||||
import android.widget.TextView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
|
||||
/**
|
||||
* 参数窗口
|
||||
*/
|
||||
public class ParamActivity extends Activity {
|
||||
private ListView listView;
|
||||
private List listdata;
|
||||
|
||||
@ -22,6 +22,9 @@ import android.view.Menu;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
|
||||
/**
|
||||
* pda注册窗口
|
||||
*/
|
||||
public class PdaRegActivity extends Activity {
|
||||
private EditText ip;
|
||||
private EditText port;
|
||||
|
||||
@ -1,23 +1,18 @@
|
||||
package com.example.chaoran;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import com.chaoran.entiry.DataGrid;
|
||||
import com.sys.SysData;
|
||||
import com.util.IoUtil;
|
||||
import org.ksoap2.SoapEnvelope;
|
||||
import org.ksoap2.serialization.SoapObject;
|
||||
import org.ksoap2.serialization.SoapSerializationEnvelope;
|
||||
import org.ksoap2.transport.HttpTransportSE;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
|
||||
import com.chaoran.entiry.DataGrid;
|
||||
import com.chaoran.entiry.Sys_DanJuFormsOptions;
|
||||
import com.sys.SysData;
|
||||
import com.util.IoUtil;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/*运行检索方案线程*/
|
||||
public class RunSearchThread extends Thread {
|
||||
|
||||
@ -1,20 +1,14 @@
|
||||
package com.example.chaoran;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.ksoap2.SoapEnvelope;
|
||||
import org.ksoap2.serialization.SoapObject;
|
||||
import org.ksoap2.serialization.SoapSerializationEnvelope;
|
||||
import org.ksoap2.transport.HttpTransportSE;
|
||||
|
||||
import com.chaoran.entiry.DataGrid;
|
||||
import com.sys.SysData;
|
||||
import com.util.IoUtil;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import com.sys.SysData;
|
||||
import com.util.IoUtil;
|
||||
import org.ksoap2.SoapEnvelope;
|
||||
import org.ksoap2.serialization.SoapObject;
|
||||
import org.ksoap2.serialization.SoapSerializationEnvelope;
|
||||
import org.ksoap2.transport.HttpTransportSE;
|
||||
|
||||
public class RunYmupThread extends Thread {
|
||||
private String param;
|
||||
|
||||
@ -10,6 +10,9 @@ import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* 搜索线程
|
||||
*/
|
||||
public class SearchThread extends Thread {
|
||||
private String fangalx;
|
||||
private String functionname;
|
||||
|
||||
@ -1,28 +1,19 @@
|
||||
package com.example.chaoran;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.ksoap2.serialization.SoapObject;
|
||||
|
||||
import com.chaoran.entiry.UpdataInfo;
|
||||
import com.chaoran.thread.UpdatePwdThread;
|
||||
import com.example.chaoran.R;
|
||||
import com.sys.SysData;
|
||||
import com.util.DialogUtil;
|
||||
import com.util.InstallUtil;
|
||||
|
||||
import android.R.color;
|
||||
import android.app.Activity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.app.Activity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.view.Menu;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import com.chaoran.thread.UpdatePwdThread;
|
||||
import com.sys.SysData;
|
||||
import com.util.DialogUtil;
|
||||
|
||||
/**
|
||||
* 更新密码窗口
|
||||
*/
|
||||
public class UpdatePwdActivity extends Activity {
|
||||
private EditText newPwd;
|
||||
private EditText CfNewPwd;
|
||||
|
||||
@ -1,32 +1,18 @@
|
||||
package com.util;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.chaoran.entiry.PhotographUi;
|
||||
import com.chaoran.entiry.SelfCheckBox;
|
||||
import com.chaoran.entiry.SelfEditText;
|
||||
import com.chaoran.entiry.SelfImage;
|
||||
import com.chaoran.entiry.SelfTextBut;
|
||||
import com.chaoran.imp.InputInterface;
|
||||
import com.chaoran.thread.ImageUrl;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Bitmap.CompressFormat;
|
||||
import android.os.Handler;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TabHost;
|
||||
import android.widget.TextView;
|
||||
import com.chaoran.entiry.PhotographUi;
|
||||
import com.chaoran.entiry.SelfCheckBox;
|
||||
import com.chaoran.entiry.SelfImage;
|
||||
import com.chaoran.imp.InputInterface;
|
||||
import com.chaoran.thread.ImageUrl;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/*
|
||||
* 单据工具类
|
||||
@ -167,11 +153,6 @@ public class DjUtil {
|
||||
for (String s : set) {
|
||||
view = layout.findViewWithTag(s);
|
||||
if (view != null) {
|
||||
// if (view instanceof SelfEditText) {
|
||||
// ((SelfEditText) view).setText(map.get(s).toString().trim());
|
||||
// } else if (view instanceof TextView) {
|
||||
// ((TextView) view).setText(map.get(s).toString().trim());
|
||||
// }
|
||||
setText(view, map.get(s).toString().trim(), imgHandler, -1, -1);
|
||||
list.add(s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user