Android Open Source - GeoNFC Settings

From Project

Back to project page GeoNFC.


The source code is released under:

GNU General Public License

If you think the Android project GeoNFC listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.nfc.geo.geonfc;
/*  w  w  w. j  a  v  a  2s .c  o  m*/
import java.util.ArrayList;

import android.os.Bundle;
import android.os.Environment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;

import com.nfc.geo.geonfc.tcp.FTPConnection;
import com.nfc.geo.geonfc.utils.FileHandler;

public class Settings extends Fragment{

  private Button actualizar;
  private EditText nombre_file;
  private FTPConnection ftpConn;

  private ArrayList<String> fileIdioma;
  private FileHandler fileHandler;

  public View onCreateView(LayoutInflater inflater, ViewGroup container,
      Bundle savedInstanceState) {
    View vi = inflater.inflate(R.layout.settings, null);

    fileHandler = new FileHandler();
    fileIdioma = new ArrayList<String>();
    actualizar = (Button) vi.findViewById(;
    nombre_file = (EditText) vi.findViewById(;
    ftpConn = new FTPConnection(getActivity());

    actualizar.setOnClickListener(new OnClickListener() {      
      public void onClick(View v) {

     * Cambio de los textos de acuerdo con los idiomas en lo fichero de config.ini
     * */    
    try {
      fileIdioma = fileHandler.readFile(getActivity().getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS).getCanonicalPath());

      if(fileIdioma.size() > 5)
        actualizar.setText(""+fileIdioma.get(15).split(" = ")[1]);
    } catch (IOException e) {
      //Do nothing

    return vi;

Java Source Code List