Re: [android-developers] new Fragments

2011-06-19 Thread New Developer
To Dianne

Thank you for all your support

I have managed to get the fragment concept working

I call  show()
FragmentTransaction fMgr = getFragmentManager().beginTransaction();
fMgr.show(visitScreen); 
fMgr.commit();

And then when done I call hide()
FragmentTransaction fMgr = getFragmentManager().beginTransaction();
fMgr.hide(visitScreen);
fMgr.commit();


I just have a new problem  But When I recall the function with the .show()

06-19 15:17:50.720: WARN/InputManagerService(21637): Window already focused, 
ignoring focus gain of: 
com.android.internal.view.IInputMethodClient$Stub$Proxy@4169e988

and Do not see the  Fragment  ?  any ideas

Thanks again for everything




On Jun 19, 2011, at 1:40 AM, Dianne Hackborn wrote:

 Committing a fragment transaction is asynchronous.  You should let it run and 
 do its thing; don't call getView() outside of the fragment's own lifecycle.
 
 Have you tried any of the API demos?  There are lots of them.  I suggest 
 starting off with one of those known working demos, found here:
 
 http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/index.html
 
 On Sat, Jun 18, 2011 at 8:10 PM, New Developer secur...@isscp.com wrote:
 Here is what I have can you see something obvious
 
 in my MainActivity  I call the  Fragment using
 
 FragmentTransaction   fMgr  = getFragmentManager().beginTransaction();
 VisitMenu fragment  = new VisitMenu(); 
 fMgr.add(R.id.menu2, fragment);
 fMgr.commit();
   
 fMgr.show(fragment);
   
 Log.w(CHECK , Check  1 + fragment.getView()   );
 Log.w(CHECK , Check  2 + fragment.view);
 
 Both Check 1  and Check 2  return NULL
 
 My Fragment Has this
 
 public class VisitMenu extends Fragment {
   private  View  parent= null;
   public   View  view  = null;
   
   @Override
   public View onCreateView(LayoutInflater inflater, ViewGroup container, 
 Bundle bundle) {
   view  = inflater.inflate(R.layout.visit_menu, container, 
 false);
   parent= container;
   return view;
   }
 }
 
 and ideas welcome
 
 Thanks in advance
 
 
 
 On Jun 18, 2011, at 10:40 PM, New Developer wrote:
 
 I have the SDK Updater done  and installed the  Compatibility package
 
 When I putextends   FragmentActivity
 
 I still get  FragmentActivity cannot be resolved to a type
 
 With the offer to change to Fragment
 
 and ideas
 
 thanks again
 
 
 
 
 On Jun 18, 2011, at 1:11 AM, Dianne Hackborn wrote:
 
 Xav's blog post explains how to get the support library, which has 
 FragmentActivity, through the SDK updater:
 
 http://android-developers.blogspot.com/2011/03/fragments-for-all.html
 
 On Fri, Jun 17, 2011 at 8:16 PM, New Developer secur...@isscp.com wrote:
 Dianne
 Thanks  and yes is was your blogspot article at the bottom that refers to  
 FragmentActivity
 
 But I can not find this anywhere  and when I type it ,  it is unknown
 
 thanks again
 
 On Jun 17, 2011, at 7:57 PM, Dianne Hackborn wrote:
 
 Blog posts:
 
 http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html
 http://android-developers.blogspot.com/2011/03/fragments-for-all.html
 
 SDK documentation:
 
 http://developer.android.com/guide/topics/fundamentals/fragments.html
 http://developer.android.com/reference/android/app/Fragment.html
 
 I would suggest that for now you ignore the fragment tag; all it is, is 
 a convenience for doing certain things.  Learn how to directly use the 
 Fragment APIs and how those work with activities, and then once you are 
 done with those basic concepts you can throw in fragment layout tags.
 
 (I should probably adjust the Fragment java doc to reflect this approach 
 as well.)
 
 On Fri, Jun 17, 2011 at 4:42 PM, New Developer secur...@isscp.com wrote:
 Could someone please clarify the method in which to use fragment
 
 There is a Main Activity which has a  fragment  element within it's layout
 
 this fragment element is then loaded to a class the extends  Fragment
 But does the fragment class then have it's own activity ?  or
 how do you access the elements within the fragment ?
 For discussion let us say the fragment has a Button and EditText
 
 Under  a normal activity  you could access it with
 (Button) findViewbyId(R.id.button);   but when I put this into a fragment 
 extended class
 findViewById  gives an error ?
 
 Also there is one article on Fragment which has a FragmentActivity  or 
 ActivityFragment
 But I can not find this anywhere
 
 Thanks in advance
 
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 

