diff --git a/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/AbstractMediaInfoListFragment.kt b/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/AbstractMediaInfoListFragment.kt index c23335e1..e64faba2 100644 --- a/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/AbstractMediaInfoListFragment.kt +++ b/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/AbstractMediaInfoListFragment.kt @@ -20,6 +20,10 @@ package com.amaze.fileutilities.home_page.ui.files +import android.view.View +import android.view.animation.Animation +import android.view.animation.AnimationUtils +import androidx.navigation.fragment.NavHostFragment import androidx.recyclerview.widget.DefaultItemAnimator import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.LinearLayoutManager @@ -37,6 +41,8 @@ import com.amaze.fileutilities.utilis.getAppCommonSharedPreferences import com.bumptech.glide.Glide import com.bumptech.glide.integration.recyclerview.RecyclerViewPreloader import com.bumptech.glide.util.ViewPreloadSizeProvider +import org.slf4j.Logger +import org.slf4j.LoggerFactory abstract class AbstractMediaInfoListFragment : ItemsActionBarFragment(), @@ -46,6 +52,7 @@ abstract class AbstractMediaInfoListFragment : private var linearLayoutManager: LinearLayoutManager? = null private var gridLayoutManager: GridLayoutManager? = null private val MAX_PRELOAD = 100 + private var log: Logger = LoggerFactory.getLogger(AbstractMediaInfoListFragment::class.java) override fun onDestroyView() { getMediaAdapterPreloader().clear() @@ -227,6 +234,25 @@ abstract class AbstractMediaInfoListFragment : }, { getRecyclerView().clearOnScrollListeners() setupAdapter() + }, { + when (getMediaListType()) { + MediaFileAdapter.MEDIA_TYPE_IMAGES -> { + getFilesViewModelObj().usedImagesSummaryTransformations = null + } + MediaFileAdapter.MEDIA_TYPE_DOCS -> { + getFilesViewModelObj().usedDocsSummaryTransformations = null + } + MediaFileAdapter.MEDIA_TYPE_AUDIO -> { + getFilesViewModelObj().usedAudiosSummaryTransformations = null + } + MediaFileAdapter.MEDIA_TYPE_VIDEO -> { + getFilesViewModelObj().usedVideosSummaryTransformations = null + } + else -> { + log.warn("unsupported operation to reset data on banner action") + } + } + reloadFragment() } ) getRecyclerView().addOnScrollListener(recyclerViewPreloader) @@ -246,7 +272,17 @@ abstract class AbstractMediaInfoListFragment : val animator = DefaultItemAnimator() getRecyclerView().itemAnimator = animator getRecyclerView().adapter = mediaFileAdapter + + val slideUpAnimation: Animation = + AnimationUtils.loadAnimation(requireContext(), R.anim.slide_up_fade_in) + getRecyclerView().startAnimation(slideUpAnimation) + getRecyclerView().visibility = View.VISIBLE } } } + private fun reloadFragment() { + val navController = NavHostFragment.findNavController(this) + navController.popBackStack() + navController.navigate(R.id.navigation_files) + } } diff --git a/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/FilesViewModel.kt b/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/FilesViewModel.kt index df694c43..66d400c5 100644 --- a/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/FilesViewModel.kt +++ b/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/FilesViewModel.kt @@ -39,8 +39,8 @@ import androidx.core.graphics.drawable.toBitmap import androidx.lifecycle.AndroidViewModel import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData -import androidx.lifecycle.Transformations import androidx.lifecycle.liveData +import androidx.lifecycle.switchMap import androidx.lifecycle.viewModelScope import com.abedelazizshe.lightcompressorlibrary.CompressionListener import com.abedelazizshe.lightcompressorlibrary.VideoCompressor @@ -158,15 +158,15 @@ class FilesViewModel(val applicationContext: Application) : private var trashBinConfig: TrashBinConfig? = null private val TRASH_BIN_BASE_PATH = Environment.getExternalStorageDirectory() .path + File.separator + ".AmazeData" - private var usedVideosSummaryTransformations: LiveData>?>? = null - private var usedAudiosSummaryTransformations: LiveData>?>? = null var usedPlaylistsSummaryTransformations: LiveData>?>? = null - private var usedImagesSummaryTransformations: LiveData>?>? = null - private var usedDocsSummaryTransformations: LiveData>?>? = null private var allApps: AtomicReference>?> { if (usedImagesSummaryTransformations == null) { - usedImagesSummaryTransformations = Transformations.switchMap(internalStorageStats()) { + usedImagesSummaryTransformations = internalStorageStats().switchMap { input -> getImagesSummaryLiveData(input) } @@ -316,7 +316,7 @@ class FilesViewModel(val applicationContext: Application) : fun usedAudiosSummaryTransformations(): LiveData>?> { if (usedAudiosSummaryTransformations == null) { - usedAudiosSummaryTransformations = Transformations.switchMap(internalStorageStats()) { + usedAudiosSummaryTransformations = internalStorageStats().switchMap { input -> getAudiosSummaryLiveData(input) } @@ -328,7 +328,7 @@ class FilesViewModel(val applicationContext: Application) : LiveData>?> { if (usedPlaylistsSummaryTransformations == null) { usedPlaylistsSummaryTransformations = - Transformations.switchMap(internalStorageStats()) { + internalStorageStats().switchMap { input -> getPlaylistsSummaryLiveData(input) } @@ -339,7 +339,7 @@ class FilesViewModel(val applicationContext: Application) : fun usedVideosSummaryTransformations(): LiveData>?> { if (usedVideosSummaryTransformations == null) { - usedVideosSummaryTransformations = Transformations.switchMap(internalStorageStats()) { + usedVideosSummaryTransformations = internalStorageStats().switchMap { input -> getVideosSummaryLiveData(input) } @@ -350,7 +350,7 @@ class FilesViewModel(val applicationContext: Application) : fun usedDocsSummaryTransformations(): LiveData>?> { if (usedDocsSummaryTransformations == null) { - usedDocsSummaryTransformations = Transformations.switchMap(internalStorageStats()) { + usedDocsSummaryTransformations = internalStorageStats().switchMap { input -> getDocumentsSummaryLiveData(input) } @@ -2688,6 +2688,15 @@ class FilesViewModel(val applicationContext: Application) : } val metaInfoAndSummaryPair = CursorUtils .listImages(applicationContext.applicationContext) + val sortingPref = MediaFileListSorter.SortingPreference.newInstance( + applicationContext + .getAppCommonSharedPreferences(), + MediaFileAdapter.MEDIA_TYPE_IMAGES + ) + MediaFileListSorter.generateMediaFileListHeadersAndSort( + applicationContext, + metaInfoAndSummaryPair.second, sortingPref + ) setMediaInfoSummary(metaInfoAndSummaryPair.first, storageSummary) emit(metaInfoAndSummaryPair) } @@ -2727,6 +2736,15 @@ class FilesViewModel(val applicationContext: Application) : it.path } ) + val sortingPref = MediaFileListSorter.SortingPreference.newInstance( + applicationContext + .getAppCommonSharedPreferences(), + MediaFileAdapter.MEDIA_TYPE_AUDIO + ) + MediaFileListSorter.generateMediaFileListHeadersAndSort( + applicationContext, + metaInfoAndSummaryPair.second, sortingPref + ) setMediaInfoSummary(metaInfoAndSummaryPair.first, storageSummary) emit(metaInfoAndSummaryPair) metaInfoAndSummaryPair.second.forEach { @@ -2778,6 +2796,15 @@ class FilesViewModel(val applicationContext: Application) : } mediaStorageSummary?.let { setMediaInfoSummary(it, storageSummary) + val sortingPref = MediaFileListSorter.SortingPreference.newInstance( + applicationContext + .getAppCommonSharedPreferences(), + MediaFileAdapter.MEDIA_TYPE_AUDIO + ) + MediaFileListSorter.generateMediaFileListHeadersAndSort( + applicationContext, + playlistFiles, sortingPref + ) emit(Pair(it, playlistFiles)) playlistFiles.forEach { mediaFileInfo -> @@ -2803,6 +2830,15 @@ class FilesViewModel(val applicationContext: Application) : } val metaInfoAndSummaryPair = CursorUtils .listVideos(applicationContext.applicationContext) + val sortingPref = MediaFileListSorter.SortingPreference.newInstance( + applicationContext + .getAppCommonSharedPreferences(), + MediaFileAdapter.MEDIA_TYPE_VIDEO + ) + MediaFileListSorter.generateMediaFileListHeadersAndSort( + applicationContext, + metaInfoAndSummaryPair.second, sortingPref + ) setMediaInfoSummary(metaInfoAndSummaryPair.first, storageSummary) emit(metaInfoAndSummaryPair) } @@ -2839,6 +2875,15 @@ class FilesViewModel(val applicationContext: Application) : mediaFiles.add(mediaFileInfo) } val docsSummary = StorageSummary(size, 0, longSize) + val sortingPref = MediaFileListSorter.SortingPreference.newInstance( + applicationContext + .getAppCommonSharedPreferences(), + MediaFileAdapter.MEDIA_TYPE_DOCS + ) + MediaFileListSorter.generateMediaFileListHeadersAndSort( + applicationContext, + mediaFiles, sortingPref + ) emit(Pair(docsSummary, mediaFiles)) setMediaInfoSummary(docsSummary, storageSummary) } diff --git a/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/MediaFileAdapter.kt b/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/MediaFileAdapter.kt index 748f5dac..bc71f986 100644 --- a/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/MediaFileAdapter.kt +++ b/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/MediaFileAdapter.kt @@ -57,7 +57,8 @@ class MediaFileAdapter( ((item: MenuItem, actionItems: List) -> Unit)?, // callback called if we want to refresh data when user tries to switch groupping / sorting // eg. in case of audio player we would want to utilise different dataset for playlists - private val invalidateDataCallback: (() -> Unit)? + private val invalidateDataCallback: (() -> Unit)?, + private val reloadListCallback: () -> Unit ) : AbstractMediaFilesAdapter( context, preloader, isGrid, listItemPressedCallback, toggleCheckCallback @@ -83,10 +84,6 @@ class MediaFileAdapter( preloader.clear() onlyItemsCounts = 0 headerListItems.clear() - MediaFileListSorter.generateMediaFileListHeadersAndSort( - context, - mediaFileInfoList, sortingPreference - ) var lastHeader: String? = null value.add(ListItem(TYPE_BANNER)) preloader.addItem("") @@ -375,7 +372,9 @@ class MediaFileAdapter( holder.mediaTypeHeaderView.initOptionsItems( optionsMenuSelected, headerListItems, sortingPreference, mediaListType - ) + ) { + reloadListCallback() + } drawBannerCallback.invoke(holder.mediaTypeHeaderView) } diff --git a/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/MediaFileListSorter.kt b/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/MediaFileListSorter.kt index 6683f4ec..ff728c30 100644 --- a/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/MediaFileListSorter.kt +++ b/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/MediaFileListSorter.kt @@ -181,26 +181,28 @@ class MediaFileListSorter(private val sortingPreference: SortingPreference) : Collections.sort(mediaFileList, MediaFileListSorter(sortingPreference)) } - fun getGroupNameByType(groupType: Int, resources: Resources): String { - return when (groupType) { + fun getGroupNameByType(groupType: Int, isAsc: Boolean, resources: Resources): String { + val text = when (groupType) { GROUP_PARENT -> resources.getString(R.string.parent) GROUP_NAME -> resources.getString(R.string.name) GROUP_DATE -> resources.getString(R.string.date) GROUP_ALBUM -> resources.getString(R.string.album) GROUP_ARTIST -> resources.getString(R.string.artist) GROUP_PLAYLISTS -> resources.getString(R.string.playlists) - else -> "" + else -> return "" } + return text.plus(if (!isAsc) " ↑" else " ↓") } - fun getSortNameByType(sortBy: Int, resources: Resources): String { - return when (sortBy) { + fun getSortNameByType(sortBy: Int, isAsc: Boolean, resources: Resources): String { + val text = when (sortBy) { SORT_NAME -> resources.getString(R.string.name) SORT_SIZE -> resources.getString(R.string.size) SORT_MODIF -> resources.getString(R.string.date) SORT_LENGTH -> resources.getString(R.string.duration) - else -> "" + else -> return "" } + return text.plus(if (!isAsc) " ↑" else " ↓") } } diff --git a/app/src/main/java/com/amaze/fileutilities/home_page/ui/media_tile/MediaTypeHeaderView.kt b/app/src/main/java/com/amaze/fileutilities/home_page/ui/media_tile/MediaTypeHeaderView.kt index 619890da..97b96fc5 100644 --- a/app/src/main/java/com/amaze/fileutilities/home_page/ui/media_tile/MediaTypeHeaderView.kt +++ b/app/src/main/java/com/amaze/fileutilities/home_page/ui/media_tile/MediaTypeHeaderView.kt @@ -67,10 +67,10 @@ class MediaTypeHeaderView(context: Context, attrs: AttributeSet?) : FrameLayout( private val totalMediaFiles: TextView private val optionsParentLayout: LinearLayout private val optionsItemsScroll: HorizontalScrollView - private val optionsIndexImage: ImageView - private val optionsSwitchView: ImageView - private val optionsGroupView: ImageView - private val optionsSortView: ImageView + private val optionsIndexImage: LinearLayout + private val optionsSwitchView: LinearLayout + private val optionsGroupView: LinearLayout + private val optionsSortView: LinearLayout private val optionsListParent: LinearLayout private val optionsRecyclerViewParent: FrameLayout private val optionsRecyclerView: RecyclerView @@ -174,7 +174,8 @@ class MediaTypeHeaderView(context: Context, attrs: AttributeSet?) : FrameLayout( optionsMenuSelected: MediaFileAdapter.OptionsMenuSelected, headerListItems: MutableList, sortingPreference: MediaFileListSorter.SortingPreference, - mediaListType: Int + mediaListType: Int, + reloadListCallback: () -> Unit ) { val adapter = MediaTypeViewOptionsListAdapter( context, headerListItems, @@ -193,13 +194,15 @@ class MediaTypeHeaderView(context: Context, attrs: AttributeSet?) : FrameLayout( optionsGroupView.setOnClickListener { clickOptionsGroupView( optionsMenuSelected, sharedPreferences, sortingPreference, - mediaListType + mediaListType, + reloadListCallback ) } optionsSortView.setOnClickListener { clickOptionsSortView( optionsMenuSelected, sharedPreferences, sortingPreference, - mediaListType + mediaListType, + reloadListCallback ) } } @@ -227,17 +230,9 @@ class MediaTypeHeaderView(context: Context, attrs: AttributeSet?) : FrameLayout( PreferencesConstants.DEFAULT_MEDIA_LIST_TYPE ) ) { - optionsSwitchView.setImageDrawable( - resources - .getDrawable(R.drawable.ic_round_grid_on_32) - ) listViewButton = getSelectedTextButton(resources.getString(R.string.list_view)) gridViewButton = getUnSelectedTextButton(resources.getString(R.string.grid_view)) } else { - optionsSwitchView.setImageDrawable( - resources - .getDrawable(R.drawable.ic_round_grid_on_32) - ) listViewButton = getUnSelectedTextButton(resources.getString(R.string.list_view)) gridViewButton = getSelectedTextButton(resources.getString(R.string.grid_view)) } @@ -273,7 +268,8 @@ class MediaTypeHeaderView(context: Context, attrs: AttributeSet?) : FrameLayout( optionsMenuSelected: MediaFileAdapter.OptionsMenuSelected, sharedPreferences: SharedPreferences, sortingPreference: MediaFileListSorter.SortingPreference, - mediaListType: Int + mediaListType: Int, + reloadListCallback: () -> Unit ) { clearOptionItemsBackgrounds() optionsRecyclerViewParent.hideFade(300) @@ -292,13 +288,16 @@ class MediaTypeHeaderView(context: Context, attrs: AttributeSet?) : FrameLayout( getSelectedTextButton( MediaFileListSorter.getGroupNameByType( groupByType, + isAsc, resources ) ) } else { getUnSelectedTextButton( + // unselected buttons will always show ascending MediaFileListSorter.getGroupNameByType( groupByType, + true, resources ) ) @@ -324,6 +323,7 @@ class MediaTypeHeaderView(context: Context, attrs: AttributeSet?) : FrameLayout( ).commit() sortingPreference.isGroupByAsc = isAsc optionsMenuSelected.groupBy(sortingPreference) + reloadListCallback() } buttonsList.add(button) } @@ -336,7 +336,8 @@ class MediaTypeHeaderView(context: Context, attrs: AttributeSet?) : FrameLayout( optionsMenuSelected: MediaFileAdapter.OptionsMenuSelected, sharedPreferences: SharedPreferences, sortingPreference: MediaFileListSorter.SortingPreference, - mediaListType: Int + mediaListType: Int, + reloadListCallback: () -> Unit ) { clearOptionItemsBackgrounds() optionsRecyclerViewParent.hideFade(300) @@ -355,13 +356,16 @@ class MediaTypeHeaderView(context: Context, attrs: AttributeSet?) : FrameLayout( getSelectedTextButton( MediaFileListSorter.getSortNameByType( sortByType, + isAsc, resources ) ) } else { getUnSelectedTextButton( + // unselected buttons will always show ascending MediaFileListSorter.getSortNameByType( sortByType, + true, resources ) ) @@ -387,6 +391,7 @@ class MediaTypeHeaderView(context: Context, attrs: AttributeSet?) : FrameLayout( ).apply() sortingPreference.isSortByAsc = isAsc optionsMenuSelected.sortBy(sortingPreference) + reloadListCallback() } buttonsList.add(button) } diff --git a/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/ContextExt.kt b/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/ContextExt.kt index fc1115e9..9a1b3de0 100644 --- a/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/ContextExt.kt +++ b/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/ContextExt.kt @@ -18,22 +18,6 @@ * along with this program. If not, see . */ -/** - * Designed and developed by Aidan Follestad (@afollestad) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package com.amaze.fileutilities.utilis.dialog_picker import android.content.Context diff --git a/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/DialogFileChooserExt.kt b/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/DialogFileChooserExt.kt index 65c992a6..365f872a 100644 --- a/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/DialogFileChooserExt.kt +++ b/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/DialogFileChooserExt.kt @@ -18,22 +18,6 @@ * along with this program. If not, see . */ -/** - * Designed and developed by Aidan Follestad (@afollestad) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - @file:Suppress("unused") package com.amaze.fileutilities.utilis.dialog_picker diff --git a/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/DialogFolderChooserExt.kt b/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/DialogFolderChooserExt.kt index 086a826b..c61891a1 100644 --- a/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/DialogFolderChooserExt.kt +++ b/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/DialogFolderChooserExt.kt @@ -18,22 +18,6 @@ * along with this program. If not, see . */ -/** - * Designed and developed by Aidan Follestad (@afollestad) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - @file:Suppress("unused") package com.amaze.fileutilities.utilis.dialog_picker diff --git a/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/FileChooserAdapter.kt b/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/FileChooserAdapter.kt index 61786563..b19a0b5c 100644 --- a/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/FileChooserAdapter.kt +++ b/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/FileChooserAdapter.kt @@ -18,22 +18,6 @@ * along with this program. If not, see . */ -/** - * Designed and developed by Aidan Follestad (@afollestad) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package com.amaze.fileutilities.utilis.dialog_picker import android.view.LayoutInflater diff --git a/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/FilesUtilExt.kt b/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/FilesUtilExt.kt index ec6ea53e..45f584ae 100644 --- a/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/FilesUtilExt.kt +++ b/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/FilesUtilExt.kt @@ -18,22 +18,6 @@ * along with this program. If not, see . */ -/** - * Designed and developed by Aidan Follestad (@afollestad) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - @file:Suppress("SpellCheckingInspection") package com.amaze.fileutilities.utilis.dialog_picker diff --git a/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/ViewExt.kt b/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/ViewExt.kt index 56443fd1..97c5eeed 100644 --- a/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/ViewExt.kt +++ b/app/src/main/java/com/amaze/fileutilities/utilis/dialog_picker/ViewExt.kt @@ -18,22 +18,6 @@ * along with this program. If not, see . */ -/** - * Designed and developed by Aidan Follestad (@afollestad) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package com.amaze.fileutilities.utilis.dialog_picker import android.view.View diff --git a/app/src/main/res/anim/slide_up_fade_in.xml b/app/src/main/res/anim/slide_up_fade_in.xml new file mode 100644 index 00000000..3bdcdad7 --- /dev/null +++ b/app/src/main/res/anim/slide_up_fade_in.xml @@ -0,0 +1,14 @@ + + + + + diff --git a/app/src/main/res/layout/media_type_header_layout.xml b/app/src/main/res/layout/media_type_header_layout.xml index 9b07bb37..56c8085d 100644 --- a/app/src/main/res/layout/media_type_header_layout.xml +++ b/app/src/main/res/layout/media_type_header_layout.xml @@ -144,42 +144,96 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" - android:layout_gravity="bottom|center_horizontal" - android:gravity="center_horizontal" android:layout_marginTop="@dimen/material_generic_medium" android:layout_marginBottom="@dimen/material_generic" android:paddingLeft="@dimen/material_generic" android:paddingRight="@dimen/material_generic" android:weightSum="1" > - - + + + + - + + + + + - + + + + + + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" + android:layout_weight="0.25"> + + + Compress Images Compress Videos + + Index + + Layout + + Group By + + Sort By diff --git a/gradle.properties b/gradle.properties index 40378899..b54dc1e4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,7 +25,7 @@ kotlin.code.style=official org.gradle.parallel=true abiFilters=x86;x86_64;armeabi-v7a;arm64-v8a # for macs, omit for other operating systems -org.gradle.java.home=/Applications/Android Studio.app/Contents/jbr/Contents/Home +#org.gradle.java.home=/Applications/Android Studio.app/Contents/jbr/Contents/Home # https://github.com/usefulness/easylauncher-gradle-plugin/issues/408 android.disableResourceValidation=true \ No newline at end of file