0

I want my layout as:
An ImageView on top, then Swipe Tabs.

I created a Tabbed Activity; in it's activity.xml file there's a tag

<android.support.v4.view.ViewPager />

with its attributes.
I tried to put this tag inside a linear layout i.e.

LinearLayout
   ImageView
   <android.support.v4.view.ViewPager />

but the ImageView goes inside all the fragments.

Instead, I want it to be on top.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Text" />

<android.support.v4.view.ViewPager
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/pager"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="packageName" />

Please help, Thanks in advance.

Developer110
  • 182
  • 7

0 Answers0