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.

Alert messagebox toast Android example code

Toast in Android application is equivalent of Alert in JavaScript or MessageBox in WinApi.


// Toast android.widget.Toast.makeText(Context context, CharSequence text, int duration)
// public static Toast makeText (Context context, CharSequence text, int duration) 

Toast.makeText(getApplicationContext(), "Hello world!",
                  Toast.LENGTH_SHORT).show();


396LW NO topic_id




AD

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


175

HTC Desire HD | htc-desire-hd


HTC Desire HD cena od 7 000 KCZ Kč (únor.2012)
HTC Desire HD je chytrý telefon běžící na operačním systému Android.
HTC Desire HD je (22.února2012) druhým nejpoužívanějším chytrým telefonem u programu Sky Map viz tabulka.

Smartphone má hliníkový unibody design, vybaven je Androidem 2.2 (Froyo) a HTC Sense displayem. Na zadní straně jsou dvě plastové krytky, jedna obsahuje baterii, druhá SIM kartu a paměťovou kartu microSDHC. Telefon je vybaven 4,3 palcovým WVGA LCD TFT dotykovým displayem, 8 megapixelovým fotoaparátem (lze nahrávat 720p video), podpora pro HSPA / W-CDMA a quad-band GSM / GPRS / EDGE.


Telefon je vybaven 1 GHz CPU Scorpion MSM8255 procesorem. Tato druhá generace Snapdragon procesoru má nízkou spotřebu energie.

HTC HD má 768 MB RAM a 1,5 GB interní paměti flash. K dispozici je také slot pro microSDHC / XC kartu s kapacitou až 32 GB dat.

HTC Desire HD photo pic image
samsung galaxy s2
Zdroj obrázku: wikipedia
263

String Array of Array Java Example | string-array-of-array-java-example


Set, get string , array of array of strings, Java example code

	public final static String[][]_arArOfString_1 = {
		new String[] {"bla","bla","hello world!"},
		new String[] {},
		new String[] {},
		new String[] {},
		new String[] {},
		new String[] {}
	};
String sOut = _arArOfString_1[0][2]; // hello world!
109

Conversion to Dalvik format failed with error 1 | conversion-to-dalvik-format-failed-with-error-1


UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcz/okhelp/MyMathClass;

First try this solution!!!!!
Select your project in project tree and go to the Eclipse menu Project » Clean » Clean projects selected below » select your project and click OK.

If you create *.apk package with proguard sometimes you must back up the project, delete project, and create new project if you are unable to create *.apk file.

Check your AndroidManifest.xml if all Activity is correctly inserted. If you add a library project to Main project you have to insert Activity from library to Main project AndroidManifest.xml


Problem with the library.
I deleted library project from project tree and again put the _library project into the main project. This problem was resolved.
1.)Go to Project » Properties » Java Build Path » Libraries and remove (your projects) click OK.
2.)Go to Project » Clean » Clean projects selected below » select your project and click OK.
3.)Add again your LIBRARY project to your MAIN project Project » Properties » Java Build Path » Libraries.
See image below.

Problem with a *.apk file
If you create signed *.apk, you have to delete previous *.apk from your PC folder.

android/jar-library-create-with-eclipse.png

270

How to add or remove widgets home screen android 4 | how-to-add-or-remove-widgets-home-screen-android-4


Video tutorial
How to add or remove widgets home screen Android 4.