DroidNinja / Android-FilePicker

Photopicker and document picker for android
https://arunsharma.me/blog/integrate-android-file-picker-photopicker-document-picker-android/
2.7k stars 558 forks source link

Changing the theme hides the Toolbar options. #101

Open Dereckz opened 7 years ago

Dereckz commented 7 years ago

How do you keep the options when changing for a theme of your own?

With my theme.

screenshot_20170917-024627

Default.

screenshot_20170917-030202

DroidNinja commented 7 years ago

What configuration are using ? Please write down theme and filepicker configuration.

Dereckz commented 7 years ago

Code: add theme.

 private void theme() {
        sharedPreferences = getSharedPreferences(KEY_VALUE, Context.MODE_PRIVATE);
        theme = sharedPreferences.getInt(KEY_THEME, 0);
        settingTheme(theme);
    }
    public void settingTheme(int theme) {
        switch (theme) {
            case 1:
                setTheme(R.style.AppTheme11);
                Apptheme=R.style.AppTheme11;
                break;
            case 2:
                setTheme(R.style.AppTheme2);
                Apptheme=R.style.AppTheme2;

                break;
            case 3:
                setTheme(R.style.AppTheme3);
                Apptheme=R.style.AppTheme3;

                break;
            case 4:
                setTheme(R.style.AppTheme4);
                Apptheme=R.style.AppTheme4;

                break;
            case 5:
                setTheme(R.style.AppTheme5);
                Apptheme=R.style.AppTheme5;

                break;
            case 6:
                setTheme(R.style.AppTheme6);
                Apptheme=R.style.AppTheme6;

                break;
            case 7:
                setTheme(R.style.AppTheme7);
                Apptheme=R.style.AppTheme7;

                break;
            case 8:
                setTheme(R.style.AppTheme8);
                Apptheme=R.style.AppTheme8;

                break;
            case 9:
                setTheme(R.style.AppTheme9);
                Apptheme=R.style.AppTheme9;

                break;
            case 10:
                setTheme(R.style.AppTheme10);
                Apptheme=R.style.AppTheme10;

                break;
            case 11:
                setTheme(R.style.AppTheme);
                Apptheme=R.style.AppTheme;

                break;
            default:
                setTheme(R.style.AppTheme);
                break;
        }
    }

Code: File picker add my theme selected.

FilePickerBuilder fpb= new FilePickerBuilder();
        fpb.setActivityTheme(Apptheme);
        fpb.getInstance().setMaxCount(4)
                .setSelectedFiles(paths)
                .pickFile(this);