Beispiel #1
0
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.folderex);

    Intent gintent = getIntent();
    getPath = gintent.getStringExtra("path");
    dbPath = gintent.getStringExtra("dbpath");

    FileList _FileList = new FileList(this);
    _FileList.setOnPathChangedListener(_OnPathChanged);
    _FileList.setOnFileSelected(_OnFileSelected);

    LinearLayout layout = (LinearLayout) findViewById(R.id.LinearLayout01);
    layout.addView(_FileList);

    Util.print("getPath = " + getPath);
    String path = " ";

    if (getPath.equals("empty")) {
      File root = Environment.getExternalStorageDirectory();
      _FileList.setPath(root.getAbsolutePath());
      path = root.getAbsolutePath();
    } else {
      _FileList.setPath(getPath);
      path = getPath;
    }

    Util.print("path = " + path);

    _FileList.setFocusable(true);
    _FileList.setFocusableInTouchMode(true);

    ((TextView) findViewById(R.id.TextView01)).setSelected(true);
  }