<commit_before>package com.applandeo.filepickersampleapp;

import android.content.pm.PackageManager;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.widget.Button;
import android.widget.TextView;

import com.applandeo.FilePicker;
import com.applandeo.listeners.OnSelectFileListener;

import static com.applandeo.utils.FileUtils.FileTypes.TEXT;

public class MainActivity extends AppCompatActivity {

    private TextView mSelectedPath;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Button openPickerButton = (Button) findViewById(R.id.openPicker);
        mSelectedPath = (TextView) findViewById(R.id.selectedPath);

        openPickerButton.setOnClickListener(view -> openPicker());
    }

    private OnSelectFileListener listener = file -> mSelectedPath.setText(file.getPath());

    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);

        if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED
                && requestCode == FilePicker.STORAGE_PERMISSIONS) {
            openPicker();
        }
    }

    private void openPicker() {
        new FilePicker.Builder(this, listener)
//                        .setMainDirectory("/")
                .fileType(TEXT)
                .hideFiles(false) //to show only directories
//                        .directory("/")
                .show();
    }
}<commit_msg>Updated sample<commit_after>package com.applandeo.filepickersampleapp;

import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.Environment;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.widget.Button;
import android.widget.TextView;

import com.applandeo.FilePicker;
import com.applandeo.listeners.OnSelectFileListener;

import static com.applandeo.utils.FileUtils.FileTypes.TEXT;

public class MainActivity extends AppCompatActivity {

    private TextView mSelectedPath;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Button openPickerButton = (Button) findViewById(R.id.openPicker);
        mSelectedPath = (TextView) findViewById(R.id.selectedPath);

        openPickerButton.setOnClickListener(view -> openPicker());
    }

    private OnSelectFileListener listener = file -> mSelectedPath.setText(file.getPath());

    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);

        if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED
                && requestCode == FilePicker.STORAGE_PERMISSIONS) {
            openPicker();
        }
    }

    private void openPicker() {
        new FilePicker.Builder(this, listener)
                .setMainDirectory(Environment.getExternalStorageDirectory().getPath())
                .fileType(TEXT)
                .hideFiles(false)
                .directory(Environment.getExternalStorageDirectory() + "/" + Environment.DIRECTORY_DOWNLOADS)
                .show();
    }
}
{'fraction_non_alphanumeric': 0.0960944085417252, 'fraction_numerical': 0.0016858668165214948, 'mean_word_length': 3.3896424167694206, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6722191', 'n_tokens_mistral': 958, 'n_tokens_neox': 919, 'n_words': 174}