iPaulPro / aFileChooser

[DEPRECATED] Android library that provides a file explorer to let users select files on external storage.
Apache License 2.0
1.79k stars 850 forks source link

No usage of AppCompatLibrary (V7) #43

Open kashban opened 10 years ago

kashban commented 10 years ago

When using aFileChooser at API Level < 11 ActionBar is not supported. This is no longer required because the AppCompatLibrary supports ActionBar on lower API levels.

Changing this is easy. Add the android-support-v7-appcompat library to the project, adjust a few lines of code and set Theme.AppCompat as the parent theme for all Activities.

Tested with the Example App on Android 2.3.3 in the Emulator.

Here is my Code for FileChooserActivity to achieve this.

/*

package com.ipaulpro.afilechooser;

import java.io.File;

import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.net.Uri; import android.os.Bundle; import android.os.Environment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentManager.BackStackEntry; import android.support.v4.app.FragmentManager.OnBackStackChangedListener; import android.support.v4.app.FragmentTransaction; import android.support.v7.app.ActionBar; // Support Lib V7 import android.support.v7.app.ActionBarActivity; // Support Lib V7 import android.view.Menu; import android.view.MenuItem; import android.widget.Toast;

/**