Android WebView example
Android’s WebView allows you to open an own windows for viewing URL or custom html markup page. In this tutorial, you will create two pages, a page with a single button, when you clicked on it, it will navigate to another page and display URL “google.com” in WebView component. P.S Th
[ read more ]
Using Web Services to Build Your Own Weather Application
Web services allow different applications from different sources to communicate with each other without time-consuming custom coding. All communication is in XML, and they are not tied to any operating system or programming language. This post will explain how to consume a third party web service
[ read more ]
Send email with attachment in Android
Just Call that Method and send Email in Android public void emailSending( String strFile) { try { strFile = "/sdcard/Semiotics/Config/ftpCongif.txt"; File file = new File(strFile); if (!file.exists()) file.mkdirs(); strFile = strFile ;//+ "/report.html"; //create
[ read more ]
How to open wifi settings in android?
In today’s tutorial I will show you how to open the wifisettings in android programatically. This code comes handy when the user have not enabled the wifi and you want the user to enable it for your application to work. Here is the code for that. 1 2 3 4 5 6 7 8 9 10 1
[ read more ]
Sort directory/file in alphabetical order ignore case
Last exercise of "File Explorer" list file/directory without order. We can implement Comparator<? super File> to sort the directory/file in alphabetical order. We can also convert the file name to lower case before comparing, such that the array will be sorted in alphabetical order ignore case
[ read more ]
Implement a simple File Explorer in Android
- First of all, as a user app, I think it should not access the root "/" directly. So I assign root to Environment.getExternalStorageDirectory(), it's the Android external storage directory. - Secondly, if a file/directory is hidden or un-readable, it will not be display. Create /res/layout/row.
[ read more ]
Custom ArrayAdapter, with different icons.
In the last exercises "A simple ListView, extends ListActivity", "ListView, with icon" and "Implement onListItemClick() of ListActivity", all use the build-in ArrayAdapter with standard layout in each row. All row have the same icon. In this article, a custom ArrayAdapter will be created. The met
[ read more ]
Implement onListItemClick() of ListActivity
Modify the java code of the last exercise "ListView, with icon" to add listener of onListItemClick() AndroidList.java package com.exercise.AndroidList; import android.app.ListActivity; import android.os.Bundle; import android.view.View; import android.widget.ArrayAdapter; import andro
[ read more ]
ListView, with icon
ListView in simplest form with plain text only. This exercise describe how to add a icon in ListView. create a new file in /res/layout/row.xml, to setup our layout on each row. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/an
[ read more ]
A simple ListView, extends ListActivity
It's the simplest form of ListView, extends ListActivity. The list is displayed as a single line of plain text, using the simple Android built-in layout "android.R.layout.simple_list_item_1". package com.exercise.AndroidList; import android.app.ListActivity; import android.os.Bundle; impor
[ read more ]
No comments:
Post a Comment