How to disable the first page of pageadapter be displayed automatically? [closed]
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
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.
add a comment |
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
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
add a comment |
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
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
java android fragment
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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);
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
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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);
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
add a comment |
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);
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
add a comment |
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);
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);
answered Nov 15 '18 at 2:45
navylovernavylover
3,50031119
3,50031119
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
add a comment |
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
add a comment |
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