package com.jqyd.manager;
import java.util.ArrayList;
import java.util.HashMap;
import com.jqyd.app.MyApp;
import com.jqyd.shareInterface.Optsharepre_interface;
import com.jqyd.son.Fbxx;
import com.jqyd.son.PubList;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class Xtbg extends Activity implements OnClickListener {
private Button qygg;
private Button ywtz;
private Button dxqf;
private Button jhgl;
private Button zw;
private MyApp myApp;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.xtbg);
qygg = (Button) this.findViewById(R.id.qygg);
ywtz = (Button) this.findViewById(R.id.ywtz);
dxqf = (Button) this.findViewById(R.id.dxqf);
jhgl = (Button) this.findViewById(R.id.jhgl);
zw = (Button) this.findViewById(R.id.zw);
Optsharepre_interface opt = new Optsharepre_interface(Xtbg.this);
String mode = opt.getDataFromPres("mode");
Log.e("mode", mode);
if(!mode.contains("3110")){
qygg.setVisibility(View.GONE);
zw.setVisibility(View.INVISIBLE);
}
qygg.setOnClickListener(this);
ywtz.setOnClickListener(this);
dxqf.setOnClickListener(this);
jhgl.setOnClickListener(this);
myApp = (MyApp) this.getApplication();
}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
//清空共享池中的数据
myApp.setIsInit(0);
ArrayList<String> list = new ArrayList<String>();
myApp.setLxrTel(list);
myApp.setLxrTelAndName(list);
if(v == qygg){
myApp.setModuleName("qygg");
startActivity(new Intent().setClass(this,TabTitle.class));
}else if(v == ywtz){
myApp.setModuleName("ywtz");
startActivity(new Intent().setClass(this,TabTitle.class));
}else if(v == dxqf){
myApp.setModuleName("dxqf");
startActivity(new Intent().setClass(this,TabTitle.class));
}else if(v == jhgl){
myApp.setModuleName("jhgl");
//清空共享池中的数据
myApp.setIsInit(0);
ArrayList<String> list2 = new ArrayList<String>();
myApp.setLxrTel(list2);
myApp.setLxrTelAndName(list2);
myApp.setCustId(list2);
myApp.setCustIdAndName(list2);
startActivity(new Intent().setClass(this,TabTitle.class));
}
}
}