How to disable the first page of pageadapter be displayed automatically? [closed]










1















I found even if I dont invoke FragmentPageAdaper.setCurrentItem(0), the first page in adapter displays all the same.



For now, I created a empty page instead, to be displayed as the first page. It works, but I still wonder if there's a way to disable the first page be displayed automatically when activity's created.
ps. Sorry for my English.










share|improve this question













closed as too broad by Book Of Zeus, Unheilig, Shiladitya, Billal Begueradj, V-rund Puro-hit Nov 15 '18 at 7:15


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


















  • you don't want to display first page, so what do you want to do?

    – navylover
    Nov 15 '18 at 2:33











  • leave the place empty, until I need to display one of the pages.

    – thousands_sun
    Nov 15 '18 at 2:38















1















I found even if I dont invoke FragmentPageAdaper.setCurrentItem(0), the first page in adapter displays all the same.



For now, I created a empty page instead, to be displayed as the first page. It works, but I still wonder if there's a way to disable the first page be displayed automatically when activity's created.
ps. Sorry for my English.










share|improve this question













closed as too broad by Book Of Zeus, Unheilig, Shiladitya, Billal Begueradj, V-rund Puro-hit Nov 15 '18 at 7:15


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


















  • you don't want to display first page, so what do you want to do?

    – navylover
    Nov 15 '18 at 2:33











  • leave the place empty, until I need to display one of the pages.

    – thousands_sun
    Nov 15 '18 at 2:38













1












1








1








I found even if I dont invoke FragmentPageAdaper.setCurrentItem(0), the first page in adapter displays all the same.



For now, I created a empty page instead, to be displayed as the first page. It works, but I still wonder if there's a way to disable the first page be displayed automatically when activity's created.
ps. Sorry for my English.










share|improve this question














I found even if I dont invoke FragmentPageAdaper.setCurrentItem(0), the first page in adapter displays all the same.



For now, I created a empty page instead, to be displayed as the first page. It works, but I still wonder if there's a way to disable the first page be displayed automatically when activity's created.
ps. Sorry for my English.







java android fragment






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 15 '18 at 2:24









thousands_sunthousands_sun

82




82




closed as too broad by Book Of Zeus, Unheilig, Shiladitya, Billal Begueradj, V-rund Puro-hit Nov 15 '18 at 7:15


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









closed as too broad by Book Of Zeus, Unheilig, Shiladitya, Billal Begueradj, V-rund Puro-hit Nov 15 '18 at 7:15


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • you don't want to display first page, so what do you want to do?

    – navylover
    Nov 15 '18 at 2:33











  • leave the place empty, until I need to display one of the pages.

    – thousands_sun
    Nov 15 '18 at 2:38

















  • you don't want to display first page, so what do you want to do?

    – navylover
    Nov 15 '18 at 2:33











  • leave the place empty, until I need to display one of the pages.

    – thousands_sun
    Nov 15 '18 at 2:38
















you don't want to display first page, so what do you want to do?

– navylover
Nov 15 '18 at 2:33





you don't want to display first page, so what do you want to do?

– navylover
Nov 15 '18 at 2:33













leave the place empty, until I need to display one of the pages.

– thousands_sun
Nov 15 '18 at 2:38





leave the place empty, until I need to display one of the pages.

– thousands_sun
Nov 15 '18 at 2:38












1 Answer
1






active

oldest

votes


















0














You could set the initial visibility state of the view pager as VIEW.GONE using:



android:visibility="gone"


and when condition meet, you change the visibility:



yourViewPager.setVisibility(View.VISIBLE);





share|improve this answer























  • yeah, it's another solution I have tried. I just wonder if there is a real 'manual mode' in pagerAdapter view.

    – thousands_sun
    Nov 15 '18 at 2:54

















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














You could set the initial visibility state of the view pager as VIEW.GONE using:



android:visibility="gone"


and when condition meet, you change the visibility:



yourViewPager.setVisibility(View.VISIBLE);





share|improve this answer























  • yeah, it's another solution I have tried. I just wonder if there is a real 'manual mode' in pagerAdapter view.

    – thousands_sun
    Nov 15 '18 at 2:54















0














You could set the initial visibility state of the view pager as VIEW.GONE using:



android:visibility="gone"


and when condition meet, you change the visibility:



yourViewPager.setVisibility(View.VISIBLE);





share|improve this answer























  • yeah, it's another solution I have tried. I just wonder if there is a real 'manual mode' in pagerAdapter view.

    – thousands_sun
    Nov 15 '18 at 2:54













0












0








0







You could set the initial visibility state of the view pager as VIEW.GONE using:



android:visibility="gone"


and when condition meet, you change the visibility:



yourViewPager.setVisibility(View.VISIBLE);





share|improve this answer













You could set the initial visibility state of the view pager as VIEW.GONE using:



android:visibility="gone"


and when condition meet, you change the visibility:



yourViewPager.setVisibility(View.VISIBLE);






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 15 '18 at 2:45









navylovernavylover

3,51531119




3,51531119












  • yeah, it's another solution I have tried. I just wonder if there is a real 'manual mode' in pagerAdapter view.

    – thousands_sun
    Nov 15 '18 at 2:54

















  • yeah, it's another solution I have tried. I just wonder if there is a real 'manual mode' in pagerAdapter view.

    – thousands_sun
    Nov 15 '18 at 2:54
















yeah, it's another solution I have tried. I just wonder if there is a real 'manual mode' in pagerAdapter view.

– thousands_sun
Nov 15 '18 at 2:54





yeah, it's another solution I have tried. I just wonder if there is a real 'manual mode' in pagerAdapter view.

– thousands_sun
Nov 15 '18 at 2:54





這個網誌中的熱門文章

How to read a connectionString WITH PROVIDER in .NET Core?

Museum of Modern and Contemporary Art of Trento and Rovereto

In R, how to develop a multiplot heatmap.2 figure showing key labels successfully