mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 21:25:35 +03:00
Theme icons in gallery bottom sheet
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
parent
538102b3e7
commit
62f7877fc7
3 changed files with 23 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue