package com.jqyd.manager; import java.util.ArrayList; import com.jqyd.app.MyApp; import com.jqyd.shareInterface.Optsharepre_interface; import com.jqyd.son.Rwcx; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class Grbg extends Activity implements OnClickListener { private Button wdrz; private Button wdjh; private Button wdcl; private Button wdqj; private Button wdrw; private MyApp myApp; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.grbg); wdrz = (Button) this.findViewById(R.id.wdrz); wdjh = (Button) this.findViewById(R.id.wdjh); wdcl = (Button) this.findViewById(R.id.wdcl); wdqj = (Button) this.findViewById(R.id.wdqj); wdrw = (Button) this.findViewById(R.id.wdrw); wdrz.setOnClickListener(this); wdjh.setOnClickListener(this); wdcl.setOnClickListener(this); wdqj.setOnClickListener(this); wdrw.setOnClickListener(this); //权限控制 /* String gnjs = new Optsharepre_interface(Grbg.this).getDataFromPres("GNJS"); if(!gnjs.contains("xtbg")){ wdjh.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.wdjh_no, 0, 0); wdcl.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.wdcl_no, 0, 0); wdqj.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.wdqj_no, 0, 0); wdjh.setClickable(false); wdcl.setClickable(false); wdqj.setClickable(false); }*/ myApp = (MyApp) this.getApplication(); } @Override public void onClick(View v) { // TODO Auto-generated method stub if(v == wdrz){ myApp.setModuleName("wdrz"); startActivity(new Intent().setClass(this,TabTitle.class)); }else if(v == wdjh){ myApp.setModuleName("wdjh"); //清空共享池中的数据 myApp.setIsInit(0); ArrayList<String> list = new ArrayList<String>(); ArrayList<String> list1 = new ArrayList<String>(); myApp.setLxrTel(list); myApp.setLxrTelAndName(list1); startActivity(new Intent().setClass(this,TabTitle.class)); }else if(v == wdcl){ myApp.setModuleName("wdcl"); startActivity(new Intent().setClass(this,TabTitle.class)); }else if(v == wdqj){ myApp.setModuleName("wdqj"); startActivity(new Intent().setClass(this,TabTitle.class)); }else if(v == wdrw){ startActivity(new Intent().setClass(this,Rwcx.class)); } } }