NotepadV3 Issues

by Olly » Fri, 10 Sep 2010 00:22:32 GMT


Sponsored Links
 Hi,

I am only a beginner to Android, but I have noticed a number of things
that seem a little strange in the third notepad tutorial:

- The tutorial explicitly states that you need to call saveState from
BOTH onSaveInstanceState and onPause. Is this really necessary? It
seems to me from reading the process life-cycle documentation that
onPause will always be called before the Activity is killed,
regardless of whether it is done so by the system or the user. If this
is the case, surely just calling saveState from onPause is sufficient?
- Calling populateFields() in both onResume and onCreate is pointless,
since onResume is always called after onCreate anyway. Hence if I
understand correctly, the call in onCreate serves no useful purpose
and can be safely removed.

Could someone please either confirm these points, or let me know what
I have misunderstood.

Olly

--



Other Threads

1. how to check if another application has been started

Hey guys, I'm trying to create an application where I need to check if
an application has been started. So for example, if the calendar was
clicked, before the calendar came up, my application would start up.
Is there any way to do this?

Cheers
--~--~---------~--~----~------------~-------~--~----~

2. Managing view's refresh delay and soft keyboard

I repost here what I've already written on the Android Developer group
cause it fit better here.

Hi to everyone. I start trying out some stuff with Android from few
days so there's lot I don't know but I hope not to sound too stupid.
Here are the first problems I'm facing

1) I have a ListView where each item is made of two icon (on the left
and right side) and an EditText, disabled, in the middle. I have a
button to add new element to the lists and what I want to happen is
that clicking on it a new lne appears in the ListView with the focus
on the EditText so that the user can type a label for the object.
What I tried to do when the button is clicked is:
- add a new object to the array binded to the ListView;
- notify the array adapter that a change as occoured in the data
- retrieve the view object for the last child added to the ListView
- set the focus on the EditText
The problem is that between the call of notifyDataSetChanged() and the
 creation of a new child in the ListView there's a delay and so I'm
not able to get the new created view in the click handler. What's the
best way to handle it?

2) Considering the same scenario when I give focus to the EditText I
see the cursor for editing the field value but the soft keyboard
doens't appear. That's perfect on a device with an hard keyboard, but
what would happen if the device doesn't have one?
The other thing I find weird is that when I tap the EditText the
keyboard finally appears but the field lost the focus so I can type
whatever I want but nothing appear in the field. This latest thing
seems to be in some way related to the fact the EditText is part of
the layout used to display each item in the list. Any idea on how to
solve it?

That's all, I hope it was fairly clear and to get some help.
Thank you for reading

Andrea

--~--~---------~--~----~------------~-------~--~----~

3. Dialo

4. Problem running HelloWorld (or anny sample application)

5. ADT Plugin for Eclipse Source Code

6. How to add a keyboard localisation

7. Fellow Android Developers...