Linkfy is a class that lets you create links from TextViews. You can create links not just to web sites, but to also map addresses, emails and even phone numbers. Linking to a web address TextView myWebSite = (TextView) findViewById(R.id.my_web_site); myWebSite.setText("http://http://www.google.com/"); Linkify.addLinks(myWebSite , Linkify.WEB_URLS); Linking to a phone number TextView myPhone = (TextView) findViewById(R.id.my_web_site); myPhone .setText("9999590698"); Linkify.addLinks(myPhone , Linkify.PHONE_NUMBERS); //map ... Read More »
Tag Archives: android
Android Resource images
Resource images are placed under <project_dir>/res/drawable Using a resource image in an image view – XML example Using a resource image in an image view – Code Example Turning the resource image to a Bitmap object Drawing the bitmap on a canvas object Clearing the bitmap data from the memory Read More »
Android Status-Bar Notifications
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 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 »
Jkoder.com Tutorials, Tips and interview questions for Java, J2EE, Android, Spring, Hibernate, Javascript and other languages for software developers