Skip to main content

Posts

Showing posts from September, 2011

English Speaking Tips

English Speaking Tips You Must KnowVisiting a new place can be a scary experience for a lot of people, not only because it could entail speaking in a language that most people are not comfortable with – English. If you are born a native English speaker, then you will have no problem speaking English naturally. But for those people whose mother tongue is not English, this can be a problem. So how can you avoid this kind of situation? Learn how to speak English fluently. Most people think that this is easier said than done, but in reality, it is actually easy to speak fluent English. English is the universal language, and this universal concept makes it one of the easiest languages to master. Here are 7 English speaking tips you must know to become a more confident English speaker. 1. Listen first One of the best English speaking tips is to listen carefully to understandable English EVERY DAY. Most people turn to textbooks to study English grammar rules, but you cannot learn the correct...

What are the differences between HashMap and Hashtable?

Both provide key-value access to data. The Hashtable is one of the original collection classes in Java. HashMap is part of the new Collections Framework, added with Java 2, v1.2. The key difference between the two is that access to the Hashtable is synchronized on the table while access to the HashMap isn't. You can add it, but it isn't there by default. Another difference is that iterator in the HashMap is fail-safe while the enumerator for the Hashtable isn't. If you change the map while iterating, you'll know. And, a third difference is that HashMap permits null values in it, while Hashtable doesn't. For new code, I would tend to always use HashMap.  Difference between HashMap and HashTable? A: The HashMap class is ro...

Java Interview Questions

Q: What is the difference between an Interface and an Abstract class? A: An abstract class can have instance methods that implement a default behavior. An Interface can only declare constants and instance methods, but cannot implement default behavior and all methods are implicitly abstract. An interface has all public members and no implementation. An abstract class is a class which may have the usual flavors of class members (private, protected, etc.), but has some abstract methods. . ...

Listview using checkbox resolved issue.

// itemChecked will store the position of the checked items. public MyDataAdapter ( Context context , int layout , Cursor c , String [] from ,         int [] to ) {     super ( context , layout , c , from , to );     this . c = c ;     this . context = context ;     for ( int i = 0 ; i < this . getCount (); i ++) {         itemChecked . add ( i , false ); // initializes all items value with false     } } public View getView ( final int pos , View inView , ViewGroup parent ) {     if ( inView == null ) {         LayoutInflater inflater = ( LayoutInflater ) context                 . getSystemService ( Context . LAYOUT_INFLATER_SERVICE );         inView = inflater . inflate ( R . layout . your_layout_file , null );     }     final ...

Action_Send display popup whatever you required.

 final Intent emailIntent = new Intent(                                 android.content.Intent.ACTION_SEND_MULTIPLE);                         // Recording file send to mail                         //emailIntent.setType("image/png");                         //emailIntent.setType("audio/3gp");                         emailIntent.putExtra("data", sourceImageBitmap);                        emailIntent.setFlags(Intent.FLAG_A...

SEND MAIL

Intent sendIntent = new Intent(Intent.ACTION_SEND); // Add attributes to the intent sendIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); sendIntent.putExtra(Intent.EXTRA_SUBJECT,"subject line"); sendIntent.putExtra(Intent.EXTRA_TEXT,"Body of email"); sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File("Filename"))); sendIntent.setType("vnd.android.cursor.dir/email"); startActivity(Intent.createChooser(sendIntent,"Email:"));

Auto Complete

Auto Complete To create a text entry widget that provides auto-complete suggestions, use the AutoCompleteTextView widget. Suggestions are received from a collection of strings associated with the widget through an ArrayAdapter @Override protected void onCreate ( Bundle savedInstanceState ) {     super . onCreate ( savedInstanceState );     ( R . layout . main );     AutoCompleteTextView textView = ( AutoCompleteTextView ) findViewById ( R . id . autocomplete_country );     ArrayAdapter < String > adapter = new ArrayAdapter < String >( this , R . layout . list_item , COUNTRIES );     textView . setAdapter ( adapter ); setContentView ( textView ); } .

Android designing tools

This tool was written to make my Java programming life easier. It can be used to build graphical user interfaces (GUI) for the Android cell phone platform. I hope you find it useful for whatever Android/Java cell phone software development projects you have planned! download http://www.droiddraw.org/