Re: [android-developers] new Fragments

2011-06-19 Thread Dianne Hackborn
That log is just a warning, and unrelated fragments, and not causing such an
issue.

Let's still step back -- are you actually having a fragment displayed at
all?  Make sure you are actually getting it displayed before then trying to
hide and show it.  (And after adding a fragment starts out shown so there is
no reason to hide it unless you are doing some special specific stuff.)

On Sun, Jun 19, 2011 at 12:18 PM, New Developer secur...@isscp.com wrote:

 To Dianne

 Thank you for all your support

 I have managed to get the fragment concept working

 I call  show()
 FragmentTransaction fMgr = getFragmentManager().beginTransaction();
  fMgr.show(visitScreen);
  fMgr.commit();

 And then when done I call hide()
 FragmentTransaction fMgr = getFragmentManager().beginTransaction();
  fMgr.hide(visitScreen);
  fMgr.commit();


 I just have a new problem  But When I recall the function with the .show()

 06-19 15:17:50.720: WARN/InputManagerService(21637): Window already
 focused, ignoring focus gain of:
 com.android.internal.view.IInputMethodClient$Stub$Proxy@4169e988

 and Do not see the  Fragment  ?  any ideas

 Thanks again for everything




 On Jun 19, 2011, at 1:40 AM, Dianne Hackborn wrote:

 Committing a fragment transaction is asynchronous.  You should let it run
 and do its thing; don't call getView() outside of the fragment's own
 lifecycle.

 Have you tried any of the API demos?  There are lots of them.  I suggest
 starting off with one of those known working demos, found here:


 http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/index.html

 On Sat, Jun 18, 2011 at 8:10 PM, New Developer secur...@isscp.com wrote:

 Here is what I have can you see something obvious

 in my MainActivity  I call the  Fragment using

 FragmentTransaction   fMgr  = getFragmentManager().beginTransaction();
 VisitMenu fragment  = new VisitMenu();
 fMgr.add(R.id.menu2, fragment);
 fMgr.commit();

 fMgr.show(fragment);

 Log.w(CHECK , Check  1 + fragment.getView()
 );
 Log.w(CHECK , Check  2 + fragment.view
 );

 Both Check 1  and Check 2  return NULL

 My Fragment Has this

 public class VisitMenu extends Fragment {
  private  View  parent= null;
  public   View  view  = null;

  @Override
 public View onCreateView(LayoutInflater inflater, ViewGroup container,
 Bundle bundle) {
  view  = inflater.inflate(R.layout.visit_menu, container, false);
  parent= container;
  return view;
  }
 }

 and ideas welcome

 Thanks in advance



 On Jun 18, 2011, at 10:40 PM, New Developer wrote:

 I have the SDK Updater done  and installed the  Compatibility package

 When I putextends   FragmentActivity

 I still get  FragmentActivity cannot be resolved to a type

 With the offer to change to Fragment

 and ideas

 thanks again




 On Jun 18, 2011, at 1:11 AM, Dianne Hackborn wrote:

 Xav's blog post explains how to get the support library, which has
 FragmentActivity, through the SDK updater:

 http://android-developers.blogspot.com/2011/03/fragments-for-all.html

 On Fri, Jun 17, 2011 at 8:16 PM, New Developer secur...@isscp.comwrote:

 Dianne
 Thanks  and yes is was your blogspot article at the bottom that refers to
  FragmentActivity

 But I can not find this anywhere  and when I type it ,  it is unknown

 thanks again

 On Jun 17, 2011, at 7:57 PM, Dianne Hackborn wrote:

 Blog posts:


 http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html
 http://android-developers.blogspot.com/2011/03/fragments-for-all.html

 SDK documentation:

 http://developer.android.com/guide/topics/fundamentals/fragments.html
 http://developer.android.com/reference/android/app/Fragment.html

 I would suggest that for now you ignore the fragment tag; all it is, is
 a convenience for doing certain things.  Learn how to directly use the
 Fragment APIs and how those work with activities, and then once you are done
 with those basic concepts you can throw in fragment layout tags.

 (I should probably adjust the Fragment java doc to reflect this approach
 as well.)

 On Fri, Jun 17, 2011 at 4:42 PM, New Developer secur...@isscp.comwrote:

 Could someone please clarify the method in which to use fragment

 There is a Main Activity which has a  fragment  element within it's
 layout

 this fragment element is then loaded to a class the extends  Fragment
 But does the fragment class then have it's own activity ?  or
 how do you access the elements within the fragment ?
 For discussion let us say the fragment has a Button and EditText

 Under  a normal activity  you could access it with
 (Button) findViewbyId(R.id.button);   but when I put this into a
 fragment extended class
 findViewById  gives an error ?

 Also there is one article on Fragment which has a FragmentActivity  or
 ActivityFragment
 But I can not find this anywhere

 Thanks in advance

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to 

