@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.xzfw_xzfwsh_tabs_main); infofile = new InfoFile_(this); FlowID = infofile.FlowID().get(); WFID = infofile.WFID().get(); endTime = infofile.endTime().get(); Title = infofile.Title().get(); statusOfShenhe = infofile.statusOfSHENHE().get(); WFStepID = infofile.WFStepID().get(); InitTextView(); getDatasFromInterface(); // 生成广播处理 receive = new receive(); // 实例化过滤器并设置要过滤的广播 IntentFilter intentFilter = new IntentFilter("com.kinggrid.iappoffice.save"); intentFilter.addAction("checkSuccess"); // 注册广播 this.registerReceiver(receive, intentFilter); }
private void InitTextView() { infoFile = new InfoFile_(this); zw_path = Environment.getExternalStorageDirectory() + "/OADownFile/" + infoFile.infoUsername().get() + "/"; tv_1 = (TextView) findViewById(R.id.tv_1); edt_tgbt = (EditText) findViewById(R.id.edt_tgbt); edt_shyj = (EditText) findViewById(R.id.edt_shyj); edt_tgbt.setEnabled(false); textView1 = (TextView) findViewById(R.id.tv_a); textView2 = (TextView) findViewById(R.id.tv_b); textView3 = (TextView) findViewById(R.id.tv_c); tv_llry = (TextView) findViewById(R.id.tv_llry); btn_ty = (Button) findViewById(R.id.btn_ty); btn_bty = (Button) findViewById(R.id.btn_bty); btn_th = (Button) findViewById(R.id.btn_th); btn_ckzw = (Button) findViewById(R.id.btn_ckzw); tv_gwbt = (TextView) findViewById(R.id.tv_gwbt); tv_gwbt.setText(infofile.Title().get()); ll_btn = (LinearLayout) findViewById(R.id.ll_btn); ll_checkpeople = (LinearLayout) findViewById(R.id.ll_checkpeople); ll_checkpeople1 = (LinearLayout) findViewById(R.id.ll_checkpeople1); ll_textup1 = (LinearLayout) findViewById(R.id.ll_textup1); btn_ty.setOnClickListener(this); btn_bty.setOnClickListener(this); btn_th.setOnClickListener(this); btn_ckzw.setOnClickListener(this); textView1.setOnClickListener(new txListener(0)); textView2.setOnClickListener(new txListener(1)); textView3.setOnClickListener(new txListener(2)); back = (ImageView) findViewById(R.id.back); back.setOnClickListener(this); tv_1.setText(endTime); edt_tgbt.setText(Title); if (statusOfShenhe.equals("1000")) { ll_textup1.setVisibility(View.VISIBLE); btn_ty.setVisibility(View.VISIBLE); btn_bty.setVisibility(View.VISIBLE); btn_th.setVisibility(View.VISIBLE); } else { ll_textup1.setVisibility(View.GONE); btn_ty.setVisibility(View.GONE); btn_bty.setVisibility(View.GONE); btn_th.setVisibility(View.GONE); } File file = new File(Environment.getExternalStorageDirectory() + "/OADownFile/"); if (!file.exists()) { file.mkdir(); } File file1 = new File(zw_path); if (!file1.exists()) { file1.mkdir(); } initFilePath(); iAppOffice = IAppOfficeUtil.getInstance(this); if (iAppOffice == null) { // btn_qczw.setClickable(false); Toast.makeText(this, "请正确安装wps应用!", Toast.LENGTH_SHORT).show(); } else { // btn_qczw.setClickable(true); } infofile.edit().ArcStepID().put(0).apply(); // 初始化公文ID }