diff --git a/app/build.gradle b/app/build.gradle index 74b8f57dab..80cd65c9be 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -242,7 +242,7 @@ dependencies { implementation 'org.apache.jackrabbit:jackrabbit-webdav:2.13.5' // remove after entire switch to lib v2 implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'com.google.android.material:material:1.8.0' + implementation 'com.google.android.material:material:1.9.0' implementation 'com.jakewharton:disklrucache:2.0.2' implementation "androidx.appcompat:appcompat:$appCompatVersion" implementation 'androidx.webkit:webkit:1.6.1' @@ -367,7 +367,7 @@ dependencies { // upon each update first test: new registration, receive push gplayImplementation "com.google.firebase:firebase-messaging:23.1.2" - implementation 'com.github.nextcloud.android-common:ui:0.8.0' + implementation 'com.github.nextcloud.android-common:ui:0.10.0' implementation "androidx.room:room-runtime:$roomVersion" kapt "androidx.room:room-compiler:$roomVersion" diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/ListItemViewHolder.kt b/app/src/main/java/com/owncloud/android/ui/adapter/ListItemViewHolder.kt index 967e2a01a2..cb1861d378 100644 --- a/app/src/main/java/com/owncloud/android/ui/adapter/ListItemViewHolder.kt +++ b/app/src/main/java/com/owncloud/android/ui/adapter/ListItemViewHolder.kt @@ -25,6 +25,7 @@ import android.view.View import android.widget.ImageView import android.widget.LinearLayout import android.widget.TextView +import com.google.android.material.chip.Chip import com.google.android.material.chip.ChipGroup import com.owncloud.android.ui.AvatarGroupLayout @@ -35,8 +36,8 @@ internal interface ListItemViewHolder : ListGridItemViewHolder { val overflowMenu: ImageView val sharedAvatars: AvatarGroupLayout val tagsGroup: ChipGroup - val firstTag: TextView - val secondTag: TextView - val tagMore: TextView + val firstTag: Chip + val secondTag: Chip + val tagMore: Chip val fileDetailGroup: LinearLayout } diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java b/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java index 81f6c1320e..89f83d0406 100644 --- a/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java +++ b/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java @@ -425,6 +425,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter 1) { + viewThemeUtils.material.themeChipSuggestion(holder.getSecondTag()); holder.getSecondTag().setVisibility(View.VISIBLE); holder.getSecondTag().setText(file.getTags().get(1)); } if (file.getTags().size() > 2) { + viewThemeUtils.material.themeChipSuggestion(holder.getTagMore()); holder.getTagMore().setVisibility(View.VISIBLE); holder.getTagMore().setText(String.format(activity.getString(R.string.tags_more), (file.getTags().size() - 2))); diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListItemViewHolder.kt b/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListItemViewHolder.kt index bf5c7d3606..979eeb89cf 100644 --- a/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListItemViewHolder.kt +++ b/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListItemViewHolder.kt @@ -27,6 +27,7 @@ import android.widget.LinearLayout import android.widget.TextView import androidx.recyclerview.widget.RecyclerView import com.elyeproj.loaderviewlibrary.LoaderImageView +import com.google.android.material.chip.Chip import com.google.android.material.chip.ChipGroup import com.owncloud.android.databinding.ListItemBinding import com.owncloud.android.ui.AvatarGroupLayout @@ -52,11 +53,11 @@ internal class OCFileListItemViewHolder(private var binding: ListItemBinding) : get() = binding.thumbnailLayout.thumbnail override val tagsGroup: ChipGroup get() = binding.tagsGroup - override val firstTag: TextView + override val firstTag: Chip get() = binding.firstTag - override val secondTag: TextView + override val secondTag: Chip get() = binding.secondTag - override val tagMore: TextView + override val tagMore: Chip get() = binding.tagMore override val fileDetailGroup: LinearLayout get() = binding.fileDetailGroup diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java b/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java index 83e4db2665..f4034efa1f 100644 --- a/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java @@ -242,8 +242,11 @@ public class FileDetailFragment extends FileFragment implements OnClickListener, chip.setText(tag); chip.setChipBackgroundColor(ColorStateList.valueOf(getResources().getColor(R.color.bg_default, context.getTheme()))); - chip.setTextColor(getResources().getColor(R.color.list_item_lastmod_and_filesize_text, - context.getTheme())); + chip.setShapeAppearanceModel(chip.getShapeAppearanceModel().toBuilder().setAllCornerSizes((100.0f)) + .build()); + chip.setEnsureMinTouchTargetSize(false); + chip.setClickable(false); + viewThemeUtils.material.themeChipSuggestion(chip); binding.tagsGroup.addView(chip); } } diff --git a/app/src/main/res/layout/file_details_fragment.xml b/app/src/main/res/layout/file_details_fragment.xml index abbf217a18..41795e3ace 100644 --- a/app/src/main/res/layout/file_details_fragment.xml +++ b/app/src/main/res/layout/file_details_fragment.xml @@ -116,7 +116,8 @@ android:id="@+id/tagsGroup" android:layout_width="match_parent" android:layout_height="wrap_content" - /> + android:paddingTop="@dimen/standard_half_padding" + app:chipSpacingVertical="@dimen/standard_half_padding" /> diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 1da48f98e3..c576454dab 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -237,6 +237,7 @@ 所有檔案 最愛 多媒體 + 群組資料夾 家目錄 通知 在裝置上