Using arrays from arrays.xml in Android

There is a possibility to store arrays in application package. You need to create file arrays.xml under /res/values. In this file you can save arrays as much as you want. Also it is easy to get them from this file. I found it very useful and I am going to share this information.

. . . →Read More:Using arrays from arrays.xml in Android

Share

Validating user input with regular expression in EditText component in Android

What if you need to validate user input in EditText component. For example you need to save some file and filename user should set at EditText component. You can specify what chars can be used in this component,but how you determine how match “.”are there.

. . . →Read More:Validating user input with regular expression in EditText component in Android

Share

Filtering data in EditText component in Android

There are some situations when need to filter data in your EditText component. For example your EditText component represent email,phone number,city and so on. I these cases you want that your EditText component recieved only some specific data. You can use android:inputType tag in your layout xml file,but sometimes you need to . . . →Read More:Filtering data in EditText component in Android

Share

Put cursor at specific position in EditText component in Android

I found a lot of the same questions on several Android Dev forums:“How to put cursor at specific position in EditText?”. As I understood,new to platform developers can’t find proper method. At the first blush this is strange situation,because there is no such method as putCursor or setCursor,but if you will . . . →Read More:Put cursor at specific position in EditText component in Android

Share

Making not editable EditText component in Android

I found that there is a some problem to do EdiText component not editable from code. Yes,it is very easy to do that from layout xml file. There you can use tag android:editable which allows to set will this component editable or not.

. . . →Read More:Making not editable EditText component in Android

Share

Using SubActivities in AndroidUsing SubActivities in Android

Sometimes you need to run some Activity,do some operation there and return some value to parent Activity. For this situation Android has possibility to run Activity for result.

. . . →Read More:Using SubActivities in Android

Share

Getting formatted string from strings.xml in Android

I found a way how to get formatted string from strings.xml file.

I am going to show how I did it. Please refer to getString method.

. . . →Read More:Getting formatted string from strings.xml in Android

Share

Deleting Widget from Android

There are 2 approaches:

Uninstall widget from emulator/device Delete widget from Home screen

First:You need to remove widget as any other application through:Settings->Applications->Manage Applications->YourWidget->Uninstall

Second:It will not the code snippet,it will use case.

There are 2 steps:

Tap widget and hold your finger down. You will notice that the “slider”that . . . →Read More:Deleting Widget from Android

Share

Email sending in AndroidEmail sending in Android

Today I am going to show code snippet and example about how to send email from code.

In example I will open my email client with predefined data in fields: To,Subject,Message.

. . . →Read More:Email sending in Android

Share

Making an fullscreen Activity in Android

There are 2 ways how to make an fullscreen activity. One from code other from AndroidManifest.xml. I am going to show both of them.

. . . →Read More:Making an fullscreen Activity in Android

Share

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna,tincidunt vitae molestie nec,molestie at mi. Nulla nulla lorem,suscipit in posuere in,interdum non magna.