×

Discussion Board

Results 1 to 8 of 8

Thread: View changing

  1. #1
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    54

    View changing

    Hi all,
    I would like to know if it is possible to return back to previous view.
    I have got a view(lets say view A) with a back button with it. Upon the click of this button, it is supposed to return back to the previous view it came from.
    For example,
    View B to view A then
    click back
    view A switch back to view B then
    View C to view A then
    click back
    view A back to view C
    Basically, is it possible to store the previous view visited?

    Thanks

    Regards
    ckt

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: View changing

    Yes It Is possible to Go back to Previously Visited View. You have to save the View Point if you have to Do so.

  3. #3
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144

    Re: View changing

    Basically you can get the previous view while your CAknView bases view is activated (see SDK docs for DoActivaL, and its aPrevViewId-argument variable).

    For CCoeControl based views, you could always implement your own logic for saving the last views information.

    yucca

  4. #4
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    54

    Re: View changing

    Thanks skumar,
    how do you save the view point? Any sample coding?

    Regards,
    ckt

  5. #5
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    54

    Re: View changing

    Hi symbianyucca,
    mind if you show me the links. I could not find it. Thanks

    Regards,
    ckt

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144

    Re: View changing

    No links required, just open the SDK help (its installed same time with your SDK), and locate "CAknView Class Reference"

    yucca

  7. #7
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: View changing

    if it is a view based architecture, then you can do it this way:

    Every view has a id and u can call a switch view by passing the id.

    Now if you store a variable say in appui or ur engine class, you can store the prev view id there and call switch view with this id.
    the type of variable is : TUid
    You can get the id by calling view->Id()


    hope this helps
    Amit Kankani
    Nokia Developer Champion

  8. #8
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    54

    Re: View changing

    Hey guys thks for the suggestions. I got it working....
    Many Thanks

    Regards,
    ckt

Similar Threads

  1. Replies: 6
    Last Post: 2008-05-07, 14:38
  2. Changing To Avkon View Switching
    By NigelT in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 0
    Last Post: 2006-12-12, 23:26
  3. Trigger event after view is Activated?
    By inc0gn1t007 in forum Symbian
    Replies: 0
    Last Post: 2006-03-29, 02:55
  4. Replies: 1
    Last Post: 2005-10-17, 04:23
  5. Status pane not drawn when changing from one view to another
    By cafernan in forum Symbian User Interface
    Replies: 1
    Last Post: 2002-09-27, 14:07

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •