I am starting my programming with fragments. i want to do it for android 2.2 first then for android 3.0/3.1/3.2.
I added Compatibility package , all things i did.
What i want just give me some sample example for android 2.2 fragments for better understanding that how to use fragments in application.
there are the Api4+ and the API 13+ demos. You can download an install on your phone and try it and choose which one is the best for you. The source code is very helpful and commented.
Related
Lately I was using support package android like actionbar activity or fragment activity to build an app. I combined many tutorial that don't use support package to my project, so the project can do thing that I need, but sadly, I had to overcome many errors, and that why this question fly in my head ...
I try to learn how the support package works, the articles pretty much said that support package works the same as the main package(is that we call it? sorry, I don't know), the difference is the support package works for android prior to honeycomb ...
And lastly is that okay to use both support package and main package together like using actionbar activity and fragment....
Thanks
There are some features that were added on later versions of Android such as ActionBar (post-Honeycomb) or RecycleView (post-Lollipop).
Using the support packages, we can use these features even on devices running earlier versions of Android.
They don't harm your code in any way.
this is my sittuation ...
A customer gave me an application done partially by somebody else. That person used fragments to build the UI.
The guy who gave me the application to finish the development of it, just realized that he wanted that the application run on android devices with 2.X
So, I am wondering if it is possible to have two UI's : One for Android devices that support fragments, and another one for android devices which do not support fragments.
In case that is possible, can that be deffined on the xml as alternate resources is done ? Or that needs to be programatically? (I mean check android os version and alternate UI's)
Thanks!
Lucky for you, the Support Library has Fragments in it, and supports back to Android 1.6. So you can use the "support" class for Fragments and it will work on old and new devices alike.
http://developer.android.com/tools/extras/support-library.html
http://developer.android.com/training/basics/fragments/support-lib.html
Until now I was using TabActivity for Tabs layout.
Since this Activity is deprecated What will be the best way to form a tabs interface?
I saw many tutorials showing the use of TabFragments but this is good only for high sdk version (15 and higher).
So what objects can I use for tabs layout considering it should work with API 10 and above and of course not deprecated?
An example will be great!
As Commonsware said here ::
"Deprecated" in Android means "we think there is a better solution that you should investigate". Rarely does "deprecated" mean "it is unusable". TabHost, AFAIK, works fine on Android 4.0.
There are also project named ActionBarSherlock which demos have all the capability of the compatibility library. Source code is also available on github.
There is also this tutorial which helps you how to use TabFragement.
I faced the same question while ago too and the best solution is use ActionBarSherlock with Fragments and there is a really nice tutorial how to implement TabHost in your app which you can find here :
ActionBarSherlock:FragmentTabs.
It worked for me, hope it will work for you too : )
P.S. And one another thing, it is really good when you are building an application to look for design guidelines and the best ways you can build your app so you can take advantage of the latest news in Android App Development.
I want to start programming for android devices and I have 1 question for you. I heard that Android is forward compatible. So, if I use 2.1, can I, at a later stage, update the app so it works with 4.0.3? What do you suggest me to do? Thank you for taking the time to answer these questions.
Ofcourse always start with lower version 2.1
2.1 is great for starters, but I would strongly advise to use Android Support Package for learning and implementing Fragments since Fragment based apps are the general direction in which Android is heading.
If you want to start Android Development i would Advice you to learn some Java Basics First if you are not familiar with the java envirnment.
Concerning The Android Api that you should start with, I will advice you to start with the 2.2 Froyo it's one of the most stable Api.
The choice of the android platform depends also on the fact that developer want to target the Larger Number of devices that's why google provide a chart's, that show wich platform are the most used. you can find this chart in this link.
Also in this link you can find the difference ore improvement on each platform, you can refer to the android developer site to see differences
For My Android Application I need to design multi-panel User Interface, Like with android sdk
3.o newest version they provide a new Concept of FRAGMENT but our Android Board is running with sdk 2.3 version, I am Continuously searching to get this fragment thing by any other way , we need to design same fragment like design for Activity with sdk 2.3 API level-8,
I didnt get any way to do this,Like I am using TAB layout but it is from my side ,not much more comfortable.
Please give me some solution to get it
Depending on how soon you need this done, you might want to wait for the fragment SDK to be released by Google. They've said that fragments are fairly easy to package up for inclusion in older versions of Android. They said "soon". Unfortunately, there's really no way to know when "soon" is.