Better positioning of preview media fragment

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2021-12-08 10:03:52 +01:00
parent b7de19236f
commit 57f21e50ce
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7
4 changed files with 8 additions and 3 deletions

View file

@ -48,7 +48,6 @@ import android.view.MenuItem;
import android.view.View;
import android.view.ViewTreeObserver;
import android.view.WindowManager;
import android.widget.Toast;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.snackbar.Snackbar;
@ -1124,6 +1123,8 @@ public class FileDisplayActivity extends FileActivity
createMinFragments(null);
} else {
// pop back
((CoordinatorLayout.LayoutParams) binding.rootLayout.getLayoutParams())
.setBehavior(new AppBarLayout.ScrollingViewBehavior());
hideSearchView(getCurrentDir());
showSortListGroup(true);
super.onBackPressed();
@ -2187,6 +2188,7 @@ public class FileDisplayActivity extends FileActivity
Fragment mediaFragment = PreviewMediaFragment.newInstance(file, user.get(), startPlaybackPosition, autoplay);
setLeftFragment(mediaFragment);
binding.rightFragmentContainer.setVisibility(View.GONE);
((CoordinatorLayout.LayoutParams) binding.rootLayout.getLayoutParams()).setBehavior(null);
super.updateActionBarTitleAndHomeButton(file);
} else {
Intent previewIntent = new Intent();

View file

@ -178,6 +178,8 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
emptyListView = binding.emptyView.emptyListView;
getActivity().findViewById(R.id.sort_list_button_group).setVisibility(View.GONE);
setLoadingView();
return view;
}

View file

@ -26,6 +26,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_marginTop="?attr/actionBarSize"
tools:context=".ui.preview.PreviewMediaFragment">
<ImageView

View file

@ -65,7 +65,7 @@
android:layout_height="wrap_content"
android:paddingEnd="@dimen/standard_quarter_padding"
android:text="@string/placeholder_media_time"
android:textColor="@color/text_color_inverse"
android:textColor="@color/text_color"
/>
<SeekBar
@ -87,7 +87,7 @@
android:layout_height="wrap_content"
android:paddingStart="@dimen/standard_quarter_padding"
android:text="@string/placeholder_media_time"
android:textColor="@color/text_color_inverse"
android:textColor="@color/text_color"
/>
</LinearLayout>