1

Suppose I have activity A and B and from activity A on click of a button we can go to activity B . But what I want is that after clicking the button, 20%(right side) of activity A is still visible on screen and 100% of activity B is visible so that total screen is divided into 20% for activity A and 80% for activity B.When I click anywhere on 20% of visible A activity, I should be able to go to activity A. How can I achieve this in android .

black jack
  • 55
  • 1
  • 2
  • 8

2 Answers2

2

Activity is full screen. What you need is an activity with 2 fragments.

yoah
  • 7,180
  • 2
  • 30
  • 30
2

From what I understand, you need something like sliding menu.

I would suggest you take a look into this lib project
android-sliding-layer-lib

here is a demo of what this project does: DEMO APP LINK

Sathya
  • 678
  • 4
  • 12