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 25, 2023
1 parent 8da3976 commit 8191a31
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 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 @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/creator_container"
android:layout_width="match_parent"
android:layout_height="@dimen/bottom_sheet_item_height"
android:background="?android:attr/selectableItemBackground"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingTop="@dimen/standard_half_padding"
android:paddingBottom="@dimen/standard_half_padding"
android:paddingLeft="@dimen/standard_padding"
android:paddingRight="@dimen/standard_padding"
tools:ignore="UseCompoundDrawables">
Expand All @@ -36,8 +39,7 @@
android:id="@+id/creator_thumbnail"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginTop="@dimen/standard_margin"
android:layout_marginBottom="@dimen/standard_margin"
app:tint="@color/bottom_sheet_icon_color"
android:contentDescription="@null"
android:src="@drawable/file_ppt" />

Expand All @@ -46,8 +48,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/bottom_sheet_text_start_margin"
android:layout_marginStart="@dimen/standard_margin"
android:text="@string/create_new_presentation"
android:textColor="@color/text_color"
android:textColor="@color/bottom_sheet_txt_color"
android:textSize="@dimen/bottom_sheet_text_size" />
</LinearLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/bottom_sheet_bg_color"
android:paddingTop="@dimen/standard_padding"
android:paddingBottom="@dimen/standard_padding"
android:orientation="vertical">
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 8191a31

Please sign in to comment.