Re: [android-developers] new Fragments

2011-06-19 Thread New Developer
Thanks

Yes it is displaying (the first time)  then I hide it  so I can use that 
portion of the screen for other things
and then I try to go back an reshow it  But it gives the error and  then
  shows  nothing.

So it will show  and then hide  the first time around,   but will not show the 
second time around.

thanks again for all your help


On Jun 19, 2011, at 6:37 PM, Dianne Hackborn wrote:

 That log is just a warning, and unrelated fragments, and not causing such an 
 issue.
 
 Let's still step back -- are you actually having a fragment displayed at all? 
  Make sure you are actually getting it displayed before then trying to hide 
 and show it.  (And after adding a fragment starts out shown so there is no 
 reason to hide it unless you are doing some special specific stuff.)
 
 On Sun, Jun 19, 2011 at 12:18 PM, New Developer secur...@isscp.com wrote:
 To Dianne
 
 Thank you for all your support
 
 I have managed to get the fragment concept working
 
 I call  show()
   FragmentTransaction fMgr = getFragmentManager().beginTransaction();
   fMgr.show(visitScreen); 
   fMgr.commit();
 
 And then when done I call hide()
   FragmentTransaction fMgr = getFragmentManager().beginTransaction();
   fMgr.hide(visitScreen);
   fMgr.commit();
 
 
 I just have a new problem  But When I recall the function with the .show()
 
 06-19 15:17:50.720: WARN/InputManagerService(21637): Window already focused, 
 ignoring focus gain of: 
 com.android.internal.view.IInputMethodClient$Stub$Proxy@4169e988
 
 and Do not see the  Fragment  ?  any ideas
 
 Thanks again for everything
 
 
 
 
 On Jun 19, 2011, at 1:40 AM, Dianne Hackborn wrote:
 
 Committing a fragment transaction is asynchronous.  You should let it run 
 and do its thing; don't call getView() outside of the fragment's own 
 lifecycle.
 
 Have you tried any of the API demos?  There are lots of them.  I suggest 
 starting off with one of those known working demos, found here:
 
 http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/index.html
 
 On Sat, Jun 18, 2011 at 8:10 PM, New Developer secur...@isscp.com wrote:
 Here is what I have can you see something obvious
 
 in my MainActivity  I call the  Fragment using
 
 FragmentTransaction   fMgr  = getFragmentManager().beginTransaction();
 VisitMenu fragment  = new VisitMenu(); 
 fMgr.add(R.id.menu2, fragment);
 fMgr.commit();
  
 fMgr.show(fragment);
  
 Log.w(CHECK , Check  1 + fragment.getView()   );
 Log.w(CHECK , Check  2 + fragment.view);
 
 Both Check 1  and Check 2  return NULL
 
 My Fragment Has this
 
 public class VisitMenu extends Fragment {
  private  View  parent= null;
  public   View  view  = null;
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, 
 Bundle bundle) {
  view  = inflater.inflate(R.layout.visit_menu, container, 
 false);
  parent= container;
  return view;
  }
 }
 
 and ideas welcome
 
 Thanks in advance
 
 
 
 On Jun 18, 2011, at 10:40 PM, New Developer wrote:
 
 I have the SDK Updater done  and installed the  Compatibility package
 
 When I putextends   FragmentActivity
 
 I still get  FragmentActivity cannot be resolved to a type
 
 With the offer to change to Fragment
 
 and ideas
 
 thanks again
 
 
 
 
 On Jun 18, 2011, at 1:11 AM, Dianne Hackborn wrote:
 
 Xav's blog post explains how to get the support library, which has 
 FragmentActivity, through the SDK updater:
 
 http://android-developers.blogspot.com/2011/03/fragments-for-all.html
 
 On Fri, Jun 17, 2011 at 8:16 PM, New Developer secur...@isscp.com wrote:
 Dianne
 Thanks  and yes is was your blogspot article at the bottom that refers to  
 FragmentActivity
 
 But I can not find this anywhere  and when I type it ,  it is unknown
 
 thanks again
 
 On Jun 17, 2011, at 7:57 PM, Dianne Hackborn wrote:
 
 Blog posts:
 
 http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html
 http://android-developers.blogspot.com/2011/03/fragments-for-all.html
 
 SDK documentation:
 
 http://developer.android.com/guide/topics/fundamentals/fragments.html
 http://developer.android.com/reference/android/app/Fragment.html
 
 I would suggest that for now you ignore the fragment tag; all it is, is 
 a convenience for doing certain things.  Learn how to directly use the 
 Fragment APIs and how those work with activities, and then once you are 
 done with those basic concepts you can throw in fragment layout tags.
 
 (I should probably adjust the Fragment java doc to reflect this approach 
 as well.)
 
 On Fri, Jun 17, 2011 at 4:42 PM, New Developer secur...@isscp.com wrote:
 Could someone please clarify the method in which to use fragment
 
 There is a Main Activity which has a  fragment  element within it's 
 layout
 
 this fragment element is then loaded to a 

