Commit 749ea3f3 authored by fallenstardust's avatar fallenstardust

卡组广场翻页、转到页时自动回到顶部

parent 9ad0e5ab
...@@ -56,6 +56,7 @@ public class DeckSquareFragment extends Fragment { ...@@ -56,6 +56,7 @@ public class DeckSquareFragment extends Fragment {
binding.etGoToPage.setText(Integer.toString(targetPage)); binding.etGoToPage.setText(Integer.toString(targetPage));
deckSquareListAdapter.loadData(targetPage, 30); deckSquareListAdapter.loadData(targetPage, 30);
binding.listDeckInfo.scrollToPosition(0);
return true; return true;
} }
return false; return false;
...@@ -73,6 +74,7 @@ public class DeckSquareFragment extends Fragment { ...@@ -73,6 +74,7 @@ public class DeckSquareFragment extends Fragment {
deckSquareListAdapter.loadData(newPage, 30); deckSquareListAdapter.loadData(newPage, 30);
binding.etGoToPage.setText(Integer.toString(newPage)); binding.etGoToPage.setText(Integer.toString(newPage));
binding.listDeckInfo.scrollToPosition(0);
} }
}); });
...@@ -91,7 +93,7 @@ public class DeckSquareFragment extends Fragment { ...@@ -91,7 +93,7 @@ public class DeckSquareFragment extends Fragment {
} }
deckSquareListAdapter.loadData(newPage, 30); deckSquareListAdapter.loadData(newPage, 30);
binding.etGoToPage.setText(Integer.toString(newPage)); binding.etGoToPage.setText(Integer.toString(newPage));
binding.listDeckInfo.scrollToPosition(0);
} }
}); });
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
android:id="@+id/deck_info_image" android:id="@+id/deck_info_image"
android:layout_width="75dp" android:layout_width="75dp"
android:layout_height="107dp" android:layout_height="107dp"
android:layout_marginLeft="19dp" android:layout_marginLeft="18dp"
android:layout_marginTop="13dp" android:layout_marginTop="13dp"
android:src="@drawable/unknown" /> android:src="@drawable/unknown" />
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
android:id="@+id/deck_info_image" android:id="@+id/deck_info_image"
android:layout_width="75dp" android:layout_width="75dp"
android:layout_height="107dp" android:layout_height="107dp"
android:layout_marginLeft="19dp" android:layout_marginLeft="18dp"
android:layout_marginTop="13dp" android:layout_marginTop="13dp"
android:src="@drawable/unknown" /> android:src="@drawable/unknown" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment