- 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 ]
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 ]
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 ]
1. Custom Views
1.1. Defining own Views
You can also create you own Views by either extending existing Views classes or by extending View directly.
Views draw themself in the onDraw() method. You get a Canvas object which allows to perform drawing operations on it, e.g. draw lin
[ read more ]
1. Android Intents
1.1. Overview
Intents are asynchronous messages which allow Android components to request functionality from other components of the Android system. For example an Activity can send an Intents to the Android system which starts another Activity.
Therefore Inte
[ read more ]
This example gives you an idea on how to Initialize bean in the program and also explains the lifecycle of bean in spring. Run the given bean example to retrieves the values of the bean using java file. Here in the file given below i.e. (context.xml) we have declare the bean definition.
Mybea
[ read more ]
/*
* BTC.java
*
*/
import com.sun.midp.lcdui.Text;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
/**
*
* @author Zeeshan
* @version
*/
public class BTC extends MIDlet {
Displayable d1;
graphics g;
login l=new login();
newuser n=new newuser();
l
[ read more ]