Ejemplo n.º 1
0
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.requestWindowFeature(Window.FEATURE_NO_TITLE);
    this.setContentView(R.layout.localizador_gps);

    // /CONTEXTO
    app = (IsbanAplicacion) getApplication();
    /*
     * if(app != null && app.getContador() != null)
     * app.getContador().start();
     */
    contexto = app.getBaseContext();
    contexto2 = this;
    activity = this;
    lblVersion = (TextView) findViewById(R.id.lblVersion);

    lblVersion.setText(Utils.getVersionInfo(contexto));
    // [jlopez] usa un boton on/off que configura al inicio según lo guardado,y
    // graba su configuración al presionar el boton,también modifica la variable global
    // con el estatus nuevo
    btnAjusteGPS = (ToggleButton) findViewById(R.id.ajusteGPS);
    btnAjusteGPS.setChecked(HomeActivity.LeeConfigBool("AjusteGPS"));

    btnAjusteGPS.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            // TODO Auto-generated method stub
            HomeActivity.GrabaConfigBool("AjusteGPS", btnAjusteGPS.isChecked());
            Datos.gpsglobal = btnAjusteGPS.isChecked();
            Datos.gps = btnAjusteGPS.isChecked();
            Datos.actualizado = !btnAjusteGPS.isChecked();
          }
        });

    btnIndicadores = (ToggleButton) findViewById(R.id.ajusteIndicadores);
    btnIndicadores.setChecked(HomeActivity.LeeConfigBool("AjusteIndicadores"));

    btnIndicadores.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            // TODO Auto-generated method stub
            HomeActivity.GrabaConfigBool("AjusteIndicadores", btnIndicadores.isChecked());
            Datos.mostrarIndicadores = btnIndicadores.isChecked();
          }
        });
    //
    //		// /SHARED PREFERENCES
    //		preferencias = getSharedPreferences("preferencias",
    //				Context.MODE_PRIVATE);
    //
    //		// /EXTRA
    //		extras = getIntent().getExtras();
    //		// titulo = extras.getString(Datos.INTENT_DATOS.TITULO);
    //
    //		info = (TextView) findViewById(R.id.info);
    //
    //		// /ACTIVAR
    //		Button botonActivar = (Button) findViewById(R.id.indicaciones);
    //		botonActivar.setOnClickListener(new View.OnClickListener() {
    //			public void onClick(View v) {
    //
    //				setResult(Activity.RESULT_OK);
    //				finish();
    //
    //			}
    //		});
    //
    //		// /DESACTIVAR
    //		Button botonDesactivar = (Button) findViewById(R.id.street);
    //		botonDesactivar.setOnClickListener(new View.OnClickListener() {
    //			public void onClick(View v) {
    //				setResult(Activity.RESULT_CANCELED);
    //				finish();
    //			}
    //		});
    //
    //
    //		if (Datos.gpsglobal){
    //			botonActivar.setClickable(false);
    //			botonDesactivar.setClickable(true);
    //		}
    //		else {
    //			botonActivar.setClickable(true);
    //			botonDesactivar.setClickable(false);
    //		}
    //
    //		// ////////////////////////////////////////////////////

  }
Ejemplo n.º 2
0
 @Override
 protected void onStart() {
   // TODO Auto-generated method stub
   super.onStart();
 }
Ejemplo n.º 3
0
 @Override
 public void onResume() {
   super.onResume();
 }
Ejemplo n.º 4
0
 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   // TODO Auto-generated method stub
   super.onActivityResult(requestCode, resultCode, data);
 }
Ejemplo n.º 5
0
 @Override
 protected void onDestroy() {
   super.onDestroy();
 }