farrukh
farrukh

Reputation: 627

View Pager Current View Selection

I am using view pager in my application i have a jump to feature in my application the user can jump to the desired page by selecting some index of grid view.

I have no idea which method of view pager will select the desired page like in tab host we have a method for this

TabHost.setCurrentTab(tabindex);

i need some thing like this

Upvotes: 0

Views: 66

Answers (1)

SKK
SKK

Reputation: 5271

Try this:

pager.setCurrentItem(Integer.parseInt(jumpTo_ET.getText().toString())-1);

//pager is your View Pager Object and 
//jumpTo_ET is the EditText object from which you are getting the page index to navigate.

Upvotes: 1

Related Questions