Merge pull request #6347 from nextcloud/uselessParent

Remove useless parents
This commit is contained in:
Andy Scherzinger 2020-06-24 23:15:04 +02:00 committed by GitHub
commit 01d9d2e437
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 117 additions and 172 deletions

View file

@ -1,2 +1,2 @@
DO NOT TOUCH; GENERATED BY DRONE DO NOT TOUCH; GENERATED BY DRONE
<span class="mdl-layout-title">Lint Report: 91 warnings</span> <span class="mdl-layout-title">Lint Report: 85 warnings</span>

View file

@ -49,7 +49,6 @@ import android.view.ViewGroup;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import com.caverock.androidsvg.SVG; import com.caverock.androidsvg.SVG;
@ -115,7 +114,6 @@ public class PreviewImageFragment extends FileFragment implements Injectable {
private static final String MIME_TYPE_SVG = "image/svg+xml"; private static final String MIME_TYPE_SVG = "image/svg+xml";
private PhotoView mImageView; private PhotoView mImageView;
private RelativeLayout mMultiView;
private LinearLayout mMultiListContainer; private LinearLayout mMultiListContainer;
private TextView mMultiListMessage; private TextView mMultiListMessage;
@ -206,8 +204,6 @@ public class PreviewImageFragment extends FileFragment implements Injectable {
mImageView.setOnClickListener(v -> togglePreviewImageFullScreen()); mImageView.setOnClickListener(v -> togglePreviewImageFullScreen());
mMultiView = view.findViewById(R.id.multi_view);
setupMultiView(view); setupMultiView(view);
setMultiListLoadingMessage(); setMultiListLoadingMessage();
@ -298,7 +294,7 @@ public class PreviewImageFragment extends FileFragment implements Injectable {
task.execute(getFile()); task.execute(getFile());
} }
} }
mMultiView.setVisibility(View.GONE); mMultiListContainer.setVisibility(View.GONE);
mImageView.setBackgroundColor(getResources().getColor(R.color.background_color_inverse)); mImageView.setBackgroundColor(getResources().getColor(R.color.background_color_inverse));
mImageView.setVisibility(View.VISIBLE); mImageView.setVisibility(View.VISIBLE);
@ -651,7 +647,7 @@ public class PreviewImageFragment extends FileFragment implements Injectable {
} }
} }
mMultiView.setVisibility(View.GONE); mMultiListContainer.setVisibility(View.GONE);
if (getResources() != null) { if (getResources() != null) {
mImageView.setBackgroundColor(getResources().getColor(R.color.background_color_inverse)); mImageView.setBackgroundColor(getResources().getColor(R.color.background_color_inverse));
} }
@ -712,7 +708,7 @@ public class PreviewImageFragment extends FileFragment implements Injectable {
} }
private void setMultiListLoadingMessage() { private void setMultiListLoadingMessage() {
if (mMultiView != null) { if (mMultiListContainer != null) {
mMultiListHeadline.setText(R.string.file_list_loading); mMultiListHeadline.setText(R.string.file_list_loading);
mMultiListMessage.setText(""); mMultiListMessage.setText("");
@ -727,7 +723,7 @@ public class PreviewImageFragment extends FileFragment implements Injectable {
mMultiListMessage.setText(message); mMultiListMessage.setText(message);
mMultiListIcon.setImageResource(icon); mMultiListIcon.setImageResource(icon);
mMultiView.setBackgroundColor(getResources().getColor(R.color.background_color_inverse)); mMultiListContainer.setBackgroundColor(getResources().getColor(R.color.background_color_inverse));
mMultiListHeadline.setTextColor(getResources().getColor(R.color.standard_grey)); mMultiListHeadline.setTextColor(getResources().getColor(R.color.standard_grey));
mMultiListMessage.setTextColor(getResources().getColor(R.color.standard_grey)); mMultiListMessage.setTextColor(getResources().getColor(R.color.standard_grey));
@ -740,7 +736,7 @@ public class PreviewImageFragment extends FileFragment implements Injectable {
public void setErrorPreviewMessage() { public void setErrorPreviewMessage() {
try { try {
if (getActivity() != null) { if (getActivity() != null) {
Snackbar.make(mMultiView, Snackbar.make(mMultiListContainer,
R.string.resized_image_not_possible_download, R.string.resized_image_not_possible_download,
Snackbar.LENGTH_INDEFINITE) Snackbar.LENGTH_INDEFINITE)
.setAction(R.string.common_yes, v -> { .setAction(R.string.common_yes, v -> {
@ -748,14 +744,16 @@ public class PreviewImageFragment extends FileFragment implements Injectable {
if (activity != null) { if (activity != null) {
activity.requestForDownload(getFile()); activity.requestForDownload(getFile());
} else { } else {
Snackbar.make(mMultiView, Snackbar.make(mMultiListContainer,
getResources().getString(R.string.could_not_download_image), getResources().getString(R.string.could_not_download_image),
Snackbar.LENGTH_INDEFINITE).show(); Snackbar.LENGTH_INDEFINITE).show();
} }
} }
).show(); ).show();
} else { } else {
Snackbar.make(mMultiView, R.string.resized_image_not_possible, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(mMultiListContainer,
R.string.resized_image_not_possible,
Snackbar.LENGTH_INDEFINITE).show();
} }
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
Log_OC.d(TAG, e.getMessage()); Log_OC.d(TAG, e.getMessage());
@ -764,7 +762,7 @@ public class PreviewImageFragment extends FileFragment implements Injectable {
public void setNoConnectionErrorMessage() { public void setNoConnectionErrorMessage() {
try { try {
Snackbar.make(mMultiView, R.string.auth_no_net_conn_title, Snackbar.LENGTH_LONG).show(); Snackbar.make(mMultiListContainer, R.string.auth_no_net_conn_title, Snackbar.LENGTH_LONG).show();
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
Log_OC.d(TAG, e.getMessage()); Log_OC.d(TAG, e.getMessage());
} }

View file

@ -112,7 +112,6 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
private VideoView mVideoPreview; private VideoView mVideoPreview;
private int mSavedPlaybackPosition; private int mSavedPlaybackPosition;
private RelativeLayout mMultiView;
private RelativeLayout mPreviewContainer; private RelativeLayout mPreviewContainer;
private LinearLayout mMultiListContainer; private LinearLayout mMultiListContainer;
@ -197,7 +196,6 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
mVideoPreview.setOnTouchListener(this); mVideoPreview.setOnTouchListener(this);
mMediaController = view.findViewById(R.id.media_controller); mMediaController = view.findViewById(R.id.media_controller);
mMultiView = view.findViewById(R.id.multi_view);
setupMultiView(view); setupMultiView(view);
setMultiListLoadingMessage(); setMultiListLoadingMessage();
@ -213,7 +211,7 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
} }
private void setMultiListLoadingMessage() { private void setMultiListLoadingMessage() {
if (mMultiView != null) { if (mMultiListContainer != null) {
mMultiListHeadline.setText(R.string.file_list_loading); mMultiListHeadline.setText(R.string.file_list_loading);
mMultiListMessage.setText(""); mMultiListMessage.setText("");
@ -323,7 +321,7 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
mMediaController.setMediaPlayer(mMediaPlayerServiceConnection); mMediaController.setMediaPlayer(mMediaPlayerServiceConnection);
mMediaPlayerServiceConnection.bind(); mMediaPlayerServiceConnection.bind();
mMediaPlayerServiceConnection.start(mAccount, file, mAutoplay, mSavedPlaybackPosition); mMediaPlayerServiceConnection.start(mAccount, file, mAutoplay, mSavedPlaybackPosition);
mMultiView.setVisibility(View.GONE); mMultiListContainer.setVisibility(View.GONE);
mPreviewContainer.setVisibility(View.VISIBLE); mPreviewContainer.setVisibility(View.VISIBLE);
} else if (MimeTypeUtil.isVideo(file)) { } else if (MimeTypeUtil.isVideo(file)) {
stopAudio(); stopAudio();
@ -337,7 +335,7 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
} }
@Override @Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { public void onCreateOptionsMenu(@NonNull Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater); super.onCreateOptionsMenu(menu, inflater);
menu.removeItem(R.id.action_search); menu.removeItem(R.id.action_search);
inflater.inflate(R.menu.item_file, menu); inflater.inflate(R.menu.item_file, menu);
@ -525,10 +523,10 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
previewMediaFragment.mVideoUri = uri; previewMediaFragment.mVideoUri = uri;
previewMediaFragment.mVideoPreview.setVideoURI(uri); previewMediaFragment.mVideoPreview.setVideoURI(uri);
} else { } else {
previewMediaFragment.mMultiView.setVisibility(View.VISIBLE); previewMediaFragment.mMultiListContainer.setVisibility(View.VISIBLE);
previewMediaFragment.setMessageForMultiList( previewMediaFragment.setMessageForMultiList(
previewMediaFragment.getString(R.string.stream_not_possible_headline), previewMediaFragment.getString(R.string.stream_not_possible_headline),
R.string.stream_not_possible_message, R.drawable.file_movie); R.string.stream_not_possible_message, R.drawable.file_movie);
} }
} else { } else {
Log_OC.e(TAG, "Error streaming file: no previewMediaFragment!"); Log_OC.e(TAG, "Error streaming file: no previewMediaFragment!");
@ -548,7 +546,7 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
@Override @Override
public void onPrepared(MediaPlayer vp) { public void onPrepared(MediaPlayer vp) {
Log_OC.v(TAG, "onPrepared"); Log_OC.v(TAG, "onPrepared");
mMultiView.setVisibility(View.GONE); mMultiListContainer.setVisibility(View.GONE);
mPreviewContainer.setVisibility(View.VISIBLE); mPreviewContainer.setVisibility(View.VISIBLE);
mVideoPreview.seekTo(mSavedPlaybackPosition); mVideoPreview.seekTo(mSavedPlaybackPosition);
if (mAutoplay) { if (mAutoplay) {
@ -590,7 +588,7 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
final Context context = getActivity(); final Context context = getActivity();
if (mVideoPreview.getWindowToken() != null && context != null) { if (mVideoPreview.getWindowToken() != null && context != null) {
String message = ErrorFormat.toString(context, what, extra); String message = ErrorFormat.toString(context, what, extra);
mMultiView.setVisibility(View.VISIBLE); mMultiListContainer.setVisibility(View.VISIBLE);
setMessageForMultiList(message, R.string.preview_sorry, R.drawable.file_movie); setMessageForMultiList(message, R.string.preview_sorry, R.drawable.file_movie);
} }
return true; return true;
@ -648,7 +646,7 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
} }
@Override @Override
public void onConfigurationChanged(Configuration newConfig) { public void onConfigurationChanged(@NonNull Configuration newConfig) {
super.onConfigurationChanged(newConfig); super.onConfigurationChanged(newConfig);
Log_OC.v(TAG, "onConfigurationChanged " + this); Log_OC.v(TAG, "onConfigurationChanged " + this);
} }
@ -710,15 +708,7 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
return mSavedPlaybackPosition; return mSavedPlaybackPosition;
} }
public boolean isPlaying() {
if (mPrepared) {
mAutoplay = mVideoPreview.isPlaying();
}
return mAutoplay;
}
private void toggleDrawerLockMode(ContainerActivity containerActivity, int lockMode) { private void toggleDrawerLockMode(ContainerActivity containerActivity, int lockMode) {
((DrawerActivity) containerActivity).setDrawerLockMode(lockMode); ((DrawerActivity) containerActivity).setDrawerLockMode(lockMode);
} }
} }

View file

@ -227,8 +227,8 @@ public class PreviewTextFileFragment extends PreviewTextFragment {
textView.setVisibility(View.VISIBLE); textView.setVisibility(View.VISIBLE);
} }
if (mMultiView != null) { if (mMultiListContainer != null) {
mMultiView.setVisibility(View.GONE); mMultiListContainer.setVisibility(View.GONE);
} }
} }
} }

View file

@ -34,7 +34,6 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import com.nextcloud.client.account.UserAccountManager; import com.nextcloud.client.account.UserAccountManager;
@ -86,8 +85,8 @@ public abstract class PreviewTextFragment extends FileFragment implements Search
protected boolean mSearchOpen; protected boolean mSearchOpen;
protected TextView mTextPreview; protected TextView mTextPreview;
protected Handler mHandler; protected Handler mHandler;
protected RelativeLayout mMultiView;
protected String mOriginalText; protected String mOriginalText;
protected View mMultiListContainer;
private TextView mMultiListMessage; private TextView mMultiListMessage;
private TextView mMultiListHeadline; private TextView mMultiListHeadline;
@ -109,8 +108,6 @@ public abstract class PreviewTextFragment extends FileFragment implements Search
View ret = inflater.inflate(R.layout.text_file_preview, container, false); View ret = inflater.inflate(R.layout.text_file_preview, container, false);
mTextPreview = ret.findViewById(R.id.text_preview); mTextPreview = ret.findViewById(R.id.text_preview);
mMultiView = ret.findViewById(R.id.multi_view);
setupMultiView(ret); setupMultiView(ret);
setMultiListLoadingMessage(); setMultiListLoadingMessage();
@ -118,6 +115,7 @@ public abstract class PreviewTextFragment extends FileFragment implements Search
} }
private void setupMultiView(View view) { private void setupMultiView(View view) {
mMultiListContainer = view.findViewById(R.id.empty_list_view);
mMultiListMessage = view.findViewById(R.id.empty_list_view_text); mMultiListMessage = view.findViewById(R.id.empty_list_view_text);
mMultiListHeadline = view.findViewById(R.id.empty_list_view_headline); mMultiListHeadline = view.findViewById(R.id.empty_list_view_headline);
mMultiListIcon = view.findViewById(R.id.empty_list_icon); mMultiListIcon = view.findViewById(R.id.empty_list_icon);
@ -125,7 +123,7 @@ public abstract class PreviewTextFragment extends FileFragment implements Search
} }
private void setMultiListLoadingMessage() { private void setMultiListLoadingMessage() {
if (mMultiView != null) { if (mMultiListContainer != null) {
mMultiListHeadline.setText(R.string.file_list_loading); mMultiListHeadline.setText(R.string.file_list_loading);
mMultiListMessage.setText(""); mMultiListMessage.setText("");
@ -219,7 +217,7 @@ public abstract class PreviewTextFragment extends FileFragment implements Search
* Finishes the preview * Finishes the preview
*/ */
protected void finish() { protected void finish() {
getActivity().runOnUiThread(() -> getActivity().onBackPressed()); requireActivity().runOnUiThread(() -> requireActivity().onBackPressed());
} }
public static void setText(TextView textView, String text, OCFile file, Activity activity) { public static void setText(TextView textView, String text, OCFile file, Activity activity) {

View file

@ -147,8 +147,8 @@ public class PreviewTextStringFragment extends PreviewTextFragment {
mTextPreview.setVisibility(View.VISIBLE); mTextPreview.setVisibility(View.VISIBLE);
} }
if (mMultiView != null) { if (mMultiListContainer != null) {
mMultiView.setVisibility(View.GONE); mMultiListContainer.setVisibility(View.GONE);
} }
} }

View file

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?><!--
<!--
Nextcloud Android client application Nextcloud Android client application
Copyright (C) 2016 Andy Scherzinger Copyright (C) 2016 Andy Scherzinger
@ -20,6 +19,7 @@
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/empty_list_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
@ -28,23 +28,13 @@
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="@dimen/standard_double_margin"> android:paddingBottom="@dimen/standard_double_margin">
<!-- This can be removed once we switched to view data implementation -->
<LinearLayout
android:id="@+id/empty_list_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="@dimen/standard_margin"
android:gravity="center_vertical|center_horizontal"
android:orientation="vertical">
<ImageView <ImageView
android:id="@+id/empty_list_icon" android:id="@+id/empty_list_icon"
android:layout_width="@dimen/empty_list_icon_layout_width" android:layout_width="@dimen/empty_list_icon_layout_width"
android:layout_height="@dimen/empty_list_icon_layout_height" android:layout_height="@dimen/empty_list_icon_layout_height"
android:contentDescription="@string/file_list_folder" android:contentDescription="@string/file_list_folder"
android:src="@drawable/ic_list_empty_folder" android:src="@drawable/ic_list_empty_folder"
android:visibility="gone"/> android:visibility="gone" />
<ProgressBar <ProgressBar
android:id="@+id/empty_list_progress" android:id="@+id/empty_list_progress"
@ -60,8 +50,8 @@
android:ellipsize="end" android:ellipsize="end"
android:gravity="center" android:gravity="center"
android:maxLines="2" android:maxLines="2"
android:paddingBottom="@dimen/standard_half_padding"
android:paddingTop="@dimen/standard_padding" android:paddingTop="@dimen/standard_padding"
android:paddingBottom="@dimen/standard_half_padding"
android:text="@string/file_list_loading" android:text="@string/file_list_loading"
android:textSize="26sp" /> android:textSize="26sp" />
@ -75,15 +65,14 @@
android:paddingTop="@dimen/standard_half_padding" android:paddingTop="@dimen/standard_half_padding"
android:paddingBottom="@dimen/standard_half_padding" android:paddingBottom="@dimen/standard_half_padding"
android:text="@string/file_list_empty" android:text="@string/file_list_empty"
android:visibility="gone"/> android:visibility="gone" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/empty_list_view_action" android:id="@+id/empty_list_view_action"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:theme="@style/Button.Primary"
app:cornerRadius="@dimen/button_corner_radius"
android:layout_marginTop="@dimen/standard_half_margin" android:layout_marginTop="@dimen/standard_half_margin"
android:visibility="gone"/> android:theme="@style/Button.Primary"
</LinearLayout> android:visibility="gone"
app:cornerRadius="@dimen/button_corner_radius" />
</LinearLayout> </LinearLayout>

View file

@ -3,7 +3,7 @@
ownCloud Android client application ownCloud Android client application
Copyright (C) 2015 ownCloud Inc. Copyright (C) 2015 ownCloud Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2, it under the terms of the GNU General Public License version 2,
as published by the Free Software Foundation. as published by the Free Software Foundation.
@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
@ -65,24 +65,16 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_margin="@dimen/standard_margin" android:layout_margin="@dimen/standard_margin" />
/>
</RelativeLayout> </RelativeLayout>
<RelativeLayout <ScrollView
android:id="@+id/multi_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<ScrollView <include layout="@layout/empty_list" />
android:layout_width="match_parent" </ScrollView>
android:layout_height="match_parent">
<include layout="@layout/empty_list"/>
</ScrollView>
</RelativeLayout>
</RelativeLayout> </RelativeLayout>

View file

@ -15,7 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ListItemLayout" android:id="@+id/ListItemLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -25,82 +25,76 @@
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:orientation="vertical"> android:orientation="vertical">
<FrameLayout <com.elyeproj.loaderviewlibrary.LoaderImageView
android:id="@+id/thumbnail_shimmer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="match_parent"
android:layout_margin="@dimen/grid_image_icon_margin"
android:contentDescription="@null"
android:visibility="gone"
app:corners="6"
app:height_weight="0.6"
app:width_weight="0.4" />
<com.elyeproj.loaderviewlibrary.LoaderImageView <com.owncloud.android.ui.SquareImageView
android:id="@+id/thumbnail_shimmer" android:id="@+id/thumbnail"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_margin="@dimen/grid_image_icon_margin" android:contentDescription="@null"
android:contentDescription="@null" android:padding="@dimen/grid_image_icon_padding"
android:visibility="gone" android:scaleType="centerCrop"
app:corners="6" android:src="@drawable/folder" />
app:height_weight="0.6"
app:width_weight="0.4" />
<com.owncloud.android.ui.SquareImageView <ImageView
android:id="@+id/thumbnail" android:id="@+id/favorite_action"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:contentDescription="@null" android:layout_gravity="top|end"
android:padding="@dimen/grid_image_icon_padding" android:layout_margin="@dimen/standard_quarter_margin"
android:scaleType="centerCrop" android:contentDescription="@string/favorite_icon"
android:src="@drawable/folder" /> android:src="@drawable/favorite" />
<ImageView <ImageView
android:id="@+id/favorite_action" android:id="@+id/sharedIcon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="top|end" android:layout_gravity="top|end"
android:layout_margin="@dimen/standard_quarter_margin" android:layout_marginTop="@dimen/grid_image_shared_icon_layout_top_margin"
android:contentDescription="@string/favorite_icon" android:layout_marginEnd="@dimen/standard_quarter_margin"
android:src="@drawable/favorite"/> android:contentDescription="@string/shared_icon_shared_via_link"
android:src="@drawable/shared_via_link" />
<ImageView <ImageView
android:id="@+id/sharedIcon" android:id="@+id/unreadComments"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="top|end" android:layout_gravity="top|end"
android:layout_marginEnd="@dimen/standard_quarter_margin" android:layout_marginTop="@dimen/grid_image_shared_icon_layout_top_margin"
android:layout_marginTop="@dimen/grid_image_shared_icon_layout_top_margin" android:layout_marginEnd="@dimen/standard_quarter_margin"
android:contentDescription="@string/shared_icon_shared_via_link" android:clickable="true"
android:src="@drawable/shared_via_link" /> android:contentDescription="@string/unread_comments"
android:focusable="true"
android:src="@drawable/ic_comment_grid"
android:visibility="gone" />
<ImageView <ImageView
android:id="@+id/unreadComments" android:id="@+id/localFileIndicator"
android:layout_width="wrap_content" android:layout_width="@dimen/grid_image_local_file_indicator_layout_width"
android:layout_height="wrap_content" android:layout_height="@dimen/grid_image_local_file_indicator_layout_height"
android:layout_gravity="top|end" android:layout_gravity="bottom|end"
android:layout_marginEnd="@dimen/standard_quarter_margin" android:layout_marginTop="@dimen/standard_quarter_margin"
android:layout_marginTop="@dimen/grid_image_shared_icon_layout_top_margin" android:layout_marginEnd="@dimen/standard_quarter_margin"
android:clickable="true" android:layout_marginBottom="@dimen/standard_quarter_margin"
android:contentDescription="@string/unread_comments" android:contentDescription="@string/synced_icon"
android:focusable="true" android:src="@drawable/ic_synced" />
android:src="@drawable/ic_comment_grid"
android:visibility="gone" />
<ImageView <ImageView
android:id="@+id/localFileIndicator" android:id="@+id/custom_checkbox"
android:layout_width="@dimen/grid_image_local_file_indicator_layout_width" android:layout_width="wrap_content"
android:layout_height="@dimen/grid_image_local_file_indicator_layout_height" android:layout_height="wrap_content"
android:layout_gravity="bottom|end" android:layout_gravity="center_vertical|top"
android:layout_marginBottom="@dimen/standard_quarter_margin" android:layout_marginLeft="@dimen/standard_quarter_margin"
android:layout_marginEnd="@dimen/standard_quarter_margin" android:layout_marginRight="@dimen/standard_quarter_margin"
android:layout_marginTop="@dimen/standard_quarter_margin" android:contentDescription="@string/checkbox"
android:contentDescription="@string/synced_icon" android:src="@android:drawable/checkbox_off_background" />
android:src="@drawable/ic_synced" /> </FrameLayout>
<ImageView
android:id="@+id/custom_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|top"
android:layout_marginLeft="@dimen/standard_quarter_margin"
android:layout_marginRight="@dimen/standard_quarter_margin"
android:contentDescription="@string/checkbox"
android:src="@android:drawable/checkbox_off_background" />
</FrameLayout>
</LinearLayout>

View file

@ -34,20 +34,11 @@
android:contentDescription="@string/preview_image_description" android:contentDescription="@string/preview_image_description"
android:src="@drawable/image_fail" /> android:src="@drawable/image_fail" />
<ScrollView
<RelativeLayout
android:id="@+id/multi_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<ScrollView <include layout="@layout/empty_list" />
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/empty_list"/>
</ScrollView>
</RelativeLayout>
</ScrollView>
</RelativeLayout> </RelativeLayout>

View file

@ -39,22 +39,15 @@
android:visibility="gone" android:visibility="gone"
tools:visibility="visible" tools:visibility="visible"
tools:maxLength="40" tools:maxLength="40"
tools:text="@tools:sample/lorem/random"/> tools:text="@tools:sample/lorem/random" />
<RelativeLayout <ScrollView
android:id="@+id/multi_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<ScrollView <include layout="@layout/empty_list" />
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/empty_list" />
</ScrollView>
</RelativeLayout>
</ScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
</ScrollView> </ScrollView>