One of the ways to notify the Android user is by displaying notifications in the status bar. You can show a message, play sound add icon and more. Creating a status bar notification Read More »
Android Alerts/Dialogs
Toast A toast notification is a message that pops up on the surface of the window. AlertDialog AlertDialog with a List Creating Custom Dialog using layout XML file As a developer you can also create customized alert dialogs. Step 1 – Creating the Dialog XML * The dialog layout xml file is placed together with all the layout xml files ... Read More »
Android Global Strings
A global string, or array of strings are declared in an external xml file in the resource folder:<project>/res/values/strings.xml Declaring a global string Using a global string while creating a TextView XML example: Code example: Getting a global string Global String Array Declaration in a Global String Array Code usage Read More »
Android Layouts
Layout is a type of a GroupView. It holds views in a certain layout on the screen. Layouts can be declared in two ways: Declare UI elements in XML –Android provides a straightforward XML vocabulary that corresponds to the View classes and subclasses, such as those for widgets and layouts. Instantiate layout elements at runtime –your application can create View ... Read More »
Android View Groups
A ViewGroup is a special view that can contain other views. List view Spinner (drop-down list) Read More »
User Interface – Views
Creating and adding a new View to a LayoutXML example – Adding to a view in a layout XML file Code example – Creating and adding a new view to a Layout (implemented in an Activity class). Read More »
Android Fragment
A Fragment is a piece of an activity which enable more modular activity design. It will not be wrong if we say, a fragment is a kind of sub-activity. If you want to create multi-UI pane than you should use fragment . Fragment Overview * A fragment has its own layout and its own behaviour with its own life cycle ... Read More »
Android Content Providers
Content providers store and retrieve data and make it accessible to all applications. If you want to make your own data public, you have two options: You can create your own content provider (a ContentProvider subclass) or you can add the data to an existing provider. All Services must be declared in the manifest file. Content Provider Basics * All ... Read More »
Android Service
* A Service is an application which has the ability to run in the background without displaying any user interface.* A Service is a class which derives from android.app.Service.* All Services must be declared in the manifest file.* Services run without a dedicated GUI, but, like Activities and Broadcast Receivers, they still execute in the main thread of the application’s ... Read More »
Android Intent
Intent is the negotiator between two activities or between two applications. It gives the ability to pass messages and data between the two entities. When writing applications for mobile, Intent is very handy, since it gives access to a lot of the OS services like opening the camera, a browser, displaying notifications and so on. Intent Resolution Intents can be ... Read More »
Jkoder.com Tutorials, Tips and interview questions for Java, J2EE, Android, Spring, Hibernate, Javascript and other languages for software developers