Re: [android-developers] new Fragments

2011-06-18 Thread New Developer
I have the SDK Updater done  and installed the  Compatibility package

When I putextends   FragmentActivity

I still get  FragmentActivity cannot be resolved to a type

With the offer to change to Fragment

and ideas

thanks again




On Jun 18, 2011, at 1:11 AM, Dianne Hackborn wrote:

 Xav's blog post explains how to get the support library, which has 
 FragmentActivity, through the SDK updater:
 
 http://android-developers.blogspot.com/2011/03/fragments-for-all.html
 
 On Fri, Jun 17, 2011 at 8:16 PM, New Developer secur...@isscp.com wrote:
 Dianne
 Thanks  and yes is was your blogspot article at the bottom that refers to  
 FragmentActivity
 
 But I can not find this anywhere  and when I type it ,  it is unknown
 
 thanks again
 
 On Jun 17, 2011, at 7:57 PM, Dianne Hackborn wrote:
 
 Blog posts:
 
 http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html
 http://android-developers.blogspot.com/2011/03/fragments-for-all.html
 
 SDK documentation:
 
 http://developer.android.com/guide/topics/fundamentals/fragments.html
 http://developer.android.com/reference/android/app/Fragment.html
 
 I would suggest that for now you ignore the fragment tag; all it is, is a 
 convenience for doing certain things.  Learn how to directly use the 
 Fragment APIs and how those work with activities, and then once you are done 
 with those basic concepts you can throw in fragment layout tags.
 
 (I should probably adjust the Fragment java doc to reflect this approach as 
 well.)
 
 On Fri, Jun 17, 2011 at 4:42 PM, New Developer secur...@isscp.com wrote:
 Could someone please clarify the method in which to use fragment
 
 There is a Main Activity which has a  fragment  element within it's layout
 
 this fragment element is then loaded to a class the extends  Fragment
 But does the fragment class then have it's own activity ?  or
 how do you access the elements within the fragment ?
 For discussion let us say the fragment has a Button and EditText
 
 Under  a normal activity  you could access it with
 (Button) findViewbyId(R.id.button);   but when I put this into a fragment 
 extended class
 findViewById  gives an error ?
 
 Also there is one article on Fragment which has a FragmentActivity  or 
 ActivityFragment
 But I can not find this anywhere
 
 Thanks in advance
 
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 
 
 
 -- 
 Dianne Hackborn
 Android framework engineer
 hack...@android.com
 
 Note: please don't send private questions to me, as I don't have time to 
 provide private support, and so won't reply to such e-mails.  All such 
 questions should be posted on public forums, where I and others can see and 
 answer them.
 
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 
 
 
 -- 
 Dianne Hackborn
 Android framework engineer
 hack...@android.com
 
 Note: please don't send private questions to me, as I don't have time to 
 provide private support, and so won't reply to such e-mails.  All such 
 questions should be posted on public forums, where I and others can see and 
 answer them.
 
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] new Fragments

2011-06-18 Thread New Developer
Here is what I have can you see something obvious

in my MainActivity  I call the  Fragment using

FragmentTransaction   fMgr  = getFragmentManager().beginTransaction();
VisitMenu fragment  = new VisitMenu(); 
fMgr.add(R.id.menu2, fragment);
fMgr.commit();

fMgr.show(fragment);

Log.w(CHECK , Check  1 + fragment.getView()   );
Log.w(CHECK , Check  2 + fragment.view);

Both Check 1  and Check 2  return NULL

My Fragment Has this

public class VisitMenu extends Fragment {
private  View  parent= null;
public   View  view  = null;

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, 
Bundle bundle) {
view  = inflater.inflate(R.layout.visit_menu, container, 
false);
parent= container;
return view;
}
}

and ideas welcome

Thanks in advance



On Jun 18, 2011, at 10:40 PM, New Developer wrote:

 I have the SDK Updater done  and installed the  Compatibility package
 
 When I putextends   FragmentActivity
 
 I still get  FragmentActivity cannot be resolved to a type
 
 With the offer to change to Fragment
 
 and ideas
 
 thanks again
 
 
 
 
 On Jun 18, 2011, at 1:11 AM, Dianne Hackborn wrote:
 
 Xav's blog post explains how to get the support library, which has 
 FragmentActivity, through the SDK updater:
 
 http://android-developers.blogspot.com/2011/03/fragments-for-all.html
 
 On Fri, Jun 17, 2011 at 8:16 PM, New Developer secur...@isscp.com wrote:
 Dianne
 Thanks  and yes is was your blogspot article at the bottom that refers to  
 FragmentActivity
 
 But I can not find this anywhere  and when I type it ,  it is unknown
 
 thanks again
 
 On Jun 17, 2011, at 7:57 PM, Dianne Hackborn wrote:
 
 Blog posts:
 
 http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html
 http://android-developers.blogspot.com/2011/03/fragments-for-all.html
 
 SDK documentation:
 
 http://developer.android.com/guide/topics/fundamentals/fragments.html
 http://developer.android.com/reference/android/app/Fragment.html
 
 I would suggest that for now you ignore the fragment tag; all it is, is a 
 convenience for doing certain things.  Learn how to directly use the 
 Fragment APIs and how those work with activities, and then once you are 
 done with those basic concepts you can throw in fragment layout tags.
 
 (I should probably adjust the Fragment java doc to reflect this approach as 
 well.)
 
 On Fri, Jun 17, 2011 at 4:42 PM, New Developer secur...@isscp.com wrote:
 Could someone please clarify the method in which to use fragment
 
 There is a Main Activity which has a  fragment  element within it's layout
 
 this fragment element is then loaded to a class the extends  Fragment
 But does the fragment class then have it's own activity ?  or
 how do you access the elements within the fragment ?
 For discussion let us say the fragment has a Button and EditText
 
 Under  a normal activity  you could access it with
 (Button) findViewbyId(R.id.button);   but when I put this into a fragment 
 extended class
 findViewById  gives an error ?
 
 Also there is one article on Fragment which has a FragmentActivity  or 
 ActivityFragment
 But I can not find this anywhere
 
 Thanks in advance
 
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 
 
 
 -- 
 Dianne Hackborn
 Android framework engineer
 hack...@android.com
 
 Note: please don't send private questions to me, as I don't have time to 
 provide private support, and so won't reply to such e-mails.  All such 
 questions should be posted on public forums, where I and others can see and 
 answer them.
 
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 
 
 
 -- 
 Dianne Hackborn
 Android framework engineer
 hack...@android.com
 
 Note: please don't send private questions to me, as I don't have time to 
 provide private support, and so 

Re: [android-developers] new Fragments

2011-06-18 Thread Dianne Hackborn
Committing a fragment transaction is asynchronous.  You should let it run
and do its thing; don't call getView() outside of the fragment's own
lifecycle.

Have you tried any of the API demos?  There are lots of them.  I suggest
starting off with one of those known working demos, found here:

http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/index.html

On Sat, Jun 18, 2011 at 8:10 PM, New Developer secur...@isscp.com wrote:

 Here is what I have can you see something obvious

 in my MainActivity  I call the  Fragment using

 FragmentTransaction   fMgr  = getFragmentManager().beginTransaction();
 VisitMenu fragment  = new VisitMenu();
 fMgr.add(R.id.menu2, fragment);
 fMgr.commit();


 fMgr.show(fragment);


 Log.w(CHECK , Check  1 + fragment.getView()
 );
 Log.w(CHECK , Check  2 + fragment.view
 );

 Both Check 1  and Check 2  return NULL

 My Fragment Has this

 public class VisitMenu extends Fragment {
  private  View  parent= null;
  public   View  view  = null;


  @Override
 public View onCreateView(LayoutInflater inflater, ViewGroup container,
 Bundle bundle) {
  view  = inflater.inflate(R.layout.visit_menu, container, false);
  parent= container;
  return view;
  }

 }

 and ideas welcome

 Thanks in advance



 On Jun 18, 2011, at 10:40 PM, New Developer wrote:

 I have the SDK Updater done  and installed the  Compatibility package

 When I putextends   FragmentActivity

 I still get  FragmentActivity cannot be resolved to a type

 With the offer to change to Fragment

 and ideas

 thanks again




 On Jun 18, 2011, at 1:11 AM, Dianne Hackborn wrote:

 Xav's blog post explains how to get the support library, which has
 FragmentActivity, through the SDK updater:

 http://android-developers.blogspot.com/2011/03/fragments-for-all.html

 On Fri, Jun 17, 2011 at 8:16 PM, New Developer secur...@isscp.com wrote:

 Dianne
 Thanks  and yes is was your blogspot article at the bottom that refers to
  FragmentActivity

 But I can not find this anywhere  and when I type it ,  it is unknown

 thanks again

 On Jun 17, 2011, at 7:57 PM, Dianne Hackborn wrote:

 Blog posts:


 http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html
 http://android-developers.blogspot.com/2011/03/fragments-for-all.html

 SDK documentation:

 http://developer.android.com/guide/topics/fundamentals/fragments.html
 http://developer.android.com/reference/android/app/Fragment.html

 I would suggest that for now you ignore the fragment tag; all it is, is
 a convenience for doing certain things.  Learn how to directly use the
 Fragment APIs and how those work with activities, and then once you are done
 with those basic concepts you can throw in fragment layout tags.

 (I should probably adjust the Fragment java doc to reflect this approach
 as well.)

 On Fri, Jun 17, 2011 at 4:42 PM, New Developer secur...@isscp.comwrote:

 Could someone please clarify the method in which to use fragment

 There is a Main Activity which has a  fragment  element within it's
 layout

 this fragment element is then loaded to a class the extends  Fragment
 But does the fragment class then have it's own activity ?  or
 how do you access the elements within the fragment ?
 For discussion let us say the fragment has a Button and EditText

 Under  a normal activity  you could access it with
 (Button) findViewbyId(R.id.button);   but when I put this into a fragment
 extended class
 findViewById  gives an error ?

 Also there is one article on Fragment which has a FragmentActivity  or
 ActivityFragment
 But I can not find this anywhere

 Thanks in advance

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.


 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 

[android-developers] new Fragments

2011-06-17 Thread New Developer
Could someone please clarify the method in which to use fragment

There is a Main Activity which has a  fragment  element within it's layout

this fragment element is then loaded to a class the extends  Fragment
But does the fragment class then have it's own activity ?  or
how do you access the elements within the fragment ?
For discussion let us say the fragment has a Button and EditText

Under  a normal activity  you could access it with
(Button) findViewbyId(R.id.button);   but when I put this into a fragment 
extended class
findViewById  gives an error ?

Also there is one article on Fragment which has a FragmentActivity  or 
ActivityFragment
But I can not find this anywhere

Thanks in advance

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] new Fragments

2011-06-17 Thread Dianne Hackborn
Blog posts:

http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html
http://android-developers.blogspot.com/2011/03/fragments-for-all.html

SDK documentation:

http://developer.android.com/guide/topics/fundamentals/fragments.html
http://developer.android.com/reference/android/app/Fragment.html

I would suggest that for now you ignore the fragment tag; all it is, is a
convenience for doing certain things.  Learn how to directly use the
Fragment APIs and how those work with activities, and then once you are done
with those basic concepts you can throw in fragment layout tags.

(I should probably adjust the Fragment java doc to reflect this approach as
well.)

