StevenRudenko / ActionsContentView

ActionsContentView is an standalone library implements actions/content swiping view (AKA Side Navigation UI Pattern, AKA Facebook side menu). The library doesn't use any specific code introduced in new Android SDK versions. This allows develop an application with an action/content swiping view for every version of Android from 2.2 and up.
https://play.google.com/store/apps/details?id=sample.actionscontentview
442 stars 179 forks source link

Sliding menu with fragmentactivity #27

Closed z5947878 closed 11 years ago

z5947878 commented 11 years ago

Hi!

How should I coding about sliding menu with fragmentactivity without change page like facebook?

your code have what I thought, but that is fragment.

Your fragmentactivity will change the page, but fragment won't.

So, how should I do like fragment won't change the page? Cuz my code is fragmentactivity.

I mean call a different fragmentactivity in one activity from slidemenu..

StevenRudenko commented 11 years ago

Hello,

If you want switch to another activity by actions menu click you need make next changes: 1) Create Base activity that would handle switching by actions menu click. It should have ActionsContentView. You can create abstract method to get content layout id and set it to ActionContentView while activity onCreate. 2) Base activity should remove (override) animation while switching to new activity so user will not notice activity switching. 3) newly opened activity should have actions menu opened on start and launch hide it when become visible at first time. it would emulate closing of actions at place. 4) Extend all your activities from Base one.

Sorry I have no time to create example for you. Probably I will have some on weekend. Anyway now you have way to make it real.

Regards, Steven

z5947878 commented 11 years ago

thx man, but I can not image It. looks like very complexity lol

StevenRudenko commented 11 years ago

well, keeping everything as activity view instead of fragments makes any solution not flexible. better way move your code fragments but it can take more time. :)

z5947878 commented 11 years ago

alrite

z5947878 commented 11 years ago

back to the point. does slide menu need to keep it as activity intead of fragment?

StevenRudenko commented 11 years ago

sorry I don't get. what does slide menu need to keep? you can use ActionContentView in any layout. it is just a custom view. your questions was about: can one activity include another one inside itself. Answer is NO. It is not possible and seems never become possible.

z5947878 commented 11 years ago

okay thx body

z5947878 commented 11 years ago

well can I ask for another question? I wanna put my customized title bar in evey fragment. How should I do? And off course It can call out the actioncontentview.

StevenRudenko commented 11 years ago

I think you need create BaseFragment which will handle everything about action bar and extend all other from it.

z5947878 commented 11 years ago

Okay I'll try it