Showing posts with label finish. Show all posts
Showing posts with label finish. Show all posts

Sunday, February 19, 2012

New version available of PersonalDictionary

A new version of PersonalDictionary is now available at the android market, still free version. With a new interface and new functions, export and import files.



Exporting and importing files make easier to share your dictionary with your friends, It uses an easy structure, It should contain the list of words as:
lang_a     lang_b
lang_a     lang_b
lang_a     lang_b

The word in the translated language and the original are delimited by a tab character (/t) and one pair of words from another by a new line character (/n).

Now the main options are delimited (still you can create words when searching) in Search, Add and Copy.

Search is used for search and consult the words that our dictionary contains, with the possibility to modify/delete one of them by selecting It. Moreover, there you can add new words by writting the translated word and clicking on the "add" button.


Add is used for add new words, where you can add the original word and the translated word.




You can find more information about PersonalDictionary and download It in the android market


Sunday, January 29, 2012

Android: Updating values when returning from another activity

The problem that I had was that when returning from an activity the list was not getting update until a keyEvent was realized.

For example, the main activity contain a list of strings that gets from a database, It is updated by using the action FillData(), and I had an activity for add new elements to the database, and another for modify or delete.

The problem was that when creating/adding/modifying the values at one of the other activities and finishing this activies (returning to the main activity) the list was not updated with the new values.

The solution of this problem is to Overrite the onResume() event, looking at the graph of http://developer.android.com/reference/android/app/Activity.html that when the event is Paused, later on is called the onResume event.

For example in my case:

@Override
public void onResume(){
      super.onResume();
      EditText searchTextField=(EditText) findViewById(R.id.searchTextField);
      fillData(searchTextField.getText());
}

I get the value from an EditText field getting the filter to use when filling the list and later call to fillData that fullfills the list.