-1

Split page in Android, I need to slide the second page on top of another.

Layout 1 covering 80% of the page to the left. Layout 2 showing on the rest of the 20%. to the right.

Then I need to drag/slide layout 2 on top of layout 1 and the slide it back.

I have tried this, but I don't know how to configure this for my requirement?

What I Really need is shown in below as screenshots

OnLoad

enter image description here

After Slide

enter image description here

Slide Back

enter image description here

Shamnad P S
  • 1,095
  • 2
  • 15
  • 43

2 Answers2

1

I think you need SlidingPaneLayout, like google Hangouts app. It works what you want. Documentation here http://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.html

Alexander Mikhaylov
  • 1,790
  • 1
  • 13
  • 23
  • I have updated the question with my requirement screenshots. Please take a look at it and help me achieve it. I am new to android. – Shamnad P S May 16 '14 at 03:08
  • If you're new, it's an opportunity to learn. Read the Documentation – SQLiteNoob May 16 '14 at 03:28
  • @SQLiteNoob I had read all the documentation, I am able to scroll the views. but not able to get what i need. please check the screenshots. What i need on Onload on what i need on scroll and what i need after scroll back – Shamnad P S May 16 '14 at 05:14
1

You can like this. try

<FrameLayout
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:background="#D6FFD6"
          xmlns:android="http://schemas.android.com/apk/res/android">
         <ImageView
                     android:src="@drawable/android"
                     android:scaleType="fitCenter"
                     android:layout_height="fill_parent"
                     android:layout_width="fill_parent"/>
         <TextView
                      android:text="learnandroideasily.blogspot.com"
                      android:textSize="30sp"
                      android:textStyle="bold"
                      android:textColor="#003399"
                      android:layout_height="fill_parent"
                      android:layout_width="fill_parent"
                      android:gravity="center"/>
</FrameLayout>

Also you can follow 3 tutorial site. where easily explain frame layout of android. such as

number #1 Frame Layout In Android

number #2 Android User Interface Design: Frame Layouts

and finally number #3 Android Frame Layout

kablu
  • 629
  • 1
  • 7
  • 26