Okhelp.cz

Recepty, články, nápady, programování. Dříve dum-zahrada, finance, internet a know-how.okhelp.cz Pro lepší výsledky hledání používejte i diakritiku.

How add Android code templates to Eclipse

If you have to type frequently the same code you can create templates which can be activate via autocomplete with Ctrl + Space.

For example lets assume setOnClickListener body.

To create a template for this select the menu Window->Preferences and Open Java -> Editor -> Templates

android/template-android-eclipse-271x300.png



Type name of template in Eclipse s editor and pres Ctrl+Space


[caption id="attachment_1114" align="alignleft" width="300" caption="Eclipse-show-template-proposals"]android/eclipse-show-template-proposals-300x222.png[/caption]


Select your template from intellisense help and press Enter or double click on selected item.


[caption id="attachment_1116" align="alignleft" width="300" caption="Eclipse - select your template"]android/eclipse-show-template-proposals-2-300x187.png[/caption]



	mIdButtonHome.setOnClickListener(new View.OnClickListener() {
		public void onClick(View v) {
			Intent browserIntent = new Intent(Intent.ACTION_VIEW,
					Uri.parse("//android.okhelp.cz/category/software/"));
			startActivity(browserIntent);
		}
	});






Quick help in Eclipse editor: select keyword and press Ctrl+1

android/eclipse-quick-fix-problem-300x111.png

396LW NO topic_id




AD

Další témata ....(Topics)


246

Snow Text Effects Paint.NET | snow-text-effects-paint-net


For some graphics you can use Paint.NET editor.
//www.getpaint.net/
How create Snow Effects on Text by 1 minute show this video: