Saturday, 25 December 2010
Java: JDBC basics
JDBC is an API for the Java programming language that defines how a client may access a database. It provides methods for querying and updating data in a database.
Tuesday, 21 December 2010
Java: Parameterized unit tests with JUnit
JUnit is a unit testing framework for the Java programming language.In this article I will explain how to create test with predefined values.This feature works in JUnit 4.
Wednesday, 15 December 2010
Android : Working with XML on Android
Recently I found great article from ibm with source code examples, here it is
Sunday, 12 December 2010
Friday, 3 December 2010
PHP: Working with XML
In this article I'll implement base functions to interact with XML like: loading, showing, saving, adding, deleting, editing.
Thursday, 18 November 2010
PHP: DOMDocument and encoding
If you want to save document with not typical encoding, for example utf-8 (russian letters)
Sunday, 31 October 2010
Android: Menu button click event
If you want to do smth after hardware MENU button clicks, not default menu creation but something slightly different.The easiest way is to capture the onKeyDown event for the menu button click
Sunday, 17 October 2010
Android: Center position of the button (fill_parent, wrap_content)
<Button android:id="@+id/btClick" android:gravity="center_vertical|center_horizontal" android:layout_gravity="center_vertical|center_horizontal|center" android:layout_height="wrap_content" android:layout_width="100px" android:text=""/>
android:layout_width="fill_parent" - object have width like parent
android:layout_height="wrap_content" - parent height wants to be just big enough to enclose its content
Thursday, 7 October 2010
Andoid: Change progress in progress dialog from the different thread
We should use Handler that allows you to send message to the thread
Tuesday, 5 October 2010
Android: Context menu in ListView after clicking
Monday, 4 October 2010
Android: Native icons how to use
In your android phone are many beautiful icons.Here is the list:http://developer.android.com/reference/android/R.drawable.html and here is more http://developer.android.com/design/downloads/index.html
To use:
To use:
- in recourses android:icon="@android:drawable/<name of your element>"
- in java code android.R.drawable.<name of your element>
But be aware:
Warning: Because these resources can change between platform versions, you should not reference these icons using the Android platform resource IDs (i.e. menu icons under android.R.drawable).
Rather, you are adviced to make a local copy
Android: Unparsed aapt error
This error appears when you change smth in xml and it changes in recourses not correctly( may be it's bug)
Solution: go in Eclipse to Project>clean it will load last successful build, Good Luck!)
Solution: go in Eclipse to Project>clean it will load last successful build, Good Luck!)
Saturday, 2 October 2010
Thursday, 30 September 2010
Android:The easiest way to load image from URL
The easiest way to download image from URL is to use
main.xml:
method Drawable.createFromStream
:main.xml:
<linearlayout android:id="@+id/LinearLayout01" android:layout_height="fill_parent" android:layout_width="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"> <imageview android:id="@+id/ImageView1" android:layout_height="wrap_content" android:layout_width="wrap_content"> </imageview></linearlayout>
Wednesday, 29 September 2010
Android: Beginning
Here are a few steps to begin develop for Android:
- Install JDK
- Install Eclipse IDE
- Install Android SDK
- Instal Eclipse Android plugin
How to do all steps more detailed here (Russian lang)
Good resource
UPDATE: use this link http://developer.android.com/sdk/index.html
Subscribe to:
Posts (Atom)