Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstefan-niedermann <info@niedermann.it>2019-10-19 16:27:25 +0300
committerstefan-niedermann <info@niedermann.it>2019-10-19 16:27:25 +0300
commit2f71fc97bf8f42b53ef53672c55f7cc3d6704820 (patch)
treeae9f362ee5e94d05239978725c1405c57a4d6b45 /app/src/main/res
parentf70a606b2ef0ba62cdf8baee132649f1ce7a1356 (diff)
Move scrollToRefresh to MainActivity
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/activity_main.xml17
-rw-r--r--app/src/main/res/layout/fragment_stack.xml96
2 files changed, 56 insertions, 57 deletions
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 005a6525c..087b3c9bd 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -52,10 +52,21 @@
android:text="@string/add_a_new_column_using_the_three_dots_menu" />
</RelativeLayout>
- <androidx.viewpager.widget.ViewPager
- android:id="@+id/viewPager"
+
+ <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
+ android:id="@+id/swipe_refresh_layout"
android:layout_width="match_parent"
- android:layout_height="match_parent" />
+ android:layout_height="wrap_content"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent">
+
+ <androidx.viewpager.widget.ViewPager
+ android:id="@+id/viewPager"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+ </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.appbar.AppBarLayout
diff --git a/app/src/main/res/layout/fragment_stack.xml b/app/src/main/res/layout/fragment_stack.xml
index bb306706a..d1ffd2025 100644
--- a/app/src/main/res/layout/fragment_stack.xml
+++ b/app/src/main/res/layout/fragment_stack.xml
@@ -1,67 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
android:orientation="vertical">
- <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
- android:id="@+id/swipe_refresh_layout"
+ <RelativeLayout
+ android:id="@+id/no_cards"
android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="match_parent"
+ android:visibility="gone">
- <LinearLayout
+ <ImageView
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <RelativeLayout
- android:id="@+id/no_cards"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="gone">
-
- <ImageView
- android:layout_width="match_parent"
- android:layout_height="180dp"
- android:layout_above="@+id/no_cards_text"
- android:layout_gravity="center"
- android:layout_marginBottom="-40dp"
- android:contentDescription="@null"
- android:tint="@color/fg_secondary"
- app:srcCompat="@drawable/ic_launcher_foreground" />
+ android:layout_height="180dp"
+ android:layout_above="@+id/no_cards_text"
+ android:layout_gravity="center"
+ android:layout_marginBottom="-40dp"
+ android:contentDescription="@null"
+ android:tint="@color/fg_secondary"
+ app:srcCompat="@drawable/ic_launcher_foreground" />
- <TextView
- android:id="@+id/no_cards_text"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:gravity="center"
- android:paddingBottom="16dp"
- android:text="@string/no_cards"
- android:textAlignment="center"
- android:textSize="@dimen/empty_content_font_size" />
+ <TextView
+ android:id="@+id/no_cards_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
+ android:gravity="center"
+ android:paddingBottom="16dp"
+ android:text="@string/no_cards"
+ android:textAlignment="center"
+ android:textSize="@dimen/empty_content_font_size" />
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/no_cards_text"
- android:layout_centerHorizontal="true"
- android:text="@string/add_a_new_card_using_the_button" />
- </RelativeLayout>
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/no_cards_text"
+ android:layout_centerHorizontal="true"
+ android:text="@string/add_a_new_card_using_the_button" />
+ </RelativeLayout>
- <androidx.recyclerview.widget.RecyclerView
- android:id="@+id/recycler_view"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:clipToPadding="false"
- android:paddingTop="@dimen/standard_half_padding"
- android:paddingBottom="@dimen/standard_half_padding"
- android:scrollbarStyle="outsideOverlay"
- android:scrollbars="vertical"
- app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
- tools:listitem="@layout/item_card" />
- </LinearLayout>
- </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/recycler_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:clipToPadding="false"
+ android:paddingTop="@dimen/standard_half_padding"
+ android:paddingBottom="@dimen/standard_half_padding"
+ android:scrollbarStyle="outsideOverlay"
+ android:scrollbars="vertical"
+ app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
+ tools:listitem="@layout/item_card" />
</LinearLayout> \ No newline at end of file