Discussion Board

Results 1 to 8 of 8

Thread: View changing

  1. #1
    Regular Contributor ckt's Avatar
    Join Date
    Sep 2006
    Posts
    54
    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
    Nokia Developer Moderator skumar_rao's Avatar
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968
    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 Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,712
    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 ckt's Avatar
    Join Date
    Sep 2006
    Posts
    54
    Thanks skumar,
    how do you save the view point? Any sample coding?

    Regards,
    ckt

  5. #5
    Regular Contributor ckt's Avatar
    Join Date
    Sep 2006
    Posts
    54
    Hi symbianyucca,
    mind if you show me the links. I could not find it. Thanks

    Regards,
    ckt

  6. #6
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,712
    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 amitkankani's Avatar
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572
    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 ckt's Avatar
    Join Date
    Sep 2006
    Posts
    54
    Hey guys thks for the suggestions. I got it working....
    Many Thanks

    Regards,
    ckt

Similar Threads

  1. Display CAknConfirmationNote after view changing
    By bernie31 in forum Symbian C++
    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 C++
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved