Can you give me another sample app, please?
2011/3/4 Dianne Hackborn <[email protected]> > If it helps, ApiDemos has all of the same fragment samples as the ones > originally released for HC, but using this library. You can run them from > "App/Fragment Support" in the UI, and the code is the Fragment*Support.java > files that are right next to the existing ones for the HC framework. > > Also be sure to look at the source for FragmentActivity.java, which has > some documentation in the class java doc giving an overview. > > > On Fri, Mar 4, 2011 at 8:53 AM, Dan Watling <[email protected]>wrote: > >> To get the example working, I just had to manually copy the 'android- >> support-v4.jar' from '/extras/android/compatibility/v4' into the libs >> folder of the project as well as add it to the build path. >> >> Lessons I've learned in the past few hours while playing with this: >> - Ensure all of your activities that you want to take advantage of >> this API extend FragmentActivity >> - Ensure you are using the 'android.support.v4.app.' versions of the >> Fragment API and not 'android.app'. >> >> -Dan >> >> On Mar 4, 10:30 am, Premier <[email protected]> wrote: >> > I always have below error >> > >> > 03-04 17:29:01.800: ERROR/AndroidRuntime(448): Caused by: >> > java.lang.ClassNotFoundException: android.view.fragment in loader >> > dalvik.system.PathClassLoader@44e83790 >> > >> > On 4 Mar, 16:52, Alessio Grumiro <[email protected]> wrote: >> > >> > >> > >> > >> > >> > >> > >> > > Ok, but it must be executed on HoneyComb (look at default.properties >> > > target=android-11). >> > >> > > I'm unable to lunch it on android 1.6. >> > >> > > Is the library for android 1.6? >> > >> > > 2011/3/4 marlan <[email protected]> >> > >> > > > under >> > > > >> $android-sdk/extras/android/compatibility/v4/samples/ApiDemos/src/com/ >> > > > example/android/apis/app/ >> > > > all that extends FragmentActivity (FragmentLayoutSupport.java for >> > > > example). >> > >> > > > On 4 Mrz., 16:32, Premier <[email protected]> wrote: >> > > > > Where did you found example, please? >> > >> > > > > I need it. >> > >> > > > > Thank you. >> > >> > > > > On 4 Mar, 15:04, marlan <[email protected]> wrote: >> > >> > > > > > Ok, I found the samples that uses the compatibility packages >> > > > > > (FragmentDialogOrActivitySupport etc.). >> > > > > > I changed the base class from FragmentLayout to FragmentLayout >> extends >> > > > > > FragmentActivity and now it works. >> > >> > > > > > On 4 Mrz., 13:31, marlan <[email protected]> wrote: >> > >> > > > > > > Hi, >> > > > > > > I'm trying to use the new fragment library in an 1.6 app. >> > > > > > > I have copied the FragmentLayout.java and the >> fragment_layout.xml >> > > > from >> > > > > > > the Apidemos and the android-support-v4.jar in my project. >> > > > > > > Everything compiled but when I run the app I get an exception: >> > > > > > > java.lang.ClassCastException: >> > > > my.package.FragmentLayout$TitlesFragment >> > > > > > > cannot be cast to android.app.Fragment. >> > > > > > > (The my.package.FragmentLayout$TitlesFragment extends >> > > > > > > android.support.v4.app.Fragment) >> > > > > > > How can I use the library? >> > > > > > > The APIDemos that comes with the compatibility package seems >> to use >> > > > > > > only the honeycomp Api. >> > > > > > > Thanks Mark >> > >> > > > -- >> > > > You received this message because you are subscribed to the Google >> > > > Groups "Android Developers" group. >> > > > To post to this group, send email to >> [email protected] >> > > > To unsubscribe from this group, send email to >> > > > [email protected] >> > > > 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 [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > 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 [email protected] > To unsubscribe from this group, send email to > [email protected] > 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

