89 views

Where Eclipse stored Settings and Templates Java Code

C:\documents\workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.jdt.ui.prefs
Posted in Eclipse | Comments Off
125 views

ADT Bundle 22.6.2 have memory leak.

If I trying
android-sdk_r22.6.2-windows.zip
adt-bundle-windows-x86_64-20140321.zip
and open xml layout graphic editor and xml layout file
memory continues to grow to crashes Eclipse

https://developer.android.com/sdk/index.html

I have to install old version adt-bundle-windows-x86-20131030.zip
what working fine.
I had to delete .metadata folder in workspace if I want open old version ADT

Posted in Bugs, warnings, errors, Eclipse | Comments Off
81 views

Optimizing Eclipse for Android development

Menu: Windows – Preferences
- Under General, check ‘Always run in background’
- Under General>Appearance, Un-check ‘Enable animations’
- Under General>Appearance, select Theme: ‘Classic’
- Under Java>Editor>Content Assist, uncheck ‘Enable auto activation’
- Under General>Startup and Shutdown, disable all un-used services

- Minimize Outline window – right sidebar

- Close unused projects!

Posted in Eclipse | Comments Off
97 views

Updating Android SDK failed: “A folder failed to be moved.”

Try:
- close Eclipse and continue updating
or
- change permission of folder
or
- disable antivirus
or
- copy manually from zip packages from temp
c:\Program Files\android\sdk\temp\
c:\Program Files\android\sdk\temp\platform-tools_r19.0.1-windows.zip
c:\Program Files\android\sdk\temp\tools_r22.6.2-windows.zip
into propriety folders
or
- download all SDK package and replace old
https://developer.android.com/sdk/index.html?hl=sk

Posted in Bugs, warnings, errors, Eclipse | Comments Off
186 views

Eclipse Escape text when pasting into a string literal

Window>Preference>Java>Editor>Typing and check the “Escape text when pasting into a string literal“.
Posted in Eclipse | Tagged | Comments Off
274 views

How to set different locales in android

- create new folder with values in resources folder in project with extension your language code
For example:
My language is Czech (cs)
I have to create the folder values-cs in res folder

// for locale English is default
/MyProject/res/values 
<?xml version="1.0" encoding="utf-8"?>
<resources>
 
    <string name="app_name">App English default</string>
    <string name="action_settings">Settings English default</string>
    <string name="hello_world">Hello world</string>
 
</resources>
 
// for locale Czech (cs)
/MyProject/res/values-cs
<?xml version="1.0" encoding="utf-8"?>
<resources>
 
    <string name="app_name">Aplikace česky cs</string>
    <string name="action_settings">Nastavení česky</string>
    <string name="hello_world">Ahoj světe!</string>
 
</resources>
 
// for locale English US (r is region)
/MyProject/res/values-en-rUS
 
<?xml version="1.0" encoding="utf-8"?>
<resources>
 
    <string name="app_name">App English Us locale</string>
    <string name="action_settings">Settings English Us locale</string>
    <string name="hello_world">Hello world from USA :)</string>
 
</resources>

Into every values folder put strings.xml file
Translate every string from values folder into your locale.
If user selected your locale in device settings, application selects a string from the correct (proper) folder.

Posted in Android Examples Code | Tagged , | Comments Off
269 views

xml string with html tags Android

// in strings.xml
<string name="myStringWithTags"><![CDATA[<b>some text..</b> other tags ...]]></string>
<string name="myStringWithPattern"><![CDATA[<b>%s</b> other tags ...]]></string>
// in Activity.class
String sHtmlText = this.getApplicationContext().getString(R.string.myStringTags);
         sHtmlText = this.getApplicationContext().getString(R.string.myStringWithPattern,"replace %s with this text");
Posted in Android Examples Code | Tagged , , , | Comments Off
348 views

WebView.loadData utf-8 encoding Android

Try this solution:

String DATA = "Html text....bla bla bla. Hellou world!  čšřžěéá";
String HEADERHTML = 
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">" 
+"<html>  <head>  <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">"  
+"</head>  <body>";
String FOOTERHTML = "</body></html>";
WebView mWebView.loadData(HEADERHTML+DATA+FOOTERHTML,"text/html; charset=UTF-8",null);
Posted in Android Examples Code | Tagged | Comments Off
457 views

Best of free database browser and editor sqlite download link

Sqliteman
What’s Sqliteman? The best developer’s and/or admin’s GUI tool for Sqlite3 in the world.
You can create database, table, query very fast and intuitively.
You can learn sql query. If make some error you get explication.
http://sqliteman.com/

sqliteman-download

sqliteman-download

Posted in SQLite database | Tagged | Comments Off
399 views

Layout not found on Android 2.1

If I create own folder layout-w320dp with Eclipse Android 4.4
layout was correctly loaded.
If I trying this application on tablet with Android 2.1 application crashed.

layout-not-loaded-android-2-1

Posted in Bugs, warnings, errors | Tagged | Comments Off
399 views