adityak368 / Android-FileBrowser-FilePicker

A FileBrowser / FileChooser / FolderChooser for Android that you can integrate to your app to browse/select files from internal/external storage
MIT License
168 stars 45 forks source link

Fragment Option for developers #23

Closed pk-development closed 4 years ago

pk-development commented 4 years ago

Add Fragment option so developers can use the FileBrowser in a fragment.

All the important functionality is now included in the Fragment option. FileBrowser Activity is also still available

The app that is implementing the fragment must add in styles.xml:

        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>

Eaxmple:

<resources>
    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>
</resources>

Screenshot_20200609-010158 Screenshot_20200609-010212 Screenshot_20200609-010232

Example use.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <fragment
        android:id="@+id/fragment"
        android:name="com.aditya.filebrowser.FileBrowserFragment"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:layout="@layout/filebrowser_activity_frag" />
</RelativeLayout>
pk-development commented 4 years ago

I'm canceling this PR. Want to add support of other versions of Fragment v4, v7 etc

adityak368 commented 4 years ago

Thanks a lot. The search image and other images seems to be distorted. Could you please look into this?

On Wed, 10 Jun 2020, 17:34 Paul Kinsella, notifications@github.com wrote:

I'm canceling this PR. Want to add support of other versions of Fragment v4, v7 etc

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/adityak368/Android-FileBrowser-FilePicker/pull/23#issuecomment-641958164, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEWG2H2SIPADF5SLDBKUVSDRV5ZDFANCNFSM4NYUZVTA .

pk-development commented 4 years ago

Hey, sure I can look at that. I use weights to scale the views and having 0.1 for the imageview seems to stretch too much. Will try with wrap content. Cool project and thanks for sharing.