斑马android sdk,官网不太好下,部分代码 :
public class ScannersActivity extends BaseActivity implements NavigationView.OnNavigationItemSelectedListener, ScannerAppEngine.IScannerAppEngineDevListDelegate {
AvailableScannerListAdapter lastConnectedScannerListAdapter;
ListView lastConnectedScanner;
ArrayList
lastConnectedScannerList;
AvailableScannerListAdapter availableScannerListAdapter;
ListView otherScanners;
ArrayList scannersList;
// Member fields
private CustomProgressDialog progressDialog;
static AvailableScanner curAvailableScanner=null;
int scannerId;
static MyAsyncTask cmdExecTask=null;
private int REFRESH = 1;
private int EVENT = 2;
private int CREATE = 3;
static boolean launchFromFCS = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_scanners);
Configuration configuration = getResources().getConfiguration();
if(configuration.orientation == Configuration.ORIENTATION_LANDSCAPE){
if(configuration.smallestScreenWidthDp();
1