[SOLVED]
========

I'm trying to follow [this turorial](https://thepseudocoder.wordpress.com/2011/10/05/android-page-swiping-using-viewpager/) to get a ViewPager on my Wearable application. However, when I try to assign the ViewPager in my XML to a variable, it only recognises it as a "View", and not as a ViewPager. This gives me the error below: 

[![Error](https://i.stack.imgur.com/saX1X.png)](https://i.stack.imgur.com/saX1X.png)

When checking other tutorials, none of them seem to have this issue. They can all easily assign their ViewPager to their variable...

**viewpager.xml**

```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

        <android.support.v4.view.ViewPager
        android:id="@+id/viewpager_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
            />

</LinearLayout>

```

**ViewPager.java**

```
/*
*
* VIEWPAGER TUTORIAL
* https://thepseudocoder.wordpress.com/2011/10/05/android-page-swiping-using-viewpager/
* door the pseudocoder
* */
public class ViewPager extends FragmentActivity {

    private PagerAdapter pagerAdapter;

    /* (non-Javadoc)
      * @see android.support.v4.app.FragmentActivity#onCreate(android.os.Bundle)
      */
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.setContentView(R.layout.viewpager);
        //initialsie the pager
        this.initialisePaging();
    }

    /**
     * Initialise the fragments to be paged
     */
    private void initialisePaging() {

        List<Fragment> fragments = new Vector<Fragment>();
        fragments.add(Fragment.instantiate(this, Monitor.class.getName()));
        fragments.add(Fragment.instantiate(this, CurrentSongOverviewWear.class.getName()));
        this.pagerAdapter  = new MyPagerAdapter(super.getSupportFragmentManager(), fragments);

        ViewPager pager = (ViewPager) super.findViewById(R.id.viewpager_container);
        pager.setAdapter(this.pagerAdapter);
    }

}

```

It is this line in initialisePaging() that gives me the error:

```
ViewPager pager = (ViewPager) super.findViewById(R.id.viewpager_container);

```