Skip to content

Commit 3b41292

Browse files
committed
Bottom sheet item height fix.
1 parent 60f044b commit 3b41292

File tree

9 files changed

+59
-18
lines changed

9 files changed

+59
-18
lines changed

app/src/main/java/com/nextcloud/ui/fileactions/FileActionsBottomSheet.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import android.widget.Toast
3535
import androidx.annotation.IdRes
3636
import androidx.core.os.bundleOf
3737
import androidx.core.view.isEmpty
38+
import androidx.core.content.res.ResourcesCompat
3839
import androidx.core.view.isVisible
3940
import androidx.fragment.app.FragmentManager
4041
import androidx.fragment.app.setFragmentResult
@@ -43,7 +44,6 @@ import androidx.lifecycle.ViewModelProvider
4344
import com.google.android.material.bottomsheet.BottomSheetBehavior
4445
import com.google.android.material.bottomsheet.BottomSheetDialog
4546
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
46-
import com.nextcloud.android.common.ui.theme.utils.ColorRole
4747
import com.nextcloud.client.account.CurrentAccountProvider
4848
import com.nextcloud.client.di.Injectable
4949
import com.nextcloud.client.di.ViewModelFactory
@@ -159,7 +159,11 @@ class FileActionsBottomSheet : BottomSheetDialogFragment(), Injectable {
159159

160160
private fun setMultipleFilesThumbnail() {
161161
context?.let {
162-
val drawable = viewThemeUtils.platform.tintDrawable(it, R.drawable.file_multiple, ColorRole.PRIMARY)
162+
//NMC Customization
163+
val drawable = viewThemeUtils.platform.colorDrawable(
164+
ResourcesCompat.getDrawable(it.resources, R.drawable.file_multiple, null)!!,
165+
it.resources.getColor(R.color.primary, null)
166+
)
163167
binding.thumbnailLayout.thumbnail.setImageDrawable(drawable)
164168
}
165169
}
@@ -195,7 +199,6 @@ class FileActionsBottomSheet : BottomSheetDialogFragment(), Injectable {
195199
if (state is FileActionsViewModel.UiState.Loading) {
196200
binding.bottomSheetLoading.isVisible = true
197201
binding.bottomSheetContent.isVisible = false
198-
viewThemeUtils.platform.colorCircularProgressBar(binding.bottomSheetLoading, ColorRole.PRIMARY)
199202
} else {
200203
binding.bottomSheetLoading.isVisible = false
201204
binding.bottomSheetContent.isVisible = true

app/src/main/java/com/owncloud/android/ui/fragment/GalleryFragmentBottomSheetDialog.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,6 @@ class GalleryFragmentBottomSheetDialog(
5959
}
6060

6161
fun setupLayout() {
62-
listOf(
63-
binding.tickMarkShowImages,
64-
binding.tickMarkShowVideo,
65-
binding.hideImagesImageview,
66-
binding.hideVideoImageView,
67-
binding.selectMediaFolderImageView
68-
).forEach {
69-
viewThemeUtils.platform.colorImageView(it)
70-
}
71-
7262
when (currentMediaState) {
7363
MediaState.MEDIA_STATE_PHOTOS_ONLY -> {
7464
binding.tickMarkShowImages.visibility = View.VISIBLE
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24"
5+
android:viewportHeight="24">
6+
<path
7+
android:pathData="M4,21.75a3,3 0,0 1,-3 -3L1,2.25L7.5,2.25a3.65,3.65 0,0 1,2.7 1.2l0.45,0.45a1.43,1.43 0,0 0,0.85 0.35L23,4.25v14.5a3,3 0,0 1,-3 3ZM2.5,18.75a1.46,1.46 0,0 0,1.43 1.5L20,20.25a1.47,1.47 0,0 0,1.5 -1.44L21.5,5.75h-10A2.57,2.57 0,0 1,9.6 4.9l-0.45,-0.45a2.38,2.38 0,0 0,-1.65 -0.7h-5Z"
8+
android:fillColor="#262626"/>
9+
<path
10+
android:pathData="M14.14,16.56L9.86,16.56a1.07,1.07 0,0 1,-1.07 -1.08L8.79,12.09h0.89v-0.71a2.32,2.32 0,0 1,4.64 0v0.71h0.89v3.39A1.07,1.07 0,0 1,14.14 16.56ZM12,13.56a0.54,0.54 0,0 0,-0.54 0.53,0.55 0.55,0 0,0 0.18,0.4v0.68h0.72v-0.68a0.53,0.53 0,0 0,0 -0.75A0.52,0.52 0,0 0,12 13.52ZM12,9.63a1.79,1.79 0,0 0,-1.79 1.79v0.71h3.58v-0.71A1.79,1.79 0,0 0,12 9.59Z"
11+
android:fillColor="#262626"/>
12+
</vector>

app/src/main/res/layout/file_list_actions_bottom_sheet_creator.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@
2222

2323
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2424
xmlns:tools="http://schemas.android.com/tools"
25+
xmlns:app="http://schemas.android.com/apk/res-auto"
2526
android:id="@+id/creator_container"
2627
android:layout_width="match_parent"
2728
android:layout_height="@dimen/bottom_sheet_item_height"
2829
android:background="?android:attr/selectableItemBackground"
2930
android:gravity="center_vertical"
3031
android:orientation="horizontal"
32+
android:paddingTop="@dimen/standard_half_padding"
33+
android:paddingBottom="@dimen/standard_half_padding"
3134
android:paddingLeft="@dimen/standard_padding"
3235
android:paddingRight="@dimen/standard_padding"
3336
tools:ignore="UseCompoundDrawables">
@@ -36,8 +39,7 @@
3639
android:id="@+id/creator_thumbnail"
3740
android:layout_width="24dp"
3841
android:layout_height="24dp"
39-
android:layout_marginTop="@dimen/standard_margin"
40-
android:layout_marginBottom="@dimen/standard_margin"
42+
app:tint="@color/bottom_sheet_icon_color"
4143
android:contentDescription="@null"
4244
android:src="@drawable/file_ppt" />
4345

@@ -46,8 +48,8 @@
4648
android:layout_width="wrap_content"
4749
android:layout_height="wrap_content"
4850
android:layout_gravity="center_vertical"
49-
android:layout_marginStart="@dimen/bottom_sheet_text_start_margin"
51+
android:layout_marginStart="@dimen/standard_margin"
5052
android:text="@string/create_new_presentation"
51-
android:textColor="@color/text_color"
53+
android:textColor="@color/bottom_sheet_txt_color"
5254
android:textSize="@dimen/bottom_sheet_text_size" />
5355
</LinearLayout>

app/src/main/res/layout/file_list_actions_bottom_sheet_fragment.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,37 @@
213213

214214
</LinearLayout>
215215

216+
<LinearLayout
217+
android:id="@+id/menu_encrypted_mkdir"
218+
android:layout_width="match_parent"
219+
android:layout_height="@dimen/bottom_sheet_item_height"
220+
android:background="?android:attr/selectableItemBackground"
221+
android:gravity="center_vertical"
222+
android:orientation="horizontal"
223+
android:paddingLeft="@dimen/standard_padding"
224+
android:paddingTop="@dimen/standard_half_padding"
225+
android:paddingRight="@dimen/standard_padding"
226+
android:paddingBottom="@dimen/standard_half_padding"
227+
tools:ignore="UseCompoundDrawables">
228+
229+
<ImageView
230+
android:id="@+id/menu_icon_encrypted_mkdir"
231+
android:layout_width="wrap_content"
232+
android:layout_height="wrap_content"
233+
android:contentDescription="@null"
234+
android:src="@drawable/ic_encrypted_folder"
235+
app:tint="@color/bottom_sheet_icon_color" />
236+
237+
<TextView
238+
android:layout_width="wrap_content"
239+
android:layout_height="wrap_content"
240+
android:layout_gravity="center_vertical"
241+
android:layout_marginStart="@dimen/bottom_sheet_text_start_margin"
242+
android:text="@string/create_new_encrypted_folder"
243+
android:textColor="@color/bottom_sheet_txt_color"
244+
android:textSize="@dimen/bottom_sheet_text_size" />
245+
</LinearLayout>
246+
216247
<LinearLayout
217248
android:id="@+id/templates"
218249
android:layout_width="match_parent"

app/src/main/res/layout/quick_sharing_permissions_bottom_sheet_fragment.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
xmlns:tools="http://schemas.android.com/tools"
2323
android:layout_width="match_parent"
2424
android:layout_height="wrap_content"
25+
android:background="@color/bottom_sheet_bg_color"
2526
android:paddingTop="@dimen/standard_padding"
2627
android:paddingBottom="@dimen/standard_padding"
2728
android:orientation="vertical">

app/src/main/res/values-de/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@
183183
<string name="create_new">Neu erstellen</string>
184184
<string name="create_new_document">Neues Dokument erstellen</string>
185185
<string name="create_new_folder">Neuen Ordner erstellen</string>
186+
<string name="create_new_encrypted_folder">Verschlüsselten Ordner erstellen</string>
186187
<string name="create_new_presentation">Neue Präsentation erstellen</string>
187188
<string name="create_new_spreadsheet">Neue Tabelle erstellen</string>
188189
<string name="create_rich_workspace">Ordnerinfo hinzufügen</string>

app/src/main/res/values/dims.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<dimen name="nav_drawer_menu_avatar_radius">12sp</dimen>
2222
<dimen name="list_item_avatar_icon_radius">20dp</dimen>
2323
<dimen name="bottom_sheet_text_start_margin">16dp</dimen>
24-
<dimen name="bottom_sheet_item_height">56dp</dimen>
24+
<dimen name="bottom_sheet_item_height">48dp</dimen>
2525
<dimen name="bottom_sheet_menu_item_divider_standard_margin">80dp</dimen>
2626
<dimen name="bottom_sheet_min_height">112dp</dimen>
2727
<dimen name="file_icon_size">40dp</dimen>

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,7 @@
743743
<string name="upload_scan_doc_upload">Scan document from camera</string>
744744
<string name="upload_content_from_other_apps">Upload content from other apps</string>
745745
<string name="create_new_folder">Create new folder</string>
746+
<string name="create_new_encrypted_folder">Create new encrypted folder</string>
746747
<string name="uploads_view_upload_status_virus_detected">Virus detected. Upload cannot be completed!</string>
747748
<string name="tags">Tags</string>
748749
<string name="sharee_add_failed">Adding sharee failed</string>

0 commit comments

Comments
 (0)