On Fri, Jun 17, 2011 at 4:42 PM, New Developer secur...@isscp.com wrote:

 Could someone please clarify the method in which to use fragment

 There is a Main Activity which has a  fragment  element within it's layout

 this fragment element is then loaded to a class the extends  Fragment
 But does the fragment class then have it's own activity ?  or
 how do you access the elements within the fragment ?
 For discussion let us say the fragment has a Button and EditText

 Under  a normal activity  you could access it with
 (Button) findViewbyId(R.id.button);   but when I put this into a fragment
 extended class
 findViewById  gives an error ?

 Also there is one article on Fragment which has a FragmentActivity  or
 ActivityFragment
 But I can not find this anywhere

 Thanks in advance

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] new Fragments

2011-06-17 Thread New Developer
Dianne
Thanks  and yes is was your blogspot article at the bottom that refers to  
FragmentActivity

But I can not find this anywhere  and when I type it ,  it is unknown

thanks again

On Jun 17, 2011, at 7:57 PM, Dianne Hackborn wrote:

 Blog posts:
 
 http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html
 http://android-developers.blogspot.com/2011/03/fragments-for-all.html
 
 SDK documentation:
 
 http://developer.android.com/guide/topics/fundamentals/fragments.html
 http://developer.android.com/reference/android/app/Fragment.html
 
 I would suggest that for now you ignore the fragment tag; all it is, is a 
 convenience for doing certain things.  Learn how to directly use the Fragment 
 APIs and how those work with activities, and then once you are done with 
 those basic concepts you can throw in fragment layout tags.
 
 (I should probably adjust the Fragment java doc to reflect this approach as 
 well.)
 
 On Fri, Jun 17, 2011 at 4:42 PM, New Developer secur...@isscp.com wrote:
 Could someone please clarify the method in which to use fragment
 
 There is a Main Activity which has a  fragment  element within it's layout
 
 this fragment element is then loaded to a class the extends  Fragment
 But does the fragment class then have it's own activity ?  or
 how do you access the elements within the fragment ?
 For discussion let us say the fragment has a Button and EditText
 
 Under  a normal activity  you could access it with
 (Button) findViewbyId(R.id.button);   but when I put this into a fragment 
 extended class
 findViewById  gives an error ?
 
 Also there is one article on Fragment which has a FragmentActivity  or 
 ActivityFragment
 But I can not find this anywhere
 
 Thanks in advance
 
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 
 
 
 -- 
 Dianne Hackborn
 Android framework engineer
 hack...@android.com
 
 Note: please don't send private questions to me, as I don't have time to 
 provide private support, and so won't reply to such e-mails.  All such 
 questions should be posted on public forums, where I and others can see and 
 answer them.
 
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] new Fragments

2011-06-17 Thread Dianne Hackborn
Xav's blog post explains how to get the support library, which has
FragmentActivity, through the SDK updater:

http://android-developers.blogspot.com/2011/03/fragments-for-all.html

On Fri, Jun 17, 2011 at 8:16 PM, New Developer secur...@isscp.com wrote:

 Dianne
 Thanks  and yes is was your blogspot article at the bottom that refers to
  FragmentActivity

 But I can not find this anywhere  and when I type it ,  it is unknown

 thanks again

 On Jun 17, 2011, at 7:57 PM, Dianne Hackborn wrote:

 Blog posts:


 http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html
 http://android-developers.blogspot.com/2011/03/fragments-for-all.html

 SDK documentation:

 http://developer.android.com/guide/topics/fundamentals/fragments.html
 http://developer.android.com/reference/android/app/Fragment.html

 I would suggest that for now you ignore the fragment tag; all it is, is a
 convenience for doing certain things.  Learn how to directly use the
 Fragment APIs and how those work with activities, and then once you are done
 with those basic concepts you can throw in fragment layout tags.

 (I should probably adjust the Fragment java doc to reflect this approach as
 well.)

 On Fri, Jun 17, 2011 at 4:42 PM, New Developer secur...@isscp.com wrote:

 Could someone please clarify the method in which to use fragment

 There is a Main Activity which has a  fragment  element within it's
 layout

 this fragment element is then loaded to a class the extends  Fragment
 But does the fragment class then have it's own activity ?  or
 how do you access the elements within the fragment ?
 For discussion let us say the fragment has a Button and EditText

 Under  a normal activity  you could access it with
 (Button) findViewbyId(R.id.button);   but when I put this into a fragment
 extended class
 findViewById  gives an error ?

 Also there is one article on Fragment which has a FragmentActivity  or
 ActivityFragment
 But I can not find this anywhere

 Thanks in advance

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.


 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en