mirror of
https://github.com/nextcloud/android.git
synced 2024-12-19 15:33:00 +03:00
Merge remote-tracking branch 'origin/master' into dev
This commit is contained in:
commit
7b8ff91156
7 changed files with 21 additions and 11 deletions
|
@ -242,7 +242,7 @@ dependencies {
|
||||||
implementation 'org.apache.jackrabbit:jackrabbit-webdav:2.13.5' // remove after entire switch to lib v2
|
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.constraintlayout:constraintlayout:2.1.4'
|
||||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
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 'com.jakewharton:disklrucache:2.0.2'
|
||||||
implementation "androidx.appcompat:appcompat:$appCompatVersion"
|
implementation "androidx.appcompat:appcompat:$appCompatVersion"
|
||||||
implementation 'androidx.webkit:webkit:1.6.1'
|
implementation 'androidx.webkit:webkit:1.6.1'
|
||||||
|
@ -367,7 +367,7 @@ dependencies {
|
||||||
// upon each update first test: new registration, receive push
|
// upon each update first test: new registration, receive push
|
||||||
gplayImplementation "com.google.firebase:firebase-messaging:23.1.2"
|
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"
|
implementation "androidx.room:room-runtime:$roomVersion"
|
||||||
kapt "androidx.room:room-compiler:$roomVersion"
|
kapt "androidx.room:room-compiler:$roomVersion"
|
||||||
|
|
|
@ -25,6 +25,7 @@ import android.view.View
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import android.widget.LinearLayout
|
import android.widget.LinearLayout
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
|
import com.google.android.material.chip.Chip
|
||||||
import com.google.android.material.chip.ChipGroup
|
import com.google.android.material.chip.ChipGroup
|
||||||
import com.owncloud.android.ui.AvatarGroupLayout
|
import com.owncloud.android.ui.AvatarGroupLayout
|
||||||
|
|
||||||
|
@ -35,8 +36,8 @@ internal interface ListItemViewHolder : ListGridItemViewHolder {
|
||||||
val overflowMenu: ImageView
|
val overflowMenu: ImageView
|
||||||
val sharedAvatars: AvatarGroupLayout
|
val sharedAvatars: AvatarGroupLayout
|
||||||
val tagsGroup: ChipGroup
|
val tagsGroup: ChipGroup
|
||||||
val firstTag: TextView
|
val firstTag: Chip
|
||||||
val secondTag: TextView
|
val secondTag: Chip
|
||||||
val tagMore: TextView
|
val tagMore: Chip
|
||||||
val fileDetailGroup: LinearLayout
|
val fileDetailGroup: LinearLayout
|
||||||
}
|
}
|
||||||
|
|
|
@ -425,6 +425,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
||||||
} else {
|
} else {
|
||||||
holder.getTagsGroup().setVisibility(View.VISIBLE);
|
holder.getTagsGroup().setVisibility(View.VISIBLE);
|
||||||
holder.getFileDetailGroup().setVisibility(View.GONE);
|
holder.getFileDetailGroup().setVisibility(View.GONE);
|
||||||
|
viewThemeUtils.material.themeChipSuggestion(holder.getFirstTag());
|
||||||
holder.getFirstTag().setVisibility(View.VISIBLE);
|
holder.getFirstTag().setVisibility(View.VISIBLE);
|
||||||
holder.getSecondTag().setVisibility(View.GONE);
|
holder.getSecondTag().setVisibility(View.GONE);
|
||||||
holder.getTagMore().setVisibility(View.GONE);
|
holder.getTagMore().setVisibility(View.GONE);
|
||||||
|
@ -432,11 +433,13 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
||||||
holder.getFirstTag().setText(file.getTags().get(0));
|
holder.getFirstTag().setText(file.getTags().get(0));
|
||||||
|
|
||||||
if (file.getTags().size() > 1) {
|
if (file.getTags().size() > 1) {
|
||||||
|
viewThemeUtils.material.themeChipSuggestion(holder.getSecondTag());
|
||||||
holder.getSecondTag().setVisibility(View.VISIBLE);
|
holder.getSecondTag().setVisibility(View.VISIBLE);
|
||||||
holder.getSecondTag().setText(file.getTags().get(1));
|
holder.getSecondTag().setText(file.getTags().get(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file.getTags().size() > 2) {
|
if (file.getTags().size() > 2) {
|
||||||
|
viewThemeUtils.material.themeChipSuggestion(holder.getTagMore());
|
||||||
holder.getTagMore().setVisibility(View.VISIBLE);
|
holder.getTagMore().setVisibility(View.VISIBLE);
|
||||||
holder.getTagMore().setText(String.format(activity.getString(R.string.tags_more),
|
holder.getTagMore().setText(String.format(activity.getString(R.string.tags_more),
|
||||||
(file.getTags().size() - 2)));
|
(file.getTags().size() - 2)));
|
||||||
|
|
|
@ -27,6 +27,7 @@ import android.widget.LinearLayout
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.elyeproj.loaderviewlibrary.LoaderImageView
|
import com.elyeproj.loaderviewlibrary.LoaderImageView
|
||||||
|
import com.google.android.material.chip.Chip
|
||||||
import com.google.android.material.chip.ChipGroup
|
import com.google.android.material.chip.ChipGroup
|
||||||
import com.owncloud.android.databinding.ListItemBinding
|
import com.owncloud.android.databinding.ListItemBinding
|
||||||
import com.owncloud.android.ui.AvatarGroupLayout
|
import com.owncloud.android.ui.AvatarGroupLayout
|
||||||
|
@ -52,11 +53,11 @@ internal class OCFileListItemViewHolder(private var binding: ListItemBinding) :
|
||||||
get() = binding.thumbnailLayout.thumbnail
|
get() = binding.thumbnailLayout.thumbnail
|
||||||
override val tagsGroup: ChipGroup
|
override val tagsGroup: ChipGroup
|
||||||
get() = binding.tagsGroup
|
get() = binding.tagsGroup
|
||||||
override val firstTag: TextView
|
override val firstTag: Chip
|
||||||
get() = binding.firstTag
|
get() = binding.firstTag
|
||||||
override val secondTag: TextView
|
override val secondTag: Chip
|
||||||
get() = binding.secondTag
|
get() = binding.secondTag
|
||||||
override val tagMore: TextView
|
override val tagMore: Chip
|
||||||
get() = binding.tagMore
|
get() = binding.tagMore
|
||||||
override val fileDetailGroup: LinearLayout
|
override val fileDetailGroup: LinearLayout
|
||||||
get() = binding.fileDetailGroup
|
get() = binding.fileDetailGroup
|
||||||
|
|
|
@ -242,8 +242,11 @@ public class FileDetailFragment extends FileFragment implements OnClickListener,
|
||||||
chip.setText(tag);
|
chip.setText(tag);
|
||||||
chip.setChipBackgroundColor(ColorStateList.valueOf(getResources().getColor(R.color.bg_default,
|
chip.setChipBackgroundColor(ColorStateList.valueOf(getResources().getColor(R.color.bg_default,
|
||||||
context.getTheme())));
|
context.getTheme())));
|
||||||
chip.setTextColor(getResources().getColor(R.color.list_item_lastmod_and_filesize_text,
|
chip.setShapeAppearanceModel(chip.getShapeAppearanceModel().toBuilder().setAllCornerSizes((100.0f))
|
||||||
context.getTheme()));
|
.build());
|
||||||
|
chip.setEnsureMinTouchTargetSize(false);
|
||||||
|
chip.setClickable(false);
|
||||||
|
viewThemeUtils.material.themeChipSuggestion(chip);
|
||||||
binding.tagsGroup.addView(chip);
|
binding.tagsGroup.addView(chip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,8 @@
|
||||||
android:id="@+id/tagsGroup"
|
android:id="@+id/tagsGroup"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
/>
|
android:paddingTop="@dimen/standard_half_padding"
|
||||||
|
app:chipSpacingVertical="@dimen/standard_half_padding" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -237,6 +237,7 @@
|
||||||
<string name="drawer_item_all_files">所有檔案</string>
|
<string name="drawer_item_all_files">所有檔案</string>
|
||||||
<string name="drawer_item_favorites">最愛</string>
|
<string name="drawer_item_favorites">最愛</string>
|
||||||
<string name="drawer_item_gallery">多媒體</string>
|
<string name="drawer_item_gallery">多媒體</string>
|
||||||
|
<string name="drawer_item_groupfolders">群組資料夾</string>
|
||||||
<string name="drawer_item_home">家目錄</string>
|
<string name="drawer_item_home">家目錄</string>
|
||||||
<string name="drawer_item_notifications">通知</string>
|
<string name="drawer_item_notifications">通知</string>
|
||||||
<string name="drawer_item_on_device">在裝置上</string>
|
<string name="drawer_item_on_device">在裝置上</string>
|
||||||
|
|
Loading…
Reference in a new issue