mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +03:00
Update live indicator icon
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
47a4fbbebc
commit
429c892b3d
5 changed files with 38 additions and 13 deletions
|
@ -207,15 +207,20 @@ public class PreviewImageFragment extends FileFragment implements Injectable {
|
|||
String livePhoto = getFile().getLivePhoto();
|
||||
|
||||
if (livePhoto != null) {
|
||||
binding.livePhotoIndicator.setVisibility(View.VISIBLE);
|
||||
|
||||
binding.image.setOnLongClickListener(v -> {
|
||||
playLivePhoto();
|
||||
OCFile videoOfLivePhoto = getFile().videoOfLivePhoto;
|
||||
if (videoOfLivePhoto != null) {
|
||||
playLivePhoto(videoOfLivePhoto);
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void playLivePhoto() {
|
||||
Fragment mediaFragment = PreviewMediaFragment.newInstance(getFile().videoOfLivePhoto, accountManager.getUser(), 0, true);
|
||||
private void playLivePhoto(OCFile file) {
|
||||
Fragment mediaFragment = PreviewMediaFragment.newInstance(file, accountManager.getUser(), 0, true);
|
||||
FragmentManager fragmentManager = requireActivity().getSupportFragmentManager();
|
||||
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
|
||||
fragmentTransaction.replace(R.id.top, mediaFragment);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -18,11 +18,30 @@
|
|||
-->
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/live_photo_indicator"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:layout_marginTop="@dimen/live_photo_indicator_margin"
|
||||
android:layout_marginStart="@dimen/standard_quarter_margin"
|
||||
android:background="@drawable/rounded_rect"
|
||||
android:backgroundTint="#E5E5E5"
|
||||
android:layout_gravity="start|top"
|
||||
android:gravity="center"
|
||||
android:translationZ="2dp"
|
||||
android:drawablePadding="@dimen/standard_quarter_margin"
|
||||
android:text="@string/file_list_live"
|
||||
android:padding="@dimen/standard_half_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:drawableStartCompat="@drawable/ic_live_photo" />
|
||||
|
||||
<com.github.chrisbanes.photoview.PhotoView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
<dimen name="bottom_sheet_item_height">56dp</dimen>
|
||||
<dimen name="bottom_sheet_menu_item_divider_standard_margin">80dp</dimen>
|
||||
<dimen name="file_icon_size">40dp</dimen>
|
||||
<dimen name="live_photo_indicator_margin">100dp</dimen>
|
||||
<dimen name="file_icon_size_grid">128dp</dimen>
|
||||
<dimen name="file_icon_rounded_corner_radius">8dp</dimen>
|
||||
<dimen name="file_icon_rounded_corner_radius_for_grid_mode">3dp</dimen>
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
<string name="uploader_upload_files_behaviour_only_upload">Keep file in source folder</string>
|
||||
<string name="uploader_upload_files_behaviour_upload_and_delete_from_source">Delete file from source folder</string>
|
||||
<string name="file_list_seconds_ago">seconds ago</string>
|
||||
<string name="file_list_live">live</string>
|
||||
<string name="file_list_live">LIVE</string>
|
||||
<string name="file_list_empty_headline">No files here</string>
|
||||
<string name="folder_list_empty_headline">No folders here</string>
|
||||
<string name="file_list_empty">Upload some content or sync with your devices.</string>
|
||||
|
|
Loading…
Reference in a new issue