mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 15:15:51 +03:00
Make empty list views scrollable
This will prevent them from being cut when vertical space is not enough, for example in landscape mode Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
parent
9445a6c3e3
commit
73cc4aa4f3
4 changed files with 56 additions and 51 deletions
Binary file not shown.
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
@ -124,7 +124,7 @@ public class ExtendedListFragment extends Fragment implements
|
|||
protected SwipeRefreshLayout mRefreshListLayout;
|
||||
protected MaterialButton mSortButton;
|
||||
protected MaterialButton mSwitchGridViewButton;
|
||||
protected LinearLayout mEmptyListContainer;
|
||||
protected ViewGroup mEmptyListContainer;
|
||||
protected TextView mEmptyListMessage;
|
||||
protected TextView mEmptyListHeadline;
|
||||
protected ImageView mEmptyListIcon;
|
||||
|
|
|
@ -119,7 +119,7 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
|
|||
@Inject ClientFactory clientFactory;
|
||||
@Inject UserAccountManager accountManager;
|
||||
FragmentPreviewMediaBinding binding;
|
||||
LinearLayout emptyListView;
|
||||
private ViewGroup emptyListView;
|
||||
private ExoPlayer exoPlayer;
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,60 +17,65 @@
|
|||
You should have received a copy of the GNU Affero General Public
|
||||
License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/empty_list_view"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/empty_list_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="@dimen/standard_margin"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/standard_double_margin">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/empty_list_icon"
|
||||
android:layout_width="@dimen/empty_list_icon_layout_width"
|
||||
android:layout_height="@dimen/empty_list_icon_layout_height"
|
||||
android:contentDescription="@string/file_list_folder"
|
||||
android:src="@drawable/ic_list_empty_folder"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/empty_list_view_headline"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"
|
||||
android:paddingTop="@dimen/standard_padding"
|
||||
android:paddingBottom="@dimen/standard_half_padding"
|
||||
android:text="@string/file_list_loading"
|
||||
android:textSize="26sp" />
|
||||
android:layout_gravity="top"
|
||||
android:layout_margin="@dimen/standard_margin"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/standard_double_margin">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/empty_list_view_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:paddingTop="@dimen/standard_half_padding"
|
||||
android:paddingBottom="@dimen/standard_half_padding"
|
||||
android:text="@string/file_list_empty"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
<ImageView
|
||||
android:id="@+id/empty_list_icon"
|
||||
android:layout_width="@dimen/empty_list_icon_layout_width"
|
||||
android:layout_height="@dimen/empty_list_icon_layout_height"
|
||||
android:contentDescription="@string/file_list_folder"
|
||||
android:src="@drawable/ic_list_empty_folder"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/empty_list_view_action"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_half_margin"
|
||||
android:theme="@style/Button.Primary"
|
||||
android:visibility="gone"
|
||||
app:cornerRadius="@dimen/button_corner_radius"
|
||||
tools:visibility="visible" />
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/empty_list_view_headline"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"
|
||||
android:paddingTop="@dimen/standard_padding"
|
||||
android:paddingBottom="@dimen/standard_half_padding"
|
||||
android:text="@string/file_list_loading"
|
||||
android:textSize="26sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/empty_list_view_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:paddingTop="@dimen/standard_half_padding"
|
||||
android:paddingBottom="@dimen/standard_half_padding"
|
||||
android:text="@string/file_list_empty"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/empty_list_view_action"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/standard_half_margin"
|
||||
android:theme="@style/Button.Primary"
|
||||
android:visibility="gone"
|
||||
app:cornerRadius="@dimen/button_corner_radius"
|
||||
tools:visibility="visible" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
|
Loading…
Reference in a new issue