├── .idea ├── .name ├── copyright │ └── profiles_settings.xml ├── vcs.xml ├── modules.xml ├── gradle.xml ├── compiler.xml └── misc.xml ├── app ├── .gitignore ├── libs │ ├── adad-2.9.jar │ └── ExceptionHandler.jar ├── src │ └── main │ │ ├── res │ │ ├── drawable │ │ │ ├── homer.png │ │ │ ├── icon.png │ │ │ ├── search.png │ │ │ ├── widget_preview.png │ │ │ ├── widget_transparent.png │ │ │ ├── default_clickable_background.xml │ │ │ ├── list_background.xml │ │ │ └── card.xml │ │ ├── drawable-hdpi │ │ │ ├── file_web.png │ │ │ ├── file_zip.png │ │ │ ├── file_adobe.png │ │ │ ├── file_flash.png │ │ │ ├── file_image.png │ │ │ ├── file_music.png │ │ │ ├── file_text.png │ │ │ ├── file_video.png │ │ │ ├── file_android.png │ │ │ ├── file_contact.png │ │ │ ├── file_folder.png │ │ │ ├── file_message.png │ │ │ ├── file_office.png │ │ │ ├── file_unknown.png │ │ │ ├── ic_stat_icon.png │ │ │ ├── file_photoshop.png │ │ │ ├── ic_action_stars.png │ │ │ ├── ic_action_bazaar.png │ │ │ ├── ic_action_create.png │ │ │ ├── ic_action_delete.png │ │ │ ├── ic_action_launch.png │ │ │ ├── ic_action_overflow.png │ │ │ ├── ic_action_refresh.png │ │ │ ├── ic_action_search.png │ │ │ ├── ic_action_data_usage.png │ │ │ ├── ic_action_instagram.png │ │ │ ├── ic_action_navigation.png │ │ │ ├── ic_action_action_home.png │ │ │ ├── ic_action_fast_search.png │ │ │ ├── ic_action_launch_white.png │ │ │ ├── ic_action_fast_search_white.png │ │ │ └── ic_action_communication_email.png │ │ ├── drawable-mdpi │ │ │ ├── file_web.png │ │ │ ├── file_zip.png │ │ │ ├── file_adobe.png │ │ │ ├── file_flash.png │ │ │ ├── file_image.png │ │ │ ├── file_music.png │ │ │ ├── file_text.png │ │ │ ├── file_video.png │ │ │ ├── file_android.png │ │ │ ├── file_contact.png │ │ │ ├── file_folder.png │ │ │ ├── file_message.png │ │ │ ├── file_office.png │ │ │ ├── file_unknown.png │ │ │ ├── ic_stat_icon.png │ │ │ ├── file_photoshop.png │ │ │ ├── ic_action_stars.png │ │ │ ├── ic_action_bazaar.png │ │ │ ├── ic_action_create.png │ │ │ ├── ic_action_delete.png │ │ │ ├── ic_action_launch.png │ │ │ ├── ic_action_overflow.png │ │ │ ├── ic_action_refresh.png │ │ │ ├── ic_action_search.png │ │ │ ├── ic_action_instagram.png │ │ │ ├── ic_action_navigation.png │ │ │ ├── ic_action_action_home.png │ │ │ ├── ic_action_fast_search.png │ │ │ ├── ic_action_launch_white.png │ │ │ ├── ic_action_fast_search_white.png │ │ │ └── ic_action_communication_email.png │ │ ├── drawable-xhdpi │ │ │ ├── file_text.png │ │ │ ├── file_web.png │ │ │ ├── file_zip.png │ │ │ ├── file_adobe.png │ │ │ ├── file_android.png │ │ │ ├── file_contact.png │ │ │ ├── file_flash.png │ │ │ ├── file_folder.png │ │ │ ├── file_image.png │ │ │ ├── file_message.png │ │ │ ├── file_music.png │ │ │ ├── file_office.png │ │ │ ├── file_unknown.png │ │ │ ├── file_video.png │ │ │ ├── ic_stat_icon.png │ │ │ ├── file_photoshop.png │ │ │ ├── ic_action_bazaar.png │ │ │ ├── ic_action_create.png │ │ │ ├── ic_action_delete.png │ │ │ ├── ic_action_launch.png │ │ │ ├── ic_action_refresh.png │ │ │ ├── ic_action_search.png │ │ │ ├── ic_action_stars.png │ │ │ ├── ic_action_instagram.png │ │ │ ├── ic_action_overflow.png │ │ │ ├── ic_action_action_home.png │ │ │ ├── ic_action_fast_search.png │ │ │ ├── ic_action_launch_white.png │ │ │ ├── ic_action_navigation.png │ │ │ ├── ic_action_fast_search_white.png │ │ │ └── ic_action_communication_email.png │ │ ├── drawable-xxhdpi │ │ │ ├── file_web.png │ │ │ ├── file_zip.png │ │ │ ├── file_adobe.png │ │ │ ├── file_apps.png │ │ │ ├── file_flash.png │ │ │ ├── file_folder.png │ │ │ ├── file_image.png │ │ │ ├── file_music.png │ │ │ ├── file_office.png │ │ │ ├── file_text.png │ │ │ ├── file_video.png │ │ │ ├── file_android.png │ │ │ ├── file_contact.png │ │ │ ├── file_message.png │ │ │ ├── file_unknown.png │ │ │ ├── ic_stat_icon.png │ │ │ ├── file_photoshop.png │ │ │ ├── ic_action_bazaar.png │ │ │ ├── ic_action_create.png │ │ │ ├── ic_action_delete.png │ │ │ ├── ic_action_launch.png │ │ │ ├── ic_action_search.png │ │ │ ├── ic_action_stars.png │ │ │ ├── ic_action_overflow.png │ │ │ ├── ic_action_refresh.png │ │ │ ├── ic_action_action_home.png │ │ │ ├── ic_action_fast_search.png │ │ │ ├── ic_action_instagram.png │ │ │ ├── ic_action_navigation.png │ │ │ ├── ic_action_launch_white.png │ │ │ ├── ic_action_fast_search_white.png │ │ │ └── ic_action_communication_email.png │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ ├── transition │ │ │ └── change_elements_transform.xml │ │ ├── drawable-hdpi-v9 │ │ │ └── ic_stat_icon.png │ │ ├── drawable-mdpi-v9 │ │ │ └── ic_stat_icon.png │ │ ├── drawable-hdpi-v11 │ │ │ └── ic_stat_icon.png │ │ ├── drawable-mdpi-v11 │ │ │ └── ic_stat_icon.png │ │ ├── drawable-xhdpi-v11 │ │ │ └── ic_stat_icon.png │ │ ├── drawable-xhdpi-v9 │ │ │ └── ic_stat_icon.png │ │ ├── drawable-xxhdpi-v11 │ │ │ └── ic_stat_icon.png │ │ ├── drawable-xxhdpi-v9 │ │ │ └── ic_stat_icon.png │ │ ├── values-sw600dp-land │ │ │ └── dimens.xml │ │ ├── values-sw720dp-land │ │ │ └── dimens.xml │ │ ├── drawable-nodpi │ │ │ └── example_appwidget_preview.png │ │ ├── drawable-v21 │ │ │ └── default_clickable_background.xml │ │ ├── values-v14 │ │ │ └── dimens.xml │ │ ├── menu │ │ │ ├── main.xml │ │ │ └── file_action_mode.xml │ │ ├── values-w820dp │ │ │ └── dimens.xml │ │ ├── xml │ │ │ ├── search_widget_info.xml │ │ │ └── transparent_search_widget_info.xml │ │ ├── color │ │ │ └── selector.xml │ │ ├── values │ │ │ ├── colors.xml │ │ │ ├── dimens.xml │ │ │ ├── styles.xml │ │ │ └── strings.xml │ │ ├── layout │ │ │ ├── activity_main.xml │ │ │ ├── search_item.xml │ │ │ ├── fragment_home.xml │ │ │ ├── activity_search.xml │ │ │ ├── transparent_search_widget.xml │ │ │ ├── search_widget.xml │ │ │ ├── toolbar_search.xml │ │ │ ├── fragment_search.xml │ │ │ ├── toolbar.xml │ │ │ └── slider_list.xml │ │ ├── values-mdpi │ │ │ └── dimens.xml │ │ ├── values-hdpi │ │ │ └── dimens.xml │ │ ├── values-xhdpi │ │ │ └── dimens.xml │ │ ├── values-sw670dp │ │ │ └── dimens.xml │ │ ├── values-sw600dp │ │ │ └── dimens.xml │ │ └── values-v21 │ │ │ └── styles.xml │ │ ├── java │ │ └── com │ │ │ └── mohamadamin │ │ │ └── fastsearch │ │ │ └── free │ │ │ ├── utils │ │ │ ├── Interfaces.java │ │ │ ├── DisplayUtils.java │ │ │ ├── BusinessUtils.java │ │ │ ├── SdkUtils.java │ │ │ ├── PreferenceUtils.java │ │ │ ├── FileUtils.java │ │ │ ├── BitmapUtils.java │ │ │ ├── NotificationUtils.java │ │ │ └── PicassoUtils.java │ │ │ ├── modules │ │ │ ├── CustomContact.java │ │ │ ├── CustomFile.java │ │ │ ├── CustomApplication.java │ │ │ └── SlidingTabStrip.java │ │ │ ├── adapters │ │ │ ├── BaseActionModeAdapter.java │ │ │ ├── HomeAdapter.java │ │ │ ├── RecyclerItemViewHolder.java │ │ │ ├── ApplicationAdapter.java │ │ │ └── ContactAdapter.java │ │ │ ├── receivers │ │ │ ├── PackageUninstallReceiver.java │ │ │ └── PackageInstallReceiver.java │ │ │ ├── widgets │ │ │ ├── SearchWidget.java │ │ │ └── TransparentSearchWidget.java │ │ │ ├── databases │ │ │ └── ApplicationsDB.java │ │ │ ├── activities │ │ │ ├── SearchActivity.java │ │ │ └── MainActivity.java │ │ │ └── fragments │ │ │ ├── HomeFragment.java │ │ │ └── SearchFragment.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro ├── build.gradle └── app.iml ├── settings.gradle ├── .gitignore ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── README.md ├── gradle.properties ├── FastSearchEn.iml ├── gradlew.bat └── gradlew /.idea/.name: -------------------------------------------------------------------------------- 1 | FastSearchEn -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /app/libs/adad-2.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/libs/adad-2.9.jar -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/libs/ExceptionHandler.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/libs/ExceptionHandler.jar -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | /captures 8 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/homer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable/homer.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable/icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable/search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/file_web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/file_web.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/file_zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/file_zip.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/file_web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/file_web.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/file_zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/file_zip.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/file_adobe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/file_adobe.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/file_flash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/file_flash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/file_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/file_image.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/file_music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/file_music.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/file_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/file_text.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/file_video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/file_video.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/file_adobe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/file_adobe.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/file_flash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/file_flash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/file_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/file_image.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/file_music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/file_music.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/file_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/file_text.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/file_video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/file_video.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/file_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/file_text.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/file_web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/file_web.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/file_zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/file_zip.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/file_web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/file_web.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/file_zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/file_zip.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/widget_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable/widget_preview.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/file_android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/file_android.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/file_contact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/file_contact.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/file_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/file_folder.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/file_message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/file_message.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/file_office.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/file_office.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/file_unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/file_unknown.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_stat_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/ic_stat_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/file_android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/file_android.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/file_contact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/file_contact.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/file_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/file_folder.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/file_message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/file_message.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/file_office.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/file_office.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/file_unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/file_unknown.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_stat_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/ic_stat_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/file_adobe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/file_adobe.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/file_android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/file_android.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/file_contact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/file_contact.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/file_flash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/file_flash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/file_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/file_folder.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/file_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/file_image.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/file_message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/file_message.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/file_music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/file_music.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/file_office.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/file_office.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/file_unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/file_unknown.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/file_video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/file_video.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_stat_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/ic_stat_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/file_adobe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/file_adobe.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/file_apps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/file_apps.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/file_flash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/file_flash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/file_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/file_folder.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/file_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/file_image.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/file_music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/file_music.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/file_office.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/file_office.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/file_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/file_text.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/file_video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/file_video.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/widget_transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable/widget_transparent.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/transition/change_elements_transform.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi-v9/ic_stat_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi-v9/ic_stat_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/file_photoshop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/file_photoshop.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_stars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/ic_action_stars.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi-v9/ic_stat_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi-v9/ic_stat_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/file_photoshop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/file_photoshop.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_stars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/ic_action_stars.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/file_photoshop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/file_photoshop.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/file_android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/file_android.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/file_contact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/file_contact.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/file_message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/file_message.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/file_unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/file_unknown.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_stat_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/ic_stat_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi-v11/ic_stat_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi-v11/ic_stat_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_bazaar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/ic_action_bazaar.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/ic_action_create.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/ic_action_delete.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_launch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/ic_action_launch.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_overflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/ic_action_overflow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/ic_action_refresh.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/ic_action_search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi-v11/ic_stat_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi-v11/ic_stat_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_bazaar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/ic_action_bazaar.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/ic_action_create.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/ic_action_delete.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_launch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/ic_action_launch.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_overflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/ic_action_overflow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/ic_action_refresh.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/ic_action_search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi-v11/ic_stat_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi-v11/ic_stat_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi-v9/ic_stat_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi-v9/ic_stat_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_bazaar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/ic_action_bazaar.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/ic_action_create.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/ic_action_delete.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_launch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/ic_action_launch.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/ic_action_refresh.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/ic_action_search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_stars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/ic_action_stars.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi-v11/ic_stat_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi-v11/ic_stat_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi-v9/ic_stat_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi-v9/ic_stat_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/file_photoshop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/file_photoshop.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_bazaar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_bazaar.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_create.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_delete.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_launch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_launch.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_stars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_stars.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_data_usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/ic_action_data_usage.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_instagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/ic_action_instagram.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_navigation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/ic_action_navigation.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_instagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/ic_action_instagram.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_navigation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/ic_action_navigation.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_instagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/ic_action_instagram.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_overflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/ic_action_overflow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_overflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_overflow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_refresh.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_action_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/ic_action_action_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_fast_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/ic_action_fast_search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_launch_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/ic_action_launch_white.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_action_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/ic_action_action_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_fast_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/ic_action_fast_search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_launch_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/ic_action_launch_white.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_action_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/ic_action_action_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_fast_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/ic_action_fast_search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_launch_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/ic_action_launch_white.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_navigation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/ic_action_navigation.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_action_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_action_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_fast_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_fast_search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_instagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_instagram.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_navigation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_navigation.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_launch_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_launch_white.png -------------------------------------------------------------------------------- /app/src/main/res/values-sw600dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 220dp 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values-sw720dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 275dp 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_fast_search_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/ic_action_fast_search_white.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_fast_search_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/ic_action_fast_search_white.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/example_appwidget_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-nodpi/example_appwidget_preview.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_fast_search_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/ic_action_fast_search_white.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_communication_email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-hdpi/ic_action_communication_email.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_communication_email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-mdpi/ic_action_communication_email.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_communication_email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xhdpi/ic_action_communication_email.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_fast_search_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_fast_search_white.png -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_communication_email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohamad-amin/Android-FastSearch/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_communication_email.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/default_clickable_background.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Android-FastSearch 2 | An Android application which searchs all of the content on the device in a quick way. 3 | # Lisense: 4 | Apach V2.0. Applies on all files. Copyright (c) mohamad-amin 2015. 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/default_clickable_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 10 15:27:10 PDT 2013 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/utils/Interfaces.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.utils; 2 | 3 | public class Interfaces { 4 | 5 | public interface OnFilePressedListener { 6 | void onFilePressed(String fileName, int position); 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/modules/CustomContact.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.modules; 2 | 3 | public class CustomContact { 4 | 5 | public String name, phone, uri, idString; 6 | public int id; 7 | 8 | public CustomContact() { 9 | super(); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/list_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values-v14/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 0dp 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/modules/CustomFile.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.modules; 2 | 3 | public class CustomFile { 4 | 5 | public String title, artist, album, audioPath; 6 | public String name, fullPath, directory; 7 | 8 | public CustomFile() { 9 | super(); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/xml/search_widget_info.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/color/selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/xml/transparent_search_widget_info.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #2196F3 4 | #1976D2 5 | #64B5F6 6 | #FFF 7 | #BBB 8 | #CCC 9 | #EEE 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/adapters/BaseActionModeAdapter.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.adapters; 2 | 3 | 4 | import android.support.v7.widget.RecyclerView; 5 | 6 | public abstract class BaseActionModeAdapter extends RecyclerView.Adapter { 7 | 8 | public abstract void clearSelections(); 9 | public abstract void removeFile(int position); 10 | public abstract void renameFile(int position); 11 | public abstract void selectItem(int position); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/receivers/PackageUninstallReceiver.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.receivers; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | 7 | import com.mohamadamin.fastsearch.free.databases.ApplicationsDB; 8 | 9 | public class PackageUninstallReceiver extends BroadcastReceiver { 10 | 11 | @Override 12 | public void onReceive(Context context, Intent intent) { 13 | ApplicationsDB applicationsDB = new ApplicationsDB(context); 14 | applicationsDB.removeApplication(intent.getData().getEncodedSchemeSpecificPart()); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in E:\Program Files\Android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/modules/CustomApplication.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.modules; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | public class CustomApplication { 6 | 7 | public String titleText, descriptionText, packageName, imageLink; 8 | public Bitmap iconBitmap; 9 | public int id; 10 | 11 | public CustomApplication(String titleText, String descriptionText, String packageName, String imageLink) { 12 | super(); 13 | this.titleText = titleText; 14 | this.imageLink = imageLink; 15 | this.packageName = packageName; 16 | this.descriptionText = descriptionText; 17 | } 18 | 19 | public CustomApplication() { 20 | super(); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 13 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 190dp 4 | 64dp 5 | 35dp 6 | 7 | 1.5dp 8 | 2dp 9 | 4dp 10 | 11 | 15 | 8dp 16 | 17 | 16dp 18 | 16dp 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/menu/file_action_mode.xml: -------------------------------------------------------------------------------- 1 | 4 | 11 | 18 | 19 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /FastSearchEn.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 22 5 | buildToolsVersion "22.0.1" 6 | defaultConfig { 7 | applicationId "com.mohamadamin.fastsearch.free" 8 | minSdkVersion 15 9 | targetSdkVersion 22 10 | versionCode 5 11 | versionName "1.4.0" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | compile fileTree(dir: 'libs', include: ['*.jar']) 23 | compile 'com.android.support:appcompat-v7:22.2.1' 24 | compile 'com.android.support:cardview-v7:22.2.1' 25 | compile 'com.android.support:recyclerview-v7:22.2.1' 26 | compile 'com.android.support:design:22.2.1' 27 | compile 'xyz.danoz:recyclerviewfastscroller:0.1.3' 28 | compile 'jp.wasabeef:recyclerview-animators:1.2.1' 29 | compile 'com.squareup.picasso:picasso:2.5.2' 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/res/values-mdpi/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 200dp 5 | 15dp 6 | 7 | 3dp 8 | 5dp 9 | 8dp 10 | 11dp 11 | 13dp 12 | 13 | 0dp 14 | 15 | 65dp 16 | 33dp 17 | 18 | 4dp 19 | 20 | 115dp 21 | 40dp 22 | 23 | 17dp 24 | 5dp 25 | 0dp 26 | 27 | 25dp 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/receivers/PackageInstallReceiver.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.receivers; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.content.pm.ApplicationInfo; 7 | import android.content.pm.PackageManager; 8 | 9 | import com.dynamixsoftware.ErrorAgent; 10 | import com.mohamadamin.fastsearch.free.databases.ApplicationsDB; 11 | 12 | public class PackageInstallReceiver extends BroadcastReceiver { 13 | 14 | @Override 15 | public void onReceive(Context context, Intent intent) { 16 | ApplicationsDB applicationsDB = new ApplicationsDB(context); 17 | try { 18 | ApplicationInfo applicationInfo = context.getPackageManager(). 19 | getApplicationInfo(intent.getData().getEncodedSchemeSpecificPart(), 0); 20 | applicationsDB.addApplication(applicationInfo); 21 | 22 | } catch (PackageManager.NameNotFoundException exception) { 23 | ErrorAgent.reportError(exception, "PackageInstallReceiver"); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/card.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/values-hdpi/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 190dp 5 | 64dp 6 | 20dp 7 | 56dp 8 | 9 | 200dp 10 | 15dp 11 | 12 | 4dp 13 | 6dp 14 | 9dp 15 | 12dp 16 | 15dp 17 | 18 | 0dp 19 | 20 | 65dp 21 | 33dp 22 | 23 | 4dp 24 | 25 | 120dp 26 | 45dp 27 | 28 | 17dp 29 | 5dp 30 | 0dp 31 | 32 | 30dp 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/values-xhdpi/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 190dp 5 | 64dp 6 | 35dp 7 | 56dp 8 | 9 | 200dp 10 | 20dp 11 | 12 | 5dp 13 | 7dp 14 | 11dp 15 | 15dp 16 | 20dp 17 | 18 | 0dp 19 | 20 | 70dp 21 | 35dp 22 | 23 | 4dp 24 | 25 | 135dp 26 | 45dp 27 | 28 | 17dp 29 | 5dp 30 | 0dp 31 | 32 | 35dp 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/values-sw670dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 300dp 8 | 72dp 9 | 130dp 10 | 11 | 2dp 12 | 13 | 300dp 14 | 30dp 15 | 16 | 7dp 17 | 10dp 18 | 15dp 19 | 20dp 20 | 21 | 0dp 22 | 23 | 80dp 24 | 50dp 25 | 26 | 4dp 27 | 28 | 175dp 29 | 70dp 30 | 31 | 27dp 32 | 15dp 33 | 10dp 34 | 35 | 45dp 36 | 37 | 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/utils/DisplayUtils.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.utils; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | import android.widget.FrameLayout; 7 | 8 | public class DisplayUtils { 9 | 10 | public static int convertDpToPx(Context context, int dp) { 11 | float scale = context.getResources().getDisplayMetrics().density; 12 | return (int) (dp*scale + 0.5f); 13 | } 14 | 15 | public static FrameLayout wrapViewInFrameLayout(View view, int marginLeftDp, 16 | int marginRightDp, int marginTopDp, int marginBottomDp) { 17 | 18 | FrameLayout container = new FrameLayout(view.getContext()); 19 | FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams. 20 | MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); 21 | 22 | params.leftMargin = convertDpToPx(view.getContext(), marginLeftDp); 23 | params.rightMargin = convertDpToPx(view.getContext(), marginRightDp); 24 | params.topMargin = convertDpToPx(view.getContext(), marginTopDp); 25 | params.bottomMargin = convertDpToPx(view.getContext(), marginBottomDp); 26 | 27 | view.setLayoutParams(params); 28 | container.addView(view); 29 | 30 | return container; 31 | 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 250dp 9 | 72dp 10 | 80dp 11 | 62dp 12 | 13 | 2dp 14 | 15 | 300dp 16 | 30dp 17 | 18 | 7dp 19 | 10dp 20 | 15dp 21 | 20dp 22 | 23 | 0dp 24 | 25 | 80dp 26 | 50dp 27 | 28 | 4dp 29 | 30 | 175dp 31 | 70dp 32 | 33 | 27dp 34 | 15dp 35 | 10dp 36 | 37 | 45dp 38 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 18 | 19 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/utils/BusinessUtils.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.utils; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.net.Uri; 6 | import android.widget.Toast; 7 | 8 | import com.mohamadamin.fastsearch.free.R; 9 | 10 | public class BusinessUtils { 11 | 12 | public static void launchInstagramPage(Context context) { 13 | Intent intent = new Intent(Intent.ACTION_VIEW); 14 | try { 15 | intent.setData(Uri.parse("http://instagram.com/_u/mohamad__amin")); 16 | intent.setPackage("com.instagram.android"); 17 | context.startActivity(intent); 18 | } catch (Exception ignored) { 19 | intent.setData(Uri.parse("http://instagram.com/mohamad__amin")); 20 | context.startActivity(Intent.createChooser(intent, context.getResources().getString(R.string.instagram_page))); 21 | } 22 | } 23 | 24 | public static void sendEmailToDeveloper(Context context) { 25 | Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts( 26 | "mailto","torpedo.mohammadi@gmail.com", null)); 27 | intent.putExtra(Intent.EXTRA_SUBJECT, "[Fast Search]"); 28 | try { 29 | context.startActivity(Intent.createChooser(intent, context.getResources().getString(R.string.communication_send_email))); 30 | } catch (android.content.ActivityNotFoundException ex) { 31 | Toast.makeText(context, context.getResources().getString(R.string.communication_send_mail_no_application), Toast.LENGTH_SHORT).show(); 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/search_item.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 16 | 17 | 27 | 28 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/utils/SdkUtils.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.utils; 2 | 3 | import android.content.Context; 4 | import android.content.pm.ApplicationInfo; 5 | import android.content.pm.PackageManager; 6 | import android.database.sqlite.SQLiteDatabase; 7 | import android.database.sqlite.SQLiteStatement; 8 | import android.os.Build; 9 | 10 | import com.mohamadamin.fastsearch.free.databases.ApplicationsDB; 11 | 12 | import java.util.List; 13 | 14 | public class SdkUtils { 15 | 16 | public static void addPackagesToDatabase(Context context) { 17 | 18 | ApplicationsDB applicationsDB = new ApplicationsDB(context); 19 | SQLiteDatabase db = applicationsDB.getWritableDatabase(); 20 | db.beginTransaction(); 21 | SQLiteStatement statement = db.compileStatement(applicationsDB.getInsertSql()); 22 | 23 | PackageManager packageManager = context.getPackageManager(); 24 | List packages = packageManager.getInstalledApplications(PackageManager.GET_META_DATA); 25 | for (ApplicationInfo applicationInfo : packages) { 26 | statement.bindString(1, applicationInfo.loadLabel(packageManager).toString()); 27 | statement.bindString(2, applicationInfo.packageName); 28 | statement.executeInsert(); 29 | statement.clearBindings(); 30 | } 31 | 32 | db.setTransactionSuccessful(); 33 | db.endTransaction(); 34 | if (db.isOpen()) db.close(); 35 | applicationsDB.close(); 36 | 37 | } 38 | 39 | public static boolean isHoneycombOrHigher() { 40 | return Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/utils/PreferenceUtils.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.utils; 2 | 3 | import android.content.Context; 4 | import android.content.SharedPreferences; 5 | import android.content.SharedPreferences.Editor; 6 | import android.preference.PreferenceManager; 7 | 8 | public class PreferenceUtils { 9 | 10 | public static String SHOULD_WRITE_DATABASES = "shouldWriteDatabases", 11 | SHOULD_SHOW_SEARCH_NOTIFICATION = "shouldShowSearchNotification"; 12 | 13 | public static boolean shouldWriteDatabases(Context context) { 14 | SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); 15 | return sharedPreferences.getBoolean(SHOULD_WRITE_DATABASES, true); 16 | } 17 | 18 | public static boolean shouldShowSearchNotification(Context context) { 19 | SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); 20 | return sharedPreferences.getBoolean(SHOULD_SHOW_SEARCH_NOTIFICATION, true); 21 | } 22 | 23 | public static void setShouldWriteDatabases(Context context, boolean shouldWriteDatabases) { 24 | SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); 25 | Editor editor = sharedPreferences.edit(); 26 | editor.putBoolean(SHOULD_WRITE_DATABASES, shouldWriteDatabases); 27 | editor.apply(); 28 | } 29 | 30 | public static void setShouldShowSearchNotification(Context context, boolean shouldShowSearchNotification) { 31 | SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); 32 | Editor editor = sharedPreferences.edit(); 33 | editor.putBoolean(SHOULD_SHOW_SEARCH_NOTIFICATION, shouldShowSearchNotification); 34 | editor.apply(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 19 | 24 | 25 | 26 | 31 | 32 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 19 | 24 | 25 | 26 | 31 | 32 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/adapters/HomeAdapter.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.adapters; 2 | 3 | import android.content.res.Resources; 4 | import android.support.v4.app.Fragment; 5 | import android.support.v4.app.FragmentManager; 6 | import android.support.v4.app.FragmentStatePagerAdapter; 7 | 8 | import com.mohamadamin.fastsearch.free.R; 9 | import com.mohamadamin.fastsearch.free.fragments.SearchFragment; 10 | 11 | public class HomeAdapter extends FragmentStatePagerAdapter { 12 | 13 | private final String[] titles; 14 | SearchFragment[] searchFragments; 15 | String filter; 16 | 17 | public HomeAdapter(FragmentManager fragmentManager, String filter, Resources resources) { 18 | super(fragmentManager); 19 | this.filter = filter; 20 | this.titles = new String[] { 21 | resources.getString(R.string.applications), 22 | resources.getString(R.string.contacts), 23 | resources.getString(R.string.files), 24 | resources.getString(R.string.musics), 25 | resources.getString(R.string.photos), 26 | resources.getString(R.string.videos) 27 | }; 28 | this.searchFragments = new SearchFragment[titles.length]; 29 | for (int i=0; i 5 | 6 | 16 | 17 | 27 | 28 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 21 | 24 | 25 | 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/search_widget.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | 21 | 22 | 32 | 33 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/utils/BitmapUtils.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.utils; 2 | 3 | import android.content.Context; 4 | import android.graphics.Bitmap; 5 | import android.graphics.Canvas; 6 | import android.graphics.Matrix; 7 | import android.graphics.drawable.BitmapDrawable; 8 | import android.graphics.drawable.Drawable; 9 | 10 | public class BitmapUtils { 11 | 12 | public static Bitmap getBitmapFromDrawable(Drawable drawable) { 13 | 14 | if (drawable instanceof BitmapDrawable) { 15 | return ((BitmapDrawable)drawable).getBitmap(); 16 | } 17 | 18 | Bitmap bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), 19 | drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); 20 | Canvas canvas = new Canvas(bitmap); 21 | drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight()); 22 | drawable.draw(canvas); 23 | 24 | return bitmap; 25 | 26 | } 27 | 28 | public static Bitmap getResizedBitmap(Bitmap bitmap, int newWidth, int newHeight) { 29 | 30 | if (bitmap == null) return null; 31 | 32 | int width = bitmap.getWidth(); 33 | int height = bitmap.getHeight(); 34 | Matrix matrix = new Matrix(); 35 | 36 | float scaleWidth = ((float) newWidth) / width; 37 | float scaleHeight = ((float) newHeight) / height; 38 | matrix.postScale(scaleWidth, scaleHeight); 39 | 40 | return Bitmap.createBitmap(bitmap, 0, 0, width, height, matrix, false); 41 | 42 | } 43 | 44 | public static Bitmap getResizedBitmapChecked(Bitmap bitmap, Context context) { 45 | 46 | if (bitmap == null) return null; 47 | 48 | int width = bitmap.getWidth(); 49 | int height = bitmap.getHeight(); 50 | int size = context.getResources().getDimensionPixelSize(android.R.dimen.app_icon_size); 51 | 52 | if (width > height) { 53 | if (width > size) { 54 | float scale = size/width; 55 | return getResizedBitmap(bitmap, (int) (width*scale), (int) (height*scale)); 56 | } else return bitmap; 57 | } else if (height > width) { 58 | if (height > size) { 59 | float scale = size/height; 60 | return getResizedBitmap(bitmap, (int) (width*scale), (int) (height*scale)); 61 | } else return bitmap; 62 | } else { 63 | if (width > size) return getResizedBitmap(bitmap, size, size); 64 | else return bitmap; 65 | } 66 | 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Android Lint 22 | 23 | 24 | Gradle 25 | 26 | 27 | Java 28 | 29 | 30 | Java language level migration aidsJava 31 | 32 | 33 | Packaging issuesJava 34 | 35 | 36 | Probable bugsGradle 37 | 38 | 39 | 40 | 41 | Android 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 63 | 64 | 65 | 66 | 67 | 1.7 68 | 69 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/widgets/SearchWidget.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.widgets; 2 | 3 | import android.app.PendingIntent; 4 | import android.appwidget.AppWidgetManager; 5 | import android.appwidget.AppWidgetProvider; 6 | import android.content.Context; 7 | import android.content.Intent; 8 | import android.support.annotation.NonNull; 9 | import android.widget.RemoteViews; 10 | 11 | import com.mohamadamin.fastsearch.free.R; 12 | import com.mohamadamin.fastsearch.free.activities.MainActivity; 13 | import com.mohamadamin.fastsearch.free.activities.SearchActivity; 14 | 15 | public class SearchWidget extends AppWidgetProvider { 16 | 17 | final static String ACTION_LAUNCH_MAIN_ACTIVITY = "LaunchMainActivity", 18 | ACTION_LAUNCH_SEARCH_ACTIVITY = "LaunchSearchActivity"; 19 | 20 | @Override 21 | public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { 22 | for (int appWidgetId : appWidgetIds) { 23 | updateAppWidget(context, appWidgetManager, appWidgetId); 24 | } 25 | } 26 | 27 | static void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId) { 28 | 29 | RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.search_widget); 30 | Intent intent = new Intent(context, SearchWidget.class); 31 | PendingIntent pendingIntent; 32 | 33 | intent.setAction(ACTION_LAUNCH_MAIN_ACTIVITY); 34 | pendingIntent = PendingIntent.getBroadcast(context, 0, intent, 0); 35 | views.setOnClickPendingIntent(R.id.search_launch, pendingIntent); 36 | 37 | intent.setAction(ACTION_LAUNCH_SEARCH_ACTIVITY); 38 | pendingIntent = PendingIntent.getBroadcast(context, 0, intent, 0); 39 | views.setOnClickPendingIntent(R.id.search_input, pendingIntent); 40 | views.setOnClickPendingIntent(R.id.search_search, pendingIntent); 41 | 42 | appWidgetManager.updateAppWidget(appWidgetId, views); 43 | 44 | } 45 | 46 | @Override 47 | public void onReceive(@NonNull Context context,@NonNull Intent intent) { 48 | super.onReceive(context, intent); 49 | if (intent.getAction() == null) return; 50 | if (intent.getAction().equals(ACTION_LAUNCH_MAIN_ACTIVITY)) { 51 | Intent mainIntent = new Intent(context, MainActivity.class); 52 | mainIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 53 | context.startActivity(mainIntent); 54 | } else if (intent.getAction().equals(ACTION_LAUNCH_SEARCH_ACTIVITY)) { 55 | Intent launchIntent = new Intent(context, SearchActivity.class); 56 | launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 57 | context.startActivity(launchIntent); 58 | } 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/widgets/TransparentSearchWidget.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.widgets; 2 | 3 | import android.app.PendingIntent; 4 | import android.appwidget.AppWidgetManager; 5 | import android.appwidget.AppWidgetProvider; 6 | import android.content.Context; 7 | import android.content.Intent; 8 | import android.support.annotation.NonNull; 9 | import android.widget.RemoteViews; 10 | 11 | import com.mohamadamin.fastsearch.free.R; 12 | import com.mohamadamin.fastsearch.free.activities.MainActivity; 13 | import com.mohamadamin.fastsearch.free.activities.SearchActivity; 14 | 15 | public class TransparentSearchWidget extends AppWidgetProvider { 16 | 17 | final static String ACTION_LAUNCH_MAIN_ACTIVITY = "LaunchMainActivity", 18 | ACTION_LAUNCH_SEARCH_ACTIVITY = "LaunchSearchActivity"; 19 | 20 | @Override 21 | public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { 22 | for (int appWidgetId : appWidgetIds) { 23 | updateAppWidget(context, appWidgetManager, appWidgetId); 24 | } 25 | } 26 | 27 | static void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId) { 28 | 29 | RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.transparent_search_widget); 30 | Intent intent = new Intent(context, SearchWidget.class); 31 | PendingIntent pendingIntent; 32 | 33 | intent.setAction(ACTION_LAUNCH_MAIN_ACTIVITY); 34 | pendingIntent = PendingIntent.getBroadcast(context, 0, intent, 0); 35 | views.setOnClickPendingIntent(R.id.search_launch, pendingIntent); 36 | 37 | intent.setAction(ACTION_LAUNCH_SEARCH_ACTIVITY); 38 | pendingIntent = PendingIntent.getBroadcast(context, 0, intent, 0); 39 | views.setOnClickPendingIntent(R.id.search_input, pendingIntent); 40 | views.setOnClickPendingIntent(R.id.search_search, pendingIntent); 41 | 42 | appWidgetManager.updateAppWidget(appWidgetId, views); 43 | 44 | } 45 | 46 | @Override 47 | public void onReceive(@NonNull Context context,@NonNull Intent intent) { 48 | super.onReceive(context, intent); 49 | if (intent.getAction() == null) return; 50 | if (intent.getAction().equals(ACTION_LAUNCH_MAIN_ACTIVITY)) { 51 | Intent mainIntent = new Intent(context, MainActivity.class); 52 | mainIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 53 | context.startActivity(mainIntent); 54 | } else if (intent.getAction().equals(ACTION_LAUNCH_SEARCH_ACTIVITY)) { 55 | Intent launchIntent = new Intent(context, SearchActivity.class); 56 | launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 57 | context.startActivity(launchIntent); 58 | } 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Fast Search 4 | Cancel 5 | Search 6 | No phone number 7 | Nothing Found! 8 | Search something... 9 | Files 10 | Applications 11 | Contacts 12 | Musics 13 | Photos 14 | Videos 15 | 16 | FastSearch Widget 17 | FastSearch Transparent Widget 18 | 19 | Cancel Notification 20 | Show Notification 21 | 22 | Instagram Page 23 | Email Us 24 | Sending Email To Developer 25 | Sending Email 26 | No application available for this action! 27 | 28 | Submit Data 29 | The application is now submitting your files in its local database to make searching the faster. This process may last a few minutes. Please during this period don\'t exit the Fast Search (or at least don\'t kill it) and wait. Otherwise the application may missperform! It\'s clear that the more the files are on your device the more the this process takes time. Thanks for your patience. 30 | Submitting Data... 31 | Please Wait 32 | Refresh 33 | 34 | Delete 35 | Rename 36 | Deleted! 37 | Undo 38 | OK 39 | Please enter the new name 40 | 41 | Open Folder 42 | No application available to open this file! 43 | Error in opening! Is this app runnable? 44 | Add widget 45 | 46 | Hello world! 47 | Settings 48 | EXAMPLE 49 | 50 | 51 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/utils/NotificationUtils.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.utils; 2 | 3 | import android.app.NotificationManager; 4 | import android.app.PendingIntent; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.support.v4.app.NotificationCompat; 8 | import android.support.v4.app.TaskStackBuilder; 9 | 10 | import com.mohamadamin.fastsearch.free.R; 11 | import com.mohamadamin.fastsearch.free.activities.SearchActivity; 12 | 13 | public class NotificationUtils { 14 | 15 | public static void showSearchNotification(Context context) { 16 | 17 | TaskStackBuilder stackBuilder = TaskStackBuilder.create(context); 18 | stackBuilder.addParentStack(SearchActivity.class); 19 | stackBuilder.addNextIntent(new Intent(context, SearchActivity.class)); 20 | PendingIntent pendingIntent = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT); 21 | 22 | NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context); 23 | notificationBuilder.setSmallIcon(R.drawable.ic_stat_icon) 24 | .setContentTitle(context.getString(R.string.app_name)) 25 | .setContentText(context.getString(R.string.search_first)) 26 | .setContentIntent(pendingIntent) 27 | .setOngoing(true); 28 | 29 | NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); 30 | notificationManager.notify(-75, notificationBuilder.build()); 31 | 32 | } 33 | 34 | public static void showSubmitDataNotification(Context context) { 35 | 36 | NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context); 37 | notificationBuilder.setSmallIcon(R.drawable.ic_stat_icon) 38 | .setContentTitle(context.getString(R.string.app_name)) 39 | .setContentText(context.getString(R.string.submit_data_notification)) 40 | .setProgress(100, 0, true) 41 | .setOngoing(true); 42 | 43 | NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); 44 | notificationManager.notify(-74, notificationBuilder.build()); 45 | 46 | } 47 | 48 | public static void dismissSearchNotification(Context context) { 49 | NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); 50 | notificationManager.cancel(-75); 51 | } 52 | 53 | public static void dismissSubmitDataNotification(Context context) { 54 | NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); 55 | notificationManager.cancel(-74); 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 52 | 53 | 54 | 55 | 56 | 59 | 60 | 63 | 64 | 65 | 66 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /app/src/main/res/layout/toolbar_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 20 | 21 | 24 | 25 | 35 | 36 | 46 | 47 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_search.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 15 | 18 | 22 | 32 | 33 | 34 | 35 | 42 | 46 | 54 | 55 | 56 | 63 | 67 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/databases/ApplicationsDB.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.databases; 2 | 3 | import android.content.ContentValues; 4 | import android.content.Context; 5 | import android.content.pm.ApplicationInfo; 6 | import android.content.pm.PackageManager; 7 | import android.database.Cursor; 8 | import android.database.sqlite.SQLiteDatabase; 9 | import android.database.sqlite.SQLiteOpenHelper; 10 | 11 | import com.mohamadamin.fastsearch.free.modules.CustomApplication; 12 | 13 | import java.util.ArrayList; 14 | import java.util.List; 15 | 16 | public class ApplicationsDB extends SQLiteOpenHelper { 17 | 18 | PackageManager packageManager; 19 | SQLiteDatabase db; 20 | 21 | final static int DATABASE_VERSION = 10; 22 | public final static String DATABASE_NAME = "Applications.db", 23 | TABLE_NAME = "AllApps", 24 | COLUMN_NAME = "Name", 25 | COLUMN_PACKAGE = "Package"; 26 | 27 | final static String CREATE_TABLE = "CREATE TABLE " + TABLE_NAME + "(" 28 | + COLUMN_NAME + " TEXT," 29 | + COLUMN_PACKAGE + " TEXT" + ")"; 30 | 31 | public ApplicationsDB(Context context) { 32 | super(context, DATABASE_NAME, null, DATABASE_VERSION); 33 | packageManager = context.getPackageManager(); 34 | } 35 | 36 | @Override 37 | public void onCreate(SQLiteDatabase db) { 38 | db.execSQL(CREATE_TABLE); 39 | } 40 | 41 | @Override 42 | public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { 43 | db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME); 44 | onCreate(db); 45 | } 46 | 47 | public String getInsertSql() { 48 | return String.format( 49 | "insert into %s (%s, %s) values (?, ?);", 50 | TABLE_NAME, 51 | COLUMN_NAME, 52 | COLUMN_PACKAGE); 53 | } 54 | 55 | public void addApplication(ApplicationInfo applicationInfo) { 56 | if (db == null) db = getWritableDatabase(); 57 | ContentValues values = new ContentValues(); 58 | values.put(COLUMN_NAME, applicationInfo.loadLabel(packageManager).toString()); 59 | values.put(COLUMN_PACKAGE, applicationInfo.packageName); 60 | db.insert(TABLE_NAME, null, values); 61 | } 62 | 63 | public List filterApplications(String filter) { 64 | 65 | if (db == null) db = getWritableDatabase(); 66 | List customApplications = new ArrayList<>(); 67 | CustomApplication customApplication; 68 | 69 | String query = "SELECT * FROM " + TABLE_NAME + " WHERE " + 70 | COLUMN_NAME + " LIKE '%" + filter + "%'"; 71 | 72 | Cursor cursor = db.rawQuery(query, null); 73 | 74 | if (cursor.getCount() > 0) { 75 | while (cursor.moveToNext()) { 76 | customApplication = new CustomApplication(); 77 | customApplication.titleText = cursor.getString(cursor.getColumnIndex(COLUMN_NAME)); 78 | customApplication.packageName = cursor.getString(cursor.getColumnIndex(COLUMN_PACKAGE)); 79 | customApplications.add(customApplication); 80 | } 81 | } 82 | 83 | cursor.close(); 84 | return customApplications; 85 | 86 | } 87 | 88 | public Cursor getFilteredCursor(String filter) { 89 | if (db == null) db = getWritableDatabase(); 90 | String query = "SELECT * FROM " + TABLE_NAME + " WHERE " + 91 | COLUMN_NAME + " LIKE '%" + filter + "%'"; 92 | return db.rawQuery(query, null); 93 | } 94 | 95 | public void removeApplication(String packageName) { 96 | if (db == null) db = getWritableDatabase(); 97 | db.delete(TABLE_NAME, COLUMN_PACKAGE + " = ?", new String[]{packageName}); 98 | } 99 | 100 | } 101 | -------------------------------------------------------------------------------- /app/src/main/res/layout/toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 20 | 21 | 24 | 25 | 34 | 35 | 44 | 45 | 55 | 56 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/activities/SearchActivity.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.activities; 2 | 3 | import android.content.Intent; 4 | import android.support.annotation.NonNull; 5 | import android.support.v4.view.ViewPager; 6 | import android.support.v7.app.ActionBar; 7 | import android.os.Bundle; 8 | import android.support.v7.app.AppCompatActivity; 9 | import android.support.v7.widget.Toolbar; 10 | import android.view.KeyEvent; 11 | import android.view.View; 12 | import android.view.inputmethod.EditorInfo; 13 | import android.widget.EditText; 14 | import android.widget.ImageButton; 15 | import android.widget.TextView; 16 | 17 | import com.dynamixsoftware.ErrorAgent; 18 | import com.mohamadamin.fastsearch.free.R; 19 | import com.mohamadamin.fastsearch.free.adapters.HomeAdapter; 20 | import com.mohamadamin.fastsearch.free.fragments.SearchFragment; 21 | import com.mohamadamin.fastsearch.free.modules.SlidingTabLayout; 22 | 23 | public class SearchActivity extends AppCompatActivity implements 24 | View.OnClickListener, 25 | TextView.OnEditorActionListener { 26 | 27 | ViewPager viewPager; 28 | SlidingTabLayout slidingTabLayout; 29 | HomeAdapter homeAdapter; 30 | 31 | Toolbar toolbar; 32 | ActionBar actionBar; 33 | EditText searchInput; 34 | ImageButton launchButton, searchButton; 35 | 36 | String filter; 37 | 38 | @Override 39 | protected void onCreate(Bundle savedInstanceState) { 40 | super.onCreate(savedInstanceState); 41 | setContentView(R.layout.activity_search); 42 | ErrorAgent.register(this, 145L); 43 | 44 | if (savedInstanceState != null) { 45 | this.filter = savedInstanceState.getString(SearchFragment.FILTER); 46 | } 47 | 48 | initializeViews(); 49 | organizeViews(); 50 | organizeToolbar(); 51 | 52 | } 53 | 54 | private void initializeViews() { 55 | viewPager = (ViewPager) findViewById(R.id.search_pager); 56 | slidingTabLayout = (SlidingTabLayout) findViewById(R.id.search_tabs); 57 | } 58 | 59 | private void organizeToolbar() { 60 | toolbar = (Toolbar) findViewById(R.id.search_toolbar); 61 | launchButton = (ImageButton) findViewById(R.id.toolbar_launch); 62 | searchButton = (ImageButton) findViewById(R.id.toolbar_search); 63 | searchInput = (EditText) findViewById(R.id.toolbar_input); 64 | setSupportActionBar(toolbar); 65 | actionBar = getSupportActionBar(); 66 | if (actionBar != null) { 67 | actionBar.setDisplayHomeAsUpEnabled(false); 68 | actionBar.setHomeButtonEnabled(false); 69 | actionBar.setDisplayShowTitleEnabled(false); 70 | } 71 | launchButton.setOnClickListener(this); 72 | searchButton.setOnClickListener(this); 73 | searchInput.setOnEditorActionListener(this); 74 | } 75 | 76 | private void applyFilter(String filter) { 77 | int currentPosition = viewPager.getCurrentItem(); 78 | homeAdapter = new HomeAdapter(getSupportFragmentManager(), filter, getResources()); 79 | viewPager.setAdapter(homeAdapter); 80 | viewPager.setCurrentItem(currentPosition, true); 81 | } 82 | 83 | private void organizeViews() { 84 | homeAdapter = new HomeAdapter(getSupportFragmentManager(), filter, getResources()); 85 | viewPager.setAdapter(homeAdapter); 86 | slidingTabLayout.setCustomTabColorizer(new SlidingTabLayout.TabColorizer() { 87 | @Override 88 | public int getIndicatorColor(int position) { 89 | return getResources().getColor(android.R.color.white); 90 | } 91 | }); 92 | slidingTabLayout.setDistributeEvenly(true); 93 | slidingTabLayout.setViewPager(viewPager); 94 | } 95 | 96 | @Override 97 | public boolean onEditorAction(TextView textView, int actionId, KeyEvent event) { 98 | if (actionId == EditorInfo.IME_ACTION_SEARCH) { 99 | this.filter = searchInput.getText().toString(); 100 | applyFilter(filter); 101 | return true; 102 | } 103 | return false; 104 | } 105 | 106 | @Override 107 | public void onClick(View view) { 108 | switch (view.getId()) { 109 | case R.id.toolbar_launch : { 110 | finish(); 111 | startActivity(new Intent(this, MainActivity.class)); 112 | break; 113 | } 114 | case R.id.toolbar_search : { 115 | this.filter = searchInput.getText().toString(); 116 | applyFilter(filter); 117 | break; 118 | } 119 | } 120 | } 121 | 122 | @Override 123 | public void onSaveInstanceState(Bundle outState) { 124 | super.onSaveInstanceState(outState); 125 | outState.putString(SearchFragment.FILTER, filter); 126 | } 127 | 128 | @Override 129 | protected void onRestoreInstanceState(@NonNull Bundle savedInstanceState) { 130 | super.onRestoreInstanceState(savedInstanceState); 131 | this.filter = savedInstanceState.getString(SearchFragment.FILTER); 132 | } 133 | 134 | } 135 | -------------------------------------------------------------------------------- /app/src/main/res/layout/slider_list.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 18 | 24 | 25 | 26 | 30 | 34 | 35 | 50 | 51 | 60 | 64 | 65 | 66 | 81 | 82 | 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/fragments/HomeFragment.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.fragments; 2 | 3 | import android.os.Bundle; 4 | import android.support.v4.app.Fragment; 5 | import android.support.v4.view.GravityCompat; 6 | import android.support.v4.view.ViewPager; 7 | import android.support.v7.app.ActionBar; 8 | import android.support.v7.app.AppCompatActivity; 9 | import android.support.v7.widget.PopupMenu; 10 | import android.support.v7.widget.Toolbar; 11 | import android.view.KeyEvent; 12 | import android.view.LayoutInflater; 13 | import android.view.MenuItem; 14 | import android.view.View; 15 | import android.view.ViewGroup; 16 | import android.view.inputmethod.EditorInfo; 17 | import android.widget.EditText; 18 | import android.widget.ImageButton; 19 | import android.widget.TextView; 20 | 21 | import com.mohamadamin.fastsearch.free.R; 22 | import com.mohamadamin.fastsearch.free.activities.MainActivity; 23 | import com.mohamadamin.fastsearch.free.adapters.HomeAdapter; 24 | import com.mohamadamin.fastsearch.free.modules.SlidingTabLayout; 25 | import com.mohamadamin.fastsearch.free.utils.BusinessUtils; 26 | 27 | public class HomeFragment extends Fragment implements 28 | View.OnClickListener, 29 | TextView.OnEditorActionListener { 30 | 31 | View mainLayout; 32 | ViewPager viewPager; 33 | SlidingTabLayout slidingTabLayout; 34 | HomeAdapter homeAdapter; 35 | 36 | Toolbar toolbar; 37 | ActionBar actionBar; 38 | EditText searchInput; 39 | ImageButton menuButton, actionButton, searchButton; 40 | 41 | String filter; 42 | 43 | @Override 44 | public void onCreate(Bundle savedInstanceState) { 45 | super.onCreate(savedInstanceState); 46 | if (savedInstanceState != null) { 47 | filter = savedInstanceState.getString(SearchFragment.FILTER); 48 | } 49 | } 50 | 51 | @Override 52 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 53 | mainLayout = inflater.inflate(R.layout.fragment_home, container, false); 54 | if (isAdded()) showContent(); 55 | return mainLayout; 56 | } 57 | 58 | private void showContent() { 59 | initializeViews(); 60 | organizeViews(); 61 | organizeToolbar(); 62 | } 63 | 64 | private void initializeViews() { 65 | viewPager = (ViewPager) mainLayout.findViewById(R.id.home_pager); 66 | slidingTabLayout = (SlidingTabLayout) mainLayout.findViewById(R.id.home_tabs); 67 | } 68 | 69 | private void organizeToolbar() { 70 | toolbar = (Toolbar) mainLayout.findViewById(R.id.home_toolbar); 71 | actionButton = (ImageButton) mainLayout.findViewById(R.id.toolbar_action); 72 | menuButton = (ImageButton) mainLayout.findViewById(R.id.toolbar_overflow); 73 | searchButton = (ImageButton) mainLayout.findViewById(R.id.toolbar_search); 74 | searchInput = (EditText) mainLayout.findViewById(R.id.toolbar_input); 75 | ((AppCompatActivity) getActivity()).setSupportActionBar(toolbar); 76 | actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar(); 77 | if (actionBar != null) { 78 | actionBar.setDisplayHomeAsUpEnabled(false); 79 | actionBar.setHomeButtonEnabled(false); 80 | actionBar.setDisplayShowTitleEnabled(false); 81 | } 82 | actionButton.setOnClickListener(this); 83 | menuButton.setOnClickListener(this); 84 | searchButton.setOnClickListener(this); 85 | searchInput.setOnEditorActionListener(this); 86 | } 87 | 88 | private void organizeViews() { 89 | homeAdapter = new HomeAdapter(getChildFragmentManager(), filter, getResources()); 90 | viewPager.setAdapter(homeAdapter); 91 | slidingTabLayout.setCustomTabColorizer(new SlidingTabLayout.TabColorizer() { 92 | @Override 93 | public int getIndicatorColor(int position) { 94 | return getResources().getColor(android.R.color.white); 95 | } 96 | }); 97 | slidingTabLayout.setViewPager(viewPager); 98 | } 99 | 100 | 101 | private void applyFilter(String filter) { 102 | int currentPosition = viewPager.getCurrentItem(); 103 | homeAdapter = new HomeAdapter(getChildFragmentManager(), filter, getResources()); 104 | viewPager.setAdapter(homeAdapter); 105 | viewPager.setCurrentItem(currentPosition, true); 106 | } 107 | 108 | private boolean onOptionsItemSelected(int menuId) { 109 | switch (menuId) { 110 | case R.id.action_email : { 111 | BusinessUtils.sendEmailToDeveloper(getActivity()); 112 | return true; 113 | } 114 | default: return false; 115 | } 116 | } 117 | 118 | @Override 119 | public boolean onEditorAction(TextView textView, int actionId, KeyEvent event) { 120 | if (actionId == EditorInfo.IME_ACTION_SEARCH) { 121 | this.filter = searchInput.getText().toString(); 122 | applyFilter(filter); 123 | return true; 124 | } 125 | return false; 126 | } 127 | 128 | @Override 129 | public void onClick(View view) { 130 | switch (view.getId()) { 131 | case R.id.toolbar_action : { 132 | if (((MainActivity)getActivity()).drawerLayout.isDrawerOpen(GravityCompat.START)) ((MainActivity)getActivity()).closeDrawerLayout(); 133 | else ((MainActivity)getActivity()).openDrawerLayout(); 134 | break; 135 | } 136 | case R.id.toolbar_overflow : { 137 | PopupMenu popupMenu = new PopupMenu(getActivity(), view); 138 | popupMenu.getMenuInflater().inflate(R.menu.main, popupMenu.getMenu()); 139 | popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() { 140 | @Override 141 | public boolean onMenuItemClick(MenuItem item) { 142 | return onOptionsItemSelected(item.getItemId()); 143 | } 144 | }); 145 | popupMenu.show(); 146 | break; 147 | } 148 | case R.id.toolbar_search : { 149 | this.filter = searchInput.getText().toString(); 150 | applyFilter(filter); 151 | break; 152 | } 153 | } 154 | } 155 | 156 | @Override 157 | public void onSaveInstanceState(Bundle outState) { 158 | super.onSaveInstanceState(outState); 159 | outState.putString(SearchFragment.FILTER, filter); 160 | } 161 | 162 | } 163 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/activities/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.activities; 2 | 3 | import android.app.ProgressDialog; 4 | import android.os.AsyncTask; 5 | import android.os.Bundle; 6 | import android.support.v4.widget.DrawerLayout; 7 | import android.support.v7.app.AppCompatActivity; 8 | import android.view.View; 9 | import android.view.WindowManager; 10 | import android.widget.TextView; 11 | 12 | import com.dynamixsoftware.ErrorAgent; 13 | import com.mohamadamin.fastsearch.free.R; 14 | import com.mohamadamin.fastsearch.free.fragments.HomeFragment; 15 | import com.mohamadamin.fastsearch.free.utils.BusinessUtils; 16 | import com.mohamadamin.fastsearch.free.utils.NotificationUtils; 17 | import com.mohamadamin.fastsearch.free.utils.PreferenceUtils; 18 | import com.mohamadamin.fastsearch.free.utils.SdkUtils; 19 | 20 | public class MainActivity extends AppCompatActivity { 21 | 22 | public DrawerLayout drawerLayout; 23 | View slidingPanel; 24 | ProgressDialog progressDialog; 25 | 26 | TextView notificationText, emailText, instagramText; 27 | TextView[] textViews; 28 | 29 | @Override 30 | protected void onCreate(Bundle savedInstanceState) { 31 | 32 | super.onCreate(savedInstanceState); 33 | setContentView(R.layout.activity_main); 34 | getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN); 35 | 36 | ErrorAgent.register(this, 145L); 37 | 38 | checkNotifications(); 39 | checkDatabases(); 40 | initializeViews(); 41 | handleClicks(); 42 | if (savedInstanceState == null) launchHome(); 43 | 44 | } 45 | 46 | private void checkNotifications() { 47 | if (PreferenceUtils.shouldShowSearchNotification(this)) NotificationUtils.showSearchNotification(this); 48 | else NotificationUtils.dismissSearchNotification(this); 49 | } 50 | 51 | private void initializeViews() { 52 | slidingPanel = findViewById(R.id.main_slider); 53 | drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); 54 | notificationText = (TextView) findViewById(R.id.slider_notification); 55 | emailText = (TextView) findViewById(R.id.slider_email); 56 | instagramText = (TextView) findViewById(R.id.slider_instagram); 57 | textViews = new TextView[]{notificationText, emailText, instagramText}; 58 | } 59 | 60 | private void handleClicks() { 61 | View.OnClickListener otherOnClickListener = new View.OnClickListener() { 62 | @Override 63 | public void onClick(View view) { 64 | switch (view.getId()) { 65 | case R.id.slider_notification : changeNotification(); break; 66 | case R.id.slider_email : BusinessUtils.sendEmailToDeveloper(MainActivity.this); break; 67 | case R.id.slider_instagram : BusinessUtils.launchInstagramPage(MainActivity.this); break; 68 | } 69 | closeDrawerLayout(); 70 | } 71 | }; 72 | for (TextView textView : textViews) { 73 | textView.setOnClickListener(otherOnClickListener); 74 | } 75 | if (PreferenceUtils.shouldShowSearchNotification(this)) { 76 | notificationText.setText(getString(R.string.cancel_notification)); 77 | } else notificationText.setText(getString(R.string.show_notification)); 78 | } 79 | 80 | private void changeNotification() { 81 | PreferenceUtils.setShouldShowSearchNotification( 82 | this, 83 | !PreferenceUtils.shouldShowSearchNotification(this) 84 | ); 85 | if (PreferenceUtils.shouldShowSearchNotification(this)) { 86 | notificationText.setText(getString(R.string.cancel_notification)); 87 | NotificationUtils.showSearchNotification(this); 88 | } else { 89 | notificationText.setText(getString(R.string.show_notification)); 90 | NotificationUtils.dismissSearchNotification(this); 91 | } 92 | } 93 | 94 | private void launchHome() { 95 | HomeFragment homeFragment = new HomeFragment(); 96 | getSupportFragmentManager().beginTransaction().replace(R.id.frame_container, homeFragment).commit(); 97 | } 98 | 99 | public void openDrawerLayout() { 100 | if (drawerLayout != null) drawerLayout.openDrawer(slidingPanel); 101 | } 102 | 103 | public void closeDrawerLayout() { 104 | if (drawerLayout != null) drawerLayout.closeDrawer(slidingPanel); 105 | } 106 | 107 | private void dismissProgressDialog() { 108 | if (progressDialog != null && progressDialog.isShowing()) { 109 | progressDialog.dismiss(); 110 | progressDialog = null; 111 | } 112 | } 113 | 114 | private void checkDatabases() { 115 | 116 | final boolean shouldFill = PreferenceUtils.shouldWriteDatabases(this); 117 | if (!shouldFill) return; 118 | 119 | AsyncTask task = new AsyncTask() { 120 | 121 | @Override 122 | protected void onPreExecute() { 123 | super.onPreExecute(); 124 | NotificationUtils.showSubmitDataNotification(MainActivity.this); 125 | progressDialog = new ProgressDialog(MainActivity.this); 126 | progressDialog.setTitle(getString(R.string.submit_data_title)); 127 | progressDialog.setMessage(getString(R.string.submit_data_description)); 128 | progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); 129 | progressDialog.setIndeterminate(true); 130 | progressDialog.setCancelable(false); 131 | progressDialog.setProgressPercentFormat(null); 132 | progressDialog.setProgressNumberFormat(null); 133 | progressDialog.show(); 134 | } 135 | 136 | @Override 137 | protected Void doInBackground(Void... params) { 138 | SdkUtils.addPackagesToDatabase(MainActivity.this); 139 | return null; 140 | } 141 | 142 | @Override 143 | protected void onPostExecute(Void aVoid) { 144 | PreferenceUtils.setShouldWriteDatabases(MainActivity.this, false); 145 | NotificationUtils.dismissSubmitDataNotification(MainActivity.this); 146 | if (MainActivity.this.isFinishing()) return; 147 | dismissProgressDialog(); 148 | } 149 | 150 | }; 151 | 152 | if (SdkUtils.isHoneycombOrHigher()) task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); 153 | else task.execute(); 154 | 155 | } 156 | 157 | @Override 158 | public void onDestroy() { 159 | dismissProgressDialog(); 160 | super.onDestroy(); 161 | } 162 | 163 | } -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/modules/SlidingTabStrip.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 Google Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.mohamadamin.fastsearch.free.modules; 18 | 19 | import android.content.Context; 20 | import android.graphics.Canvas; 21 | import android.graphics.Color; 22 | import android.graphics.Paint; 23 | import android.util.AttributeSet; 24 | import android.util.TypedValue; 25 | import android.view.View; 26 | import android.widget.LinearLayout; 27 | 28 | class SlidingTabStrip extends LinearLayout { 29 | 30 | private static final int DEFAULT_BOTTOM_BORDER_THICKNESS_DIPS = 0; 31 | private static final byte DEFAULT_BOTTOM_BORDER_COLOR_ALPHA = 0x26; 32 | private static final int SELECTED_INDICATOR_THICKNESS_DIPS = 3; 33 | private static final int DEFAULT_SELECTED_INDICATOR_COLOR = 0xFF33B5E5; 34 | 35 | private final int mBottomBorderThickness; 36 | private final Paint mBottomBorderPaint; 37 | 38 | private final int mSelectedIndicatorThickness; 39 | private final Paint mSelectedIndicatorPaint; 40 | 41 | private final int mDefaultBottomBorderColor; 42 | 43 | private int mSelectedPosition; 44 | private float mSelectionOffset; 45 | 46 | private SlidingTabLayout.TabColorizer mCustomTabColorizer; 47 | private final SimpleTabColorizer mDefaultTabColorizer; 48 | 49 | SlidingTabStrip(Context context) { 50 | this(context, null); 51 | } 52 | 53 | SlidingTabStrip(Context context, AttributeSet attrs) { 54 | super(context, attrs); 55 | setWillNotDraw(false); 56 | 57 | final float density = getResources().getDisplayMetrics().density; 58 | 59 | TypedValue outValue = new TypedValue(); 60 | context.getTheme().resolveAttribute(android.R.attr.colorForeground, outValue, true); 61 | final int themeForegroundColor = outValue.data; 62 | 63 | mDefaultBottomBorderColor = setColorAlpha(themeForegroundColor, 64 | DEFAULT_BOTTOM_BORDER_COLOR_ALPHA); 65 | 66 | mDefaultTabColorizer = new SimpleTabColorizer(); 67 | mDefaultTabColorizer.setIndicatorColors(DEFAULT_SELECTED_INDICATOR_COLOR); 68 | 69 | mBottomBorderThickness = (int) (DEFAULT_BOTTOM_BORDER_THICKNESS_DIPS * density); 70 | mBottomBorderPaint = new Paint(); 71 | mBottomBorderPaint.setColor(mDefaultBottomBorderColor); 72 | 73 | mSelectedIndicatorThickness = (int) (SELECTED_INDICATOR_THICKNESS_DIPS * density); 74 | mSelectedIndicatorPaint = new Paint(); 75 | } 76 | 77 | void setCustomTabColorizer(SlidingTabLayout.TabColorizer customTabColorizer) { 78 | mCustomTabColorizer = customTabColorizer; 79 | invalidate(); 80 | } 81 | 82 | void setSelectedIndicatorColors(int... colors) { 83 | // Make sure that the custom colorizer is removed 84 | mCustomTabColorizer = null; 85 | mDefaultTabColorizer.setIndicatorColors(colors); 86 | invalidate(); 87 | } 88 | 89 | void onViewPagerPageChanged(int position, float positionOffset) { 90 | mSelectedPosition = position; 91 | mSelectionOffset = positionOffset; 92 | invalidate(); 93 | } 94 | 95 | @Override 96 | protected void onDraw(Canvas canvas) { 97 | final int height = getHeight(); 98 | final int childCount = getChildCount(); 99 | final SlidingTabLayout.TabColorizer tabColorizer = mCustomTabColorizer != null 100 | ? mCustomTabColorizer 101 | : mDefaultTabColorizer; 102 | 103 | // Thick colored underline below the current selection 104 | if (childCount > 0) { 105 | View selectedTitle = getChildAt(mSelectedPosition); 106 | int left = selectedTitle.getLeft(); 107 | int right = selectedTitle.getRight(); 108 | int color = tabColorizer.getIndicatorColor(mSelectedPosition); 109 | 110 | if (mSelectionOffset > 0f && mSelectedPosition < (getChildCount() - 1)) { 111 | int nextColor = tabColorizer.getIndicatorColor(mSelectedPosition + 1); 112 | if (color != nextColor) { 113 | color = blendColors(nextColor, color, mSelectionOffset); 114 | } 115 | 116 | // Draw the selection partway between the tabs 117 | View nextTitle = getChildAt(mSelectedPosition + 1); 118 | left = (int) (mSelectionOffset * nextTitle.getLeft() + 119 | (1.0f - mSelectionOffset) * left); 120 | right = (int) (mSelectionOffset * nextTitle.getRight() + 121 | (1.0f - mSelectionOffset) * right); 122 | } 123 | 124 | mSelectedIndicatorPaint.setColor(color); 125 | 126 | canvas.drawRect(left, height - mSelectedIndicatorThickness, right, 127 | height, mSelectedIndicatorPaint); 128 | } 129 | 130 | // Thin underline along the entire bottom edge 131 | canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); 132 | } 133 | 134 | /** 135 | * Set the alpha value of the {@code color} to be the given {@code alpha} value. 136 | */ 137 | private static int setColorAlpha(int color, byte alpha) { 138 | return Color.argb(alpha, Color.red(color), Color.green(color), Color.blue(color)); 139 | } 140 | 141 | /** 142 | * Blend {@code color1} and {@code color2} using the given ratio. 143 | * 144 | * @param ratio of which to blend. 1.0 will return {@code color1}, 0.5 will give an even blend, 145 | * 0.0 will return {@code color2}. 146 | */ 147 | private static int blendColors(int color1, int color2, float ratio) { 148 | final float inverseRation = 1f - ratio; 149 | float r = (Color.red(color1) * ratio) + (Color.red(color2) * inverseRation); 150 | float g = (Color.green(color1) * ratio) + (Color.green(color2) * inverseRation); 151 | float b = (Color.blue(color1) * ratio) + (Color.blue(color2) * inverseRation); 152 | return Color.rgb((int) r, (int) g, (int) b); 153 | } 154 | 155 | private static class SimpleTabColorizer implements SlidingTabLayout.TabColorizer { 156 | private int[] mIndicatorColors; 157 | 158 | @Override 159 | public final int getIndicatorColor(int position) { 160 | return mIndicatorColors[position % mIndicatorColors.length]; 161 | } 162 | 163 | void setIndicatorColors(int... colors) { 164 | mIndicatorColors = colors; 165 | } 166 | } 167 | } -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/adapters/ApplicationAdapter.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.adapters; 2 | 3 | import android.animation.AnimatorSet; 4 | import android.animation.ObjectAnimator; 5 | import android.app.Activity; 6 | import android.database.Cursor; 7 | import android.os.AsyncTask; 8 | import android.support.v7.widget.RecyclerView; 9 | import android.text.Spannable; 10 | import android.text.SpannableString; 11 | import android.text.style.ForegroundColorSpan; 12 | import android.view.LayoutInflater; 13 | import android.view.View; 14 | import android.view.ViewGroup; 15 | import android.widget.Toast; 16 | 17 | import com.mohamadamin.fastsearch.free.R; 18 | import com.mohamadamin.fastsearch.free.databases.ApplicationsDB; 19 | import com.mohamadamin.fastsearch.free.fragments.SearchFragment; 20 | import com.mohamadamin.fastsearch.free.modules.CustomApplication; 21 | import com.mohamadamin.fastsearch.free.utils.PicassoUtils; 22 | import com.mohamadamin.fastsearch.free.utils.SdkUtils; 23 | import com.squareup.picasso.Picasso; 24 | 25 | import java.util.ArrayList; 26 | import java.util.List; 27 | 28 | public class ApplicationAdapter extends RecyclerView.Adapter implements 29 | View.OnClickListener { 30 | 31 | Activity context; 32 | List list; 33 | Picasso picasso; 34 | String filter; 35 | SearchFragment searchFragment; 36 | 37 | int lastPosition = -1; 38 | 39 | public ApplicationAdapter(SearchFragment searchFragment, Activity context, String filter) { 40 | this.searchFragment = searchFragment; 41 | this.filter = filter; 42 | this.context = context; 43 | if (SdkUtils.isHoneycombOrHigher()) new ApplicationLoaderTask().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); 44 | else new ApplicationLoaderTask().execute(); 45 | initializePicasso(); 46 | } 47 | 48 | private void initializePicasso() { 49 | picasso = new Picasso.Builder(context) 50 | .addRequestHandler(new PicassoUtils.ApplicationRequestHandler(context)) 51 | .build(); 52 | } 53 | 54 | @Override 55 | public int getItemCount() { 56 | return (list == null) ? 0 : list.size(); 57 | } 58 | 59 | @Override 60 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 61 | final View view = LayoutInflater.from(context).inflate(R.layout.search_item, parent, false); 62 | return RecyclerItemViewHolder.newInstance(view); 63 | } 64 | 65 | @Override 66 | public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) { 67 | RecyclerItemViewHolder holder = (RecyclerItemViewHolder) viewHolder; 68 | CustomApplication customApplication = list.get(position); 69 | holder.setTitleText(getSpannedString(customApplication.titleText, filter)); 70 | holder.setDescriptionText(customApplication.packageName); 71 | holder.getParent().setTag(position); 72 | holder.getParent().setOnClickListener(this); 73 | String packageName = customApplication.packageName; 74 | picasso.load(PicassoUtils.SCHEME_APPLICATION+":/"+packageName) 75 | .placeholder(R.drawable.file_android) 76 | .error(R.drawable.file_android) 77 | .into(holder.getImageView()); 78 | } 79 | 80 | @Override 81 | public void onViewAttachedToWindow(final RecyclerView.ViewHolder viewHolder) { 82 | 83 | super.onViewAttachedToWindow(viewHolder); 84 | final RecyclerItemViewHolder holder = (RecyclerItemViewHolder) viewHolder; 85 | 86 | holder.getParent().setVisibility(View.INVISIBLE); 87 | if (holder.getAdapterPosition() > lastPosition) { 88 | holder.getParent().getHandler().postDelayed(new Runnable() { 89 | @Override 90 | public void run() { 91 | holder.getParent().setVisibility(View.VISIBLE); 92 | ObjectAnimator alpha = ObjectAnimator.ofFloat(holder.getParent(), "alpha", 0f, 1f); 93 | AnimatorSet animSet = new AnimatorSet(); 94 | animSet.play(alpha); 95 | animSet.setDuration(400); 96 | animSet.start(); 97 | 98 | } 99 | }, 100); 100 | 101 | lastPosition = holder.getAdapterPosition(); 102 | } else holder.getParent().setVisibility(View.VISIBLE); 103 | 104 | } 105 | 106 | private Spannable getSpannedString(String parent, String filter) { 107 | String sample = parent.toLowerCase(); 108 | filter = filter.toLowerCase(); 109 | List integers = new ArrayList<>(); 110 | Spannable spannable = new SpannableString(parent); 111 | int filterLength = filter.length(); 112 | int index = sample.indexOf(filter); 113 | while (index >= 0) { 114 | integers.add(index); 115 | index = sample.indexOf(filter, index+1); 116 | } 117 | for (int i : integers) { 118 | spannable.setSpan(new ForegroundColorSpan(context.getResources() 119 | .getColor(R.color.colorPrimary)), i, i+filterLength, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); 120 | } 121 | return spannable; 122 | } 123 | 124 | @Override 125 | public void onClick(View view) { 126 | try { 127 | context.startActivity(context.getPackageManager(). 128 | getLaunchIntentForPackage(list.get((Integer) view.getTag()).packageName)); 129 | } catch (Exception e) { 130 | Toast.makeText(context, context.getResources().getString(R.string.error_opening_application) 131 | , Toast.LENGTH_LONG).show(); 132 | } 133 | } 134 | 135 | public void add(CustomApplication customApplication) { 136 | list.add(customApplication); 137 | notifyItemInserted(getItemCount()); 138 | } 139 | 140 | private class ApplicationLoaderTask extends AsyncTask { 141 | @Override 142 | protected Void doInBackground(Void... params) { 143 | filterApplications(); 144 | return null; 145 | } 146 | } 147 | 148 | private void filterApplications() { 149 | 150 | list = new ArrayList<>(); 151 | ApplicationsDB applicationsDB = new ApplicationsDB(context); 152 | Cursor cursor = applicationsDB.getFilteredCursor(filter); 153 | 154 | if (cursor.getCount() == 0) { 155 | if (searchFragment!=null && context!=null) { 156 | context.runOnUiThread(new Runnable() { 157 | @Override 158 | public void run() { 159 | searchFragment.showNothingFoundLayout(); 160 | } 161 | }); 162 | } 163 | return; 164 | } 165 | 166 | while (cursor.moveToNext()) { 167 | final CustomApplication customApplication = new CustomApplication(); 168 | customApplication.titleText = cursor.getString(cursor.getColumnIndex(ApplicationsDB.COLUMN_NAME)); 169 | customApplication.packageName = cursor.getString(cursor.getColumnIndex(ApplicationsDB.COLUMN_PACKAGE)); 170 | if (context != null) { 171 | context.runOnUiThread(new Runnable() { 172 | @Override 173 | public void run() { 174 | add(customApplication); 175 | } 176 | }); 177 | } 178 | } 179 | 180 | cursor.close(); 181 | 182 | } 183 | 184 | } 185 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/adapters/ContactAdapter.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.adapters; 2 | 3 | import android.animation.AnimatorSet; 4 | import android.animation.ObjectAnimator; 5 | import android.app.Activity; 6 | import android.content.ContentResolver; 7 | import android.content.Intent; 8 | import android.database.Cursor; 9 | import android.net.Uri; 10 | import android.os.AsyncTask; 11 | import android.provider.ContactsContract; 12 | import android.support.v7.widget.RecyclerView; 13 | import android.text.Spannable; 14 | import android.text.SpannableString; 15 | import android.text.TextUtils; 16 | import android.text.style.ForegroundColorSpan; 17 | import android.view.LayoutInflater; 18 | import android.view.View; 19 | import android.view.ViewGroup; 20 | 21 | import com.mohamadamin.fastsearch.free.R; 22 | import com.mohamadamin.fastsearch.free.fragments.SearchFragment; 23 | import com.mohamadamin.fastsearch.free.modules.CustomContact; 24 | import com.mohamadamin.fastsearch.free.utils.PicassoUtils; 25 | import com.mohamadamin.fastsearch.free.utils.SdkUtils; 26 | import com.squareup.picasso.Picasso; 27 | 28 | import java.util.ArrayList; 29 | import java.util.List; 30 | 31 | public class ContactAdapter extends RecyclerView.Adapter implements 32 | View.OnClickListener { 33 | 34 | Activity context; 35 | List list; 36 | Picasso picasso; 37 | String filter; 38 | SearchFragment searchFragment; 39 | 40 | int lastPosition = -1; 41 | 42 | public ContactAdapter(SearchFragment searchFragment, Activity context, String filter) { 43 | this.searchFragment = searchFragment; 44 | this.filter = filter; 45 | this.context = context; 46 | if (SdkUtils.isHoneycombOrHigher()) new ContactLoaderTask().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); 47 | else new ContactLoaderTask().execute(); 48 | initializePicasso(); 49 | } 50 | 51 | private void initializePicasso() { 52 | picasso = new Picasso.Builder(context) 53 | .addRequestHandler(new PicassoUtils.ContactRequestHandler(context)) 54 | .build(); 55 | } 56 | 57 | @Override 58 | public int getItemCount() { 59 | return (list == null) ? 0 : list.size(); 60 | } 61 | 62 | @Override 63 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 64 | View view = LayoutInflater.from(context).inflate(R.layout.search_item, parent, false); 65 | return RecyclerItemViewHolder.newInstance(view); 66 | } 67 | 68 | @Override 69 | public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) { 70 | RecyclerItemViewHolder holder = (RecyclerItemViewHolder) viewHolder; 71 | CustomContact customContact = list.get(position); 72 | holder.setTitleText(getSpannedString(customContact.name, filter)); 73 | holder.setDescriptionText((TextUtils.isEmpty(customContact.phone)) ? 74 | context.getString(R.string.no_phone) : customContact.phone); 75 | holder.getParent().setTag(position); 76 | holder.getParent().setOnClickListener(this); 77 | picasso.load(PicassoUtils.SCHEME_CONTACT+":/"+customContact.uri) 78 | .placeholder(R.drawable.file_contact) 79 | .error(R.drawable.file_contact) 80 | .into(holder.getImageView()); 81 | } 82 | 83 | @Override 84 | public void onViewAttachedToWindow(final RecyclerView.ViewHolder viewHolder) { 85 | 86 | super.onViewAttachedToWindow(viewHolder); 87 | final RecyclerItemViewHolder holder = (RecyclerItemViewHolder) viewHolder; 88 | 89 | holder.getParent().setVisibility(View.INVISIBLE); 90 | if (holder.getAdapterPosition() > lastPosition) { 91 | holder.getParent().getHandler().postDelayed(new Runnable() { 92 | @Override 93 | public void run() { 94 | holder.getParent().setVisibility(View.VISIBLE); 95 | ObjectAnimator alpha = ObjectAnimator.ofFloat(holder.getParent(), "alpha", 0f, 1f); 96 | AnimatorSet animSet = new AnimatorSet(); 97 | animSet.play(alpha); 98 | animSet.setDuration(400); 99 | animSet.start(); 100 | 101 | } 102 | }, 100); 103 | 104 | lastPosition = holder.getAdapterPosition(); 105 | } else holder.getParent().setVisibility(View.VISIBLE); 106 | 107 | } 108 | 109 | private Spannable getSpannedString(String parent, String filter) { 110 | String sample = parent.toLowerCase(); 111 | filter = filter.toLowerCase(); 112 | List integers = new ArrayList<>(); 113 | Spannable spannable = new SpannableString(parent); 114 | int filterLength = filter.length(); 115 | int index = sample.indexOf(filter); 116 | while (index >= 0) { 117 | integers.add(index); 118 | index = sample.indexOf(filter, index+1); 119 | } 120 | for (int i : integers) { 121 | spannable.setSpan(new ForegroundColorSpan(context.getResources() 122 | .getColor(R.color.colorPrimary)), i, i+filterLength, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); 123 | } 124 | return spannable; 125 | } 126 | 127 | @Override 128 | public void onClick(View view) { 129 | Intent intent = new Intent(Intent.ACTION_VIEW); 130 | intent.setData(Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_URI, 131 | list.get((Integer) view.getTag()).idString)); 132 | context.startActivity(intent); 133 | } 134 | 135 | public void add(CustomContact customContact) { 136 | list.add(customContact); 137 | notifyItemInserted(getItemCount()); 138 | } 139 | 140 | private class ContactLoaderTask extends AsyncTask { 141 | @Override 142 | protected Void doInBackground(Void... params) { 143 | filterContacts(); 144 | return null; 145 | } 146 | } 147 | 148 | private void filterContacts() { 149 | 150 | list = new ArrayList<>(); 151 | 152 | ContentResolver contentResolver = context.getContentResolver(); 153 | String selection = ContactsContract.Contacts.DISPLAY_NAME + " LIKE ?"; 154 | String[] selectionArgs = new String[]{"%"+filter+"%"}; 155 | 156 | Cursor cursor = contentResolver.query( 157 | ContactsContract.Contacts.CONTENT_URI, 158 | null, 159 | selection, 160 | selectionArgs, 161 | null); 162 | 163 | if (cursor.getCount() == 0) { 164 | if (searchFragment!=null && context!=null) { 165 | context.runOnUiThread(new Runnable() { 166 | @Override 167 | public void run() { 168 | searchFragment.showNothingFoundLayout(); 169 | } 170 | }); 171 | } 172 | return; 173 | } 174 | 175 | if (cursor.getCount() > 0) { 176 | while (cursor.moveToNext()) { 177 | final CustomContact customContact = new CustomContact(); 178 | customContact.idString = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID)); 179 | customContact.name = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME)); 180 | customContact.uri = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.PHOTO_URI)); 181 | if (Integer.parseInt(cursor.getString( 182 | cursor.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0) { 183 | Cursor phones = contentResolver.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, 184 | null, ContactsContract.CommonDataKinds.Phone.CONTACT_ID + " = ?", 185 | new String[] {customContact.idString}, null); 186 | phones.moveToNext(); 187 | customContact.phone = phones.getString(phones.getColumnIndex( 188 | ContactsContract.CommonDataKinds.Phone.NUMBER)); 189 | phones.close(); 190 | } 191 | if (context != null) { 192 | context.runOnUiThread(new Runnable() { 193 | @Override 194 | public void run() { 195 | add(customContact); 196 | } 197 | }); 198 | } 199 | } 200 | } 201 | 202 | cursor.close(); 203 | 204 | } 205 | 206 | } 207 | -------------------------------------------------------------------------------- /app/app.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/fragments/SearchFragment.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.fragments; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.os.Handler; 6 | import android.support.v4.app.Fragment; 7 | import android.support.v7.app.AppCompatActivity; 8 | import android.support.v7.view.ActionMode; 9 | import android.support.v7.widget.CardView; 10 | import android.support.v7.widget.LinearLayoutManager; 11 | import android.support.v7.widget.RecyclerView; 12 | import android.text.TextUtils; 13 | import android.view.LayoutInflater; 14 | import android.view.Menu; 15 | import android.view.MenuItem; 16 | import android.view.View; 17 | import android.view.ViewGroup; 18 | import android.widget.LinearLayout; 19 | 20 | import com.mohamadamin.fastsearch.free.R; 21 | import com.mohamadamin.fastsearch.free.adapters.ApplicationAdapter; 22 | import com.mohamadamin.fastsearch.free.adapters.BaseActionModeAdapter; 23 | import com.mohamadamin.fastsearch.free.adapters.ContactAdapter; 24 | import com.mohamadamin.fastsearch.free.adapters.FileAdapter; 25 | import com.mohamadamin.fastsearch.free.adapters.ImageAdapter; 26 | import com.mohamadamin.fastsearch.free.adapters.MusicAdapter; 27 | import com.mohamadamin.fastsearch.free.adapters.VideoAdapter; 28 | import com.mohamadamin.fastsearch.free.databases.ApplicationsDB; 29 | import com.mohamadamin.fastsearch.free.utils.Interfaces; 30 | 31 | import jp.wasabeef.recyclerview.animators.LandingAnimator; 32 | import xyz.danoz.recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller; 33 | 34 | public class SearchFragment extends Fragment implements Interfaces.OnFilePressedListener { 35 | 36 | public static final String POSITION="position", FILTER="filter"; 37 | public final int APPLICATIONS = 0, CONTACTS = 1, FILES = 2, MUSICS = 3, PHOTOS = 4, VIDEOS = 5; 38 | int position; 39 | String filter; 40 | 41 | View mainLayout; 42 | CardView cardView; 43 | LinearLayout searchFirstLayout, nothingFoundLayout; 44 | 45 | ActionMode actionMode; 46 | 47 | RecyclerView searchResultList; 48 | RecyclerView.Adapter baseAdapter; 49 | VerticalRecyclerViewFastScroller fastScroller; 50 | 51 | ApplicationsDB applicationsDB; 52 | 53 | public static SearchFragment newInstance(int position, String filter) { 54 | SearchFragment searchFragment = new SearchFragment(); 55 | Bundle bundle = new Bundle(); 56 | bundle.putInt(POSITION, position); 57 | bundle.putString(FILTER, filter); 58 | searchFragment.setArguments(bundle); 59 | return searchFragment; 60 | } 61 | 62 | @Override 63 | public void onCreate(Bundle savedInstanceState) { 64 | super.onCreate(savedInstanceState); 65 | position = getArguments().getInt(POSITION); 66 | filter = getArguments().getString(FILTER); 67 | applicationsDB = new ApplicationsDB(getActivity()); 68 | } 69 | 70 | @Override 71 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 72 | mainLayout = inflater.inflate(R.layout.fragment_search, container, false); 73 | if (isAdded()) showContent(); 74 | return mainLayout; 75 | } 76 | 77 | private void showContent() { 78 | initializeViews(); 79 | organizeViews(); 80 | } 81 | 82 | private void initializeViews() { 83 | 84 | cardView = (CardView) mainLayout.findViewById(R.id.search_card); 85 | nothingFoundLayout = (LinearLayout) mainLayout.findViewById(R.id.search_nothing_found); 86 | searchFirstLayout = (LinearLayout) mainLayout.findViewById(R.id.search_search_first); 87 | 88 | searchResultList = (RecyclerView) mainLayout.findViewById(R.id.search_list); 89 | searchResultList.setLayoutManager(new LinearLayoutManager(getActivity())); 90 | searchResultList.setItemAnimator(new LandingAnimator()); 91 | searchResultList.getItemAnimator().setAddDuration(300); 92 | searchResultList.getItemAnimator().setRemoveDuration(300); 93 | 94 | fastScroller = (VerticalRecyclerViewFastScroller) mainLayout.findViewById(R.id.search_fast_scroller); 95 | fastScroller.setRecyclerView(searchResultList); 96 | searchResultList.addOnScrollListener(fastScroller.getOnScrollListener()); 97 | 98 | } 99 | 100 | private void organizeViews() { 101 | 102 | if (TextUtils.isEmpty(filter)) { 103 | cardView.setVisibility(View.GONE); 104 | nothingFoundLayout.setVisibility(View.GONE); 105 | searchFirstLayout.setVisibility(View.VISIBLE); 106 | } else { 107 | 108 | searchFirstLayout.setVisibility(View.GONE); 109 | 110 | switch (position) { 111 | case APPLICATIONS : searchApplications(); break; 112 | case CONTACTS : searchContacts(); break; 113 | case FILES : searchFiles(); break; 114 | case MUSICS : searchMusics(); break; 115 | case PHOTOS : searchPhotos(); break; 116 | case VIDEOS : searchVideos(); break; 117 | default: break; 118 | } 119 | 120 | closeDatabases(); 121 | 122 | if (baseAdapter != null) { 123 | cardView.setVisibility(View.VISIBLE); 124 | nothingFoundLayout.setVisibility(View.GONE); 125 | searchResultList.setAdapter(baseAdapter); 126 | } else showNothingFoundLayout(); 127 | 128 | } 129 | 130 | } 131 | 132 | public void showNothingFoundLayout() { 133 | cardView.setVisibility(View.GONE); 134 | nothingFoundLayout.setVisibility(View.VISIBLE); 135 | } 136 | 137 | private void closeDatabases() { 138 | applicationsDB.close(); 139 | } 140 | 141 | private void searchFiles() { 142 | Activity context = getActivity(); 143 | if (context == null) return; 144 | baseAdapter = new FileAdapter(this, context, mainLayout, filter, this); 145 | } 146 | 147 | private void searchApplications() { 148 | Activity context = getActivity(); 149 | if (context == null) return; 150 | baseAdapter = new ApplicationAdapter(this, context, filter); 151 | } 152 | 153 | private void searchContacts() { 154 | Activity context = getActivity(); 155 | if (context == null) return; 156 | baseAdapter = new ContactAdapter(this, context, filter); 157 | } 158 | 159 | private void searchMusics() { 160 | Activity context = getActivity(); 161 | if (context == null) return; 162 | baseAdapter = new MusicAdapter(this, context, mainLayout, filter, this); 163 | } 164 | 165 | private void searchPhotos() { 166 | Activity context = getActivity(); 167 | if (context == null) return; 168 | baseAdapter = new ImageAdapter(this, context, mainLayout, filter, this); 169 | } 170 | 171 | private void searchVideos() { 172 | Activity context = getActivity(); 173 | if (context == null) return; 174 | baseAdapter = new VideoAdapter(this, context, mainLayout, filter, this); 175 | } 176 | 177 | @Override 178 | public void onFilePressed(final String fileName, final int position) { 179 | final BaseActionModeAdapter adapter = (BaseActionModeAdapter) baseAdapter; 180 | if (actionMode != null) actionMode.finish(); 181 | actionMode = ((AppCompatActivity)getActivity()).startSupportActionMode(new ActionMode.Callback() { 182 | 183 | @Override 184 | public boolean onCreateActionMode(ActionMode mode, Menu menu) { 185 | mode.getMenuInflater().inflate(R.menu.file_action_mode, menu); 186 | return true; 187 | } 188 | 189 | @Override 190 | public boolean onPrepareActionMode(final ActionMode mode, Menu menu) { 191 | new Handler().postDelayed(new Runnable() { 192 | @Override 193 | public void run() { 194 | mode.setTitle(fileName); 195 | } 196 | }, 150); 197 | adapter.selectItem(position); 198 | return false; 199 | } 200 | 201 | @Override 202 | public boolean onActionItemClicked(ActionMode mode, MenuItem item) { 203 | switch (item.getItemId()) { 204 | case R.id.action_mode_rename: { 205 | adapter.clearSelections(); 206 | adapter.renameFile(position); 207 | mode.finish(); 208 | return true; 209 | } 210 | case R.id.action_mode_delete: { 211 | adapter.clearSelections(); 212 | adapter.removeFile(position); 213 | mode.finish(); 214 | return true; 215 | } 216 | default: 217 | return false; 218 | } 219 | } 220 | 221 | @Override 222 | public void onDestroyActionMode(ActionMode mode) { 223 | adapter.clearSelections(); 224 | } 225 | 226 | }); 227 | 228 | } 229 | 230 | } 231 | -------------------------------------------------------------------------------- /app/src/main/java/com/mohamadamin/fastsearch/free/utils/PicassoUtils.java: -------------------------------------------------------------------------------- 1 | package com.mohamadamin.fastsearch.free.utils; 2 | 3 | import android.content.Context; 4 | import android.content.pm.ApplicationInfo; 5 | import android.content.pm.PackageInfo; 6 | import android.content.pm.PackageManager; 7 | import android.graphics.Bitmap; 8 | import android.graphics.BitmapFactory; 9 | import android.media.MediaMetadataRetriever; 10 | import android.media.ThumbnailUtils; 11 | import android.net.Uri; 12 | import android.provider.MediaStore; 13 | 14 | import com.mohamadamin.fastsearch.free.R; 15 | import com.squareup.picasso.Picasso; 16 | import com.squareup.picasso.Request; 17 | import com.squareup.picasso.RequestHandler; 18 | 19 | import java.io.IOException; 20 | import java.util.HashMap; 21 | 22 | public class PicassoUtils { 23 | 24 | public static final String SCHEME_VIDEO = "picassoVideo", 25 | SCHEME_CONTACT = "picassoContact", 26 | SCHEME_APK = "picassoApk", 27 | SCHEME_AUDIO = "picassoAudio", 28 | SCHEME_FILE = "picassoFile", 29 | SCHEME_APPLICATION = "picassoApplication"; 30 | 31 | public static class VideoRequestHandler extends RequestHandler { 32 | 33 | Context context; 34 | 35 | public VideoRequestHandler(Context context) { 36 | super(); 37 | this.context = context; 38 | } 39 | 40 | @Override 41 | public boolean canHandleRequest(Request data) { 42 | String scheme = data.uri.getScheme(); 43 | return (SCHEME_VIDEO.equals(scheme)); 44 | } 45 | 46 | @Override 47 | public Result load(Request data, int arg1) throws IOException { 48 | Bitmap bitmap = ThumbnailUtils.createVideoThumbnail(data.uri.getPath(), MediaStore.Images.Thumbnails.MICRO_KIND); 49 | if (bitmap == null) bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.file_video); 50 | return new Result(BitmapUtils.getResizedBitmapChecked(bitmap, context), Picasso.LoadedFrom.DISK); 51 | } 52 | 53 | } 54 | 55 | public static class ContactRequestHandler extends RequestHandler { 56 | 57 | Context context; 58 | 59 | public ContactRequestHandler(Context context) { 60 | super(); 61 | this.context = context; 62 | } 63 | 64 | @Override 65 | public boolean canHandleRequest(Request data) { 66 | String scheme = data.uri.getScheme(); 67 | return (SCHEME_CONTACT.equals(scheme)); 68 | } 69 | 70 | @Override 71 | public Result load(Request data, int arg1) throws IOException { 72 | Bitmap bitmap = MediaStore.Images.Media.getBitmap( 73 | context.getContentResolver(), Uri.parse(data.uri.getPath().substring(1))); 74 | if (bitmap == null) bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.file_contact); 75 | return new Result(BitmapUtils.getResizedBitmapChecked(bitmap, context), Picasso.LoadedFrom.DISK); 76 | } 77 | 78 | } 79 | 80 | public static class ApkRequestHandler extends RequestHandler { 81 | 82 | Context context; 83 | 84 | public ApkRequestHandler(Context context) { 85 | super(); 86 | this.context = context; 87 | } 88 | 89 | @Override 90 | public boolean canHandleRequest(Request data) { 91 | String scheme = data.uri.getScheme(); 92 | return (SCHEME_APK.equals(scheme)); 93 | } 94 | 95 | @Override 96 | public Result load(Request data, int arg1) throws IOException { 97 | Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.file_android); 98 | PackageInfo packageInfo = context.getPackageManager(). 99 | getPackageArchiveInfo(data.uri.getPath(), PackageManager.GET_ACTIVITIES); 100 | if(packageInfo != null) { 101 | ApplicationInfo applicationInfo = packageInfo.applicationInfo; 102 | applicationInfo.sourceDir = data.uri.getPath(); 103 | applicationInfo.publicSourceDir = data.uri.getPath(); 104 | bitmap = BitmapUtils.getBitmapFromDrawable( 105 | applicationInfo.loadIcon(context.getPackageManager())); 106 | } 107 | return new Result(BitmapUtils.getResizedBitmapChecked(bitmap, context), Picasso.LoadedFrom.DISK); 108 | } 109 | 110 | } 111 | 112 | public static class AudioRequestHandler extends RequestHandler { 113 | 114 | Context context; 115 | 116 | public AudioRequestHandler(Context context) { 117 | super(); 118 | this.context = context; 119 | } 120 | 121 | @Override 122 | public boolean canHandleRequest(Request data) { 123 | String scheme = data.uri.getScheme(); 124 | return (SCHEME_AUDIO.equals(scheme)); 125 | } 126 | 127 | @Override 128 | public Result load(Request data, int arg1) throws IOException { 129 | Bitmap bitmap; 130 | MediaMetadataRetriever retriever = new MediaMetadataRetriever(); 131 | retriever.setDataSource(data.uri.getPath()); 132 | byte[] bytes = retriever.getEmbeddedPicture(); 133 | if (bytes != null) bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length); 134 | else bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.file_music); 135 | return new Result(BitmapUtils.getResizedBitmapChecked(bitmap, context), Picasso.LoadedFrom.DISK); 136 | } 137 | 138 | } 139 | 140 | public static class FileRequestHandler extends RequestHandler { 141 | 142 | Context context; 143 | HashMap resourcePictures; 144 | 145 | public FileRequestHandler(Context context) { 146 | this.context = context; 147 | this.resourcePictures = getFilePictures(); 148 | } 149 | 150 | @Override 151 | public boolean canHandleRequest(Request data) { 152 | String scheme = data.uri.getScheme(); 153 | return (SCHEME_FILE.equals(scheme)); 154 | } 155 | 156 | @Override 157 | public Result load(Request data, int arg1) throws IOException { 158 | Bitmap bitmap; 159 | String extension = data.uri.getPath(); 160 | if (resourcePictures.containsKey(extension)) { 161 | bitmap = BitmapFactory.decodeResource(context.getResources(), resourcePictures.get(extension)); 162 | } else bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.file_unknown); 163 | return new Result(BitmapUtils.getResizedBitmapChecked(bitmap, context), Picasso.LoadedFrom.DISK); 164 | } 165 | 166 | } 167 | 168 | public static class ApplicationRequestHandler extends RequestHandler { 169 | 170 | Context context; 171 | 172 | public ApplicationRequestHandler(Context context) { 173 | this.context = context; 174 | } 175 | 176 | @Override 177 | public boolean canHandleRequest(Request data) { 178 | String scheme = data.uri.getScheme(); 179 | return (SCHEME_APPLICATION.equals(scheme)); 180 | } 181 | 182 | @Override 183 | public Result load(Request data, int arg1) throws IOException { 184 | Bitmap bitmap; 185 | try { 186 | PackageManager packageManager = context.getPackageManager(); 187 | ApplicationInfo applicationInfo = packageManager.getApplicationInfo(data.uri.getPath().substring(1), 0); 188 | bitmap = BitmapUtils.getBitmapFromDrawable( 189 | applicationInfo.loadIcon(packageManager)); 190 | } catch (PackageManager.NameNotFoundException exception) { 191 | bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.file_android); 192 | } 193 | return new Result(BitmapUtils.getResizedBitmapChecked(bitmap, context), Picasso.LoadedFrom.DISK); 194 | } 195 | 196 | } 197 | 198 | 199 | private static HashMap getFilePictures() { 200 | 201 | HashMap resourcePictures = new HashMap<>(); 202 | 203 | resourcePictures.put("zip", R.drawable.file_zip); 204 | resourcePictures.put("rar", R.drawable.file_zip); 205 | resourcePictures.put("7zip", R.drawable.file_zip); 206 | resourcePictures.put("tar", R.drawable.file_zip); 207 | resourcePictures.put("7z", R.drawable.file_zip); 208 | resourcePictures.put("gz", R.drawable.file_zip); 209 | resourcePictures.put("gzip", R.drawable.file_zip); 210 | 211 | resourcePictures.put("pdf", R.drawable.file_adobe); 212 | resourcePictures.put("epub", R.drawable.file_adobe); 213 | resourcePictures.put("rzb", R.drawable.file_adobe); 214 | resourcePictures.put("azw", R.drawable.file_adobe); 215 | resourcePictures.put("mobi", R.drawable.file_adobe); 216 | resourcePictures.put("book", R.drawable.file_adobe); 217 | resourcePictures.put("indd", R.drawable.file_adobe); 218 | 219 | resourcePictures.put("mp3", R.drawable.file_music); 220 | resourcePictures.put("wav", R.drawable.file_music); 221 | resourcePictures.put("ogg", R.drawable.file_music); 222 | resourcePictures.put("m4a", R.drawable.file_music); 223 | resourcePictures.put("aif", R.drawable.file_music); 224 | 225 | resourcePictures.put("mp4", R.drawable.file_video); 226 | resourcePictures.put("wma", R.drawable.file_video); 227 | resourcePictures.put("avi", R.drawable.file_video); 228 | resourcePictures.put("mpg", R.drawable.file_video); 229 | resourcePictures.put("wma", R.drawable.file_video); 230 | resourcePictures.put("mov", R.drawable.file_video); 231 | resourcePictures.put("flv", R.drawable.file_video); 232 | resourcePictures.put("3gp", R.drawable.file_video); 233 | resourcePictures.put("swf", R.drawable.file_video); 234 | resourcePictures.put("divx", R.drawable.file_video); 235 | 236 | resourcePictures.put("doc", R.drawable.file_office); 237 | resourcePictures.put("msg", R.drawable.file_office); 238 | resourcePictures.put("docx", R.drawable.file_office); 239 | resourcePictures.put("ppt", R.drawable.file_office); 240 | resourcePictures.put("xls", R.drawable.file_office); 241 | resourcePictures.put("xlr", R.drawable.file_office); 242 | resourcePictures.put("xlsx", R.drawable.file_office); 243 | resourcePictures.put("ppt", R.drawable.file_office); 244 | resourcePictures.put("pps", R.drawable.file_office); 245 | resourcePictures.put("pub", R.drawable.file_office); 246 | resourcePictures.put("mdb", R.drawable.file_office); 247 | 248 | resourcePictures.put("psd", R.drawable.file_photoshop); 249 | resourcePictures.put("ai", R.drawable.file_photoshop); 250 | 251 | resourcePictures.put("txt", R.drawable.file_text); 252 | resourcePictures.put("log", R.drawable.file_text); 253 | resourcePictures.put("jar", R.drawable.file_text); 254 | resourcePictures.put("java", R.drawable.file_text); 255 | resourcePictures.put("class", R.drawable.file_text); 256 | resourcePictures.put("xml", R.drawable.file_text); 257 | 258 | resourcePictures.put("html", R.drawable.file_web); 259 | resourcePictures.put("css", R.drawable.file_web); 260 | resourcePictures.put("csr", R.drawable.file_web); 261 | resourcePictures.put("cfm", R.drawable.file_web); 262 | resourcePictures.put("js", R.drawable.file_web); 263 | resourcePictures.put("jsp", R.drawable.file_web); 264 | resourcePictures.put("rss", R.drawable.file_web); 265 | resourcePictures.put("xhtml", R.drawable.file_web); 266 | resourcePictures.put("php", R.drawable.file_web); 267 | resourcePictures.put("htm", R.drawable.file_web); 268 | resourcePictures.put("asp", R.drawable.file_web); 269 | resourcePictures.put("aspx", R.drawable.file_web); 270 | 271 | resourcePictures.put("jpg", R.drawable.file_image); 272 | resourcePictures.put("JPG", R.drawable.file_image); 273 | resourcePictures.put("bmp", R.drawable.file_image); 274 | resourcePictures.put("png", R.drawable.file_image); 275 | resourcePictures.put("gif", R.drawable.file_image); 276 | resourcePictures.put("jpeg", R.drawable.file_image); 277 | resourcePictures.put("dng", R.drawable.file_image); 278 | 279 | resourcePictures.put("fla", R.drawable.file_flash); 280 | 281 | return resourcePictures; 282 | 283 | } 284 | 285 | } 286 | --------------------------------------------------------------------------------