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 set text to TextView as HTM HTML format Android example


Html.fromHtml(), setText(), textView.setText(Html.fromHtml(String htmlFormat)), Android example.

TextView mIdTextOk = (TextView)findViewById(R.id.idTextOk);
int _nOk = 57;
// number 57 will bold style
mIdTextOk.setText(Html.fromHtml( "OK: "+"<b>"+_nOk+"</b>")); 

397LW NO topic_id


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


Get all ID from xml file for Android developers utility | get-all-id-from-xml-file-for-android-developers-utility

This software allow find all IDs from xml layout file source code and create variables with findViewById for onCreate, for onClick and load save preferences functions.
Get all ID is for Windows XP and higher.


[caption id="attachment_903" align="alignleft" width="300" caption="Get all ID from xml file for Android developers utility."]get-all-id-from-xml-file-android[/caption]

SQLite explorer download | sqlite-explorer-download

Best of SQLite explorer and admin download for SQLite 2.x and SQLite 3.x in separated folders.

Download Explorers SQLite 2.x and SQLite 3.x in separated folders

EditText.setOnKeyListener not working on maxLines EditText | edittext-setonkeylistener-not-working-on-maxlines-edittext

Check this in XML file if use singleLine
singleLine change to maxLines (1 if singleLine)
declare inputType



Class File Editor - Source not found - Change Attached Source - Eclipse | class-file-editor-source-not-found-change-attached-source-eclipse

The source attachment does not contain the source for the file TextWatcher.class.
You can change the source attachment by clicking Change Attached Source below:

You have to add JDK src.zip path to dialog as on image below.
[caption id="attachment_1091" align="alignleft" width="282" caption="class file editor source not found Eclipse warning"][/caption]

Or go to Project > Properties > Java Build Path > Libraries
Expand JRE System Library. Expand rt.jar.
Select Source attachment and double click or Edit.
Type path the source code file (External File…) and press OK.

[caption id="attachment_1094" align="alignleft" width="300" caption="Java project build path"][/caption]

Or type path in Java JRE definition

[caption id="attachment_1105" align="alignleft" width="300" caption="Java JRE deifiniton path in Eclipse"][/caption]

How open String.class or others keywords definition with Eclipse.

Now if mouse move about keywords String or F3 on keywords and press button in yellow field will opened String.class
Java Eclipse intellisense


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

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.


Editace: 2011-10-08 12:43:22
Počet článků v kategorii: 397

11 Share