Skip to content

Commit

Permalink
Bottom sheet item height fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
surinder-tsys committed May 19, 2023
1 parent 8da3976 commit c5a2bf7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ import android.view.ViewGroup
import android.widget.Toast
import androidx.annotation.IdRes
import androidx.core.os.bundleOf
import androidx.core.content.res.ResourcesCompat
import androidx.core.view.isVisible
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.setFragmentResult
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.ViewModelProvider
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import com.nextcloud.android.common.ui.theme.utils.ColorRole
import com.nextcloud.client.account.CurrentAccountProvider
import com.nextcloud.client.di.Injectable
import com.nextcloud.client.di.ViewModelFactory
Expand Down Expand Up @@ -152,7 +152,11 @@ class FileActionsBottomSheet : BottomSheetDialogFragment(), Injectable {

private fun setMultipleFilesThumbnail() {
context?.let {
val drawable = viewThemeUtils.platform.tintDrawable(it, R.drawable.file_multiple, ColorRole.PRIMARY)
//NMC Customization
val drawable = viewThemeUtils.platform.colorDrawable(
ResourcesCompat.getDrawable(it.resources, R.drawable.file_multiple, null)!!,
it.resources.getColor(R.color.primary, null)
)
binding.thumbnailLayout.thumbnail.setImageDrawable(drawable)
}
}
Expand Down Expand Up @@ -188,7 +192,6 @@ class FileActionsBottomSheet : BottomSheetDialogFragment(), Injectable {
if (state is FileActionsViewModel.UiState.Loading) {
binding.bottomSheetLoading.isVisible = true
binding.bottomSheetContent.isVisible = false
viewThemeUtils.platform.colorCircularProgressBar(binding.bottomSheetLoading, ColorRole.PRIMARY)
} else {
binding.bottomSheetLoading.isVisible = false
binding.bottomSheetContent.isVisible = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int positi
if (holder instanceof OCFileListFooterViewHolder) {
OCFileListFooterViewHolder footerViewHolder = (OCFileListFooterViewHolder) holder;
footerViewHolder.getFooterText().setText(getFooterText());
viewThemeUtils.platform.colorCircularProgressBar(footerViewHolder.getLoadingProgressBar());
footerViewHolder.getLoadingProgressBar().setVisibility(
ocFileListFragmentInterface.isLoading() ? View.VISIBLE : View.GONE);
} else if (holder instanceof OCFileListHeaderViewHolder) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,6 @@ class GalleryFragmentBottomSheetDialog(
}

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
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/dims.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<dimen name="nav_drawer_menu_avatar_radius">12sp</dimen>
<dimen name="list_item_avatar_icon_radius">20dp</dimen>
<dimen name="bottom_sheet_text_start_margin">16dp</dimen>
<dimen name="bottom_sheet_item_height">56dp</dimen>
<dimen name="bottom_sheet_item_height">48dp</dimen>
<dimen name="bottom_sheet_menu_item_divider_standard_margin">80dp</dimen>
<dimen name="bottom_sheet_min_height">112dp</dimen>
<dimen name="file_icon_size">40dp</dimen>
Expand Down

0 comments on commit c5a2bf7

Please sign in to comment.