Theme icons in gallery bottom sheet

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
Álvaro Brey 2022-10-03 12:51:23 +02:00
parent 538102b3e7
commit 62f7877fc7
No known key found for this signature in database
GPG key ID: 2585783189A62105
3 changed files with 23 additions and 2 deletions

View file

@ -105,6 +105,7 @@ import com.owncloud.android.ui.fragment.FileDetailFragment;
import com.owncloud.android.ui.fragment.FileDetailSharingFragment;
import com.owncloud.android.ui.fragment.FileDetailsSharingProcessFragment;
import com.owncloud.android.ui.fragment.GalleryFragment;
import com.owncloud.android.ui.fragment.GalleryFragmentBottomSheetDialog;
import com.owncloud.android.ui.fragment.LocalFileListFragment;
import com.owncloud.android.ui.fragment.OCFileListBottomSheetDialog;
import com.owncloud.android.ui.fragment.OCFileListBottomSheetDialogFragment;
@ -446,4 +447,7 @@ abstract class ComponentsModule {
@ContributesAndroidInjector
abstract DashboardWidgetProvider dashboardWidgetProvider();
@ContributesAndroidInjector
abstract GalleryFragmentBottomSheetDialog galleryFragmentBottomSheetDialog();
}

View file

@ -26,11 +26,17 @@ import android.view.View
import android.view.ViewGroup
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import com.nextcloud.client.di.Injectable
import com.owncloud.android.databinding.FragmentGalleryBottomSheetBinding
import com.owncloud.android.utils.theme.newm3.ViewThemeUtils
import javax.inject.Inject
class GalleryFragmentBottomSheetDialog(
private val actions: GalleryFragmentBottomSheetActions
) : BottomSheetDialogFragment() {
) : BottomSheetDialogFragment(), Injectable {
@Inject
lateinit var viewThemeUtils: ViewThemeUtils
private lateinit var binding: FragmentGalleryBottomSheetBinding
private lateinit var mBottomBehavior: BottomSheetBehavior<*>
private var currentMediaState: MediaState = MediaState.MEDIA_STATE_DEFAULT
@ -52,7 +58,17 @@ class GalleryFragmentBottomSheetDialog(
mBottomBehavior.state = BottomSheetBehavior.STATE_EXPANDED
}
private fun setupLayout() {
fun setupLayout() {
listOf(
binding.tickMarkShowImages,
binding.tickMarkShowVideo,
binding.hideImagesImageview,
binding.hideVideoImageView,
binding.selectMediaFolderImageView
).forEach {
viewThemeUtils.platform.colorImageView(it)
}
when (currentMediaState) {
MediaState.MEDIA_STATE_PHOTOS_ONLY -> {
binding.tickMarkShowImages.visibility = View.VISIBLE

View file

@ -127,6 +127,7 @@
android:paddingBottom="@dimen/standard_half_padding">
<ImageView
android:id="@+id/selectMediaFolderImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@null"