• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Explanation onAttach() of Fragment class in Android
 

Explanation onAttach() of Fragment class in Android

on

  • 2,580 views

Explanation onAttach() of Fragment class in Android

Explanation onAttach() of Fragment class in Android

Statistics

Views

Total Views
2,580
Views on SlideShare
2,580
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Explanation onAttach() of Fragment class in Android Explanation onAttach() of Fragment class in Android Presentation Transcript

    • FRAGMENT FragmentActivity Fragment (Explain onAttach() in Fragment) Author: hungtdo 14/12/2013
    • Fragment • Supported in android-support-v4.jar • Fragment native same use v4 lib
    • Fragment Flow onAttach() onCreate() onCreateView() onActivityCreated()
    • Explain onAttach() in Fragment
    • Explain onAttach() in Fragment In FragmentActivity (in native code) -> With (mFragments : FragmentManagerImpl instance) + Native attachActivity in FragmentManagerImpl class: -> This method only set values to global variable of local class to used in methods
    • Explain onAttach() in Fragment  Then, in this "FragmentManagerImpl" class, method Fragment.onAttach(this.mActivity); is called with "this.mActivity- fragmentActivity" is parameter.  Same time this.mActivity.onAttachFragment(f); is called to notify for FragmentActivity fragment is attached
    • Author: HUNGTDO (a.k.a yuchi_1k91) Tools: Java decompiler Lib: android-support-v4.jar