screenSize & smallestScreenSize attributes are not available in SDK 10.They are been introduced in API level 13.screenSize & smallestScreenSize attributes are not available in SDK 10.They are been introduced in API level 13.where con is xmpp connection,
presenceChanged is called when any friends is going offline or online
Roster roster = con.getRoster();
roster.addRosterListener(new RosterListener() {
// Ignored events public void entriesAdded(Collection<String> addresses) {}
public void entriesDeleted(Collection<String> addresses) {}
public void entriesUpdated(Collection<String> addresses) {}
public void presenceChanged(Presence presence) {
System.out.println("Presence changed: " + presence.getFrom() + " " + presence);
}
});
presence.getType() return availability and presence.getMode() return away(),busy this type of options
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <stroke android:width="2dp" android:color="#FFFFFFFF" /> <gradient android:startColor="#DD000000" android:endColor="#DD2ECCFA" android:angle="225"/> <corners android:bottomRightRadius="7dp" android:bottomLeftRadius="7dp" android:topLeftRadius="7dp" android:topRightRadius="7dp"/> </shape>
<EditText android:layout_width="fill_parent" android:text="1" android:layout_height="wrap_content" android:id="@+id/editText1" android:inputType="numberSigned" android:layout_margin="5dip" android:gravity="center"> <requestFocus></requestFocus> </EditText>