private void setControls() { layout = (CupsTableLayout) findViewById(R.id.printjobLayout); layout.reset(); layout.setShowName(false); for (PpdSectionList group : cupsppd.getPpdRec().getStdList()) { layout.addSection(group); } layout.addView( buttonRow, new TableLayout.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)); uiSet = true; }
private void setStdOpts() { for (PpdSectionList group : cupsppd.getPpdRec().getStdList()) { for (PpdItemList section : group) { if (section.getName().equals("fit-to-page")) { if (isImage) section.setSavedValue("true"); } else if (section.getName().equals("orientation-requested")) { if (!(printerConfig.orientation.equals(""))) { section.setSavedValue(printerConfig.orientation); section.setDefaultValue("-1"); } } } } }