WebView is not clearing history.

by Obormot » Sat, 07 Feb 2009 05:46:51 GMT


Sponsored Links
 Hi, guys.

I'm using the following code:

                        _articleView.loadArticle(section.getResource());
                        _articleView.clearHistory();

to ensure that nothing is left in the history and back button behaves
as usual.

Unfortunately, this code doesn't work for me and the
_articleView.canGoBack() still returns true.
Implementation of clearHistory method is quite complex and uses
asynchronous mechanism, which may not work immediately, but no matter
how much time I wait the history is still there.

Am I doing something wrong?

Thank you in advance!
A.
--~--~---------~--~----~------------~-------~--~----~



WebView is not clearing history.

by Obormot » Fri, 13 Feb 2009 08:57:14 GMT


 Hi, guys.

Sorry for bringing this up again, but it looks like it's a bug in the
WebView, which really hurts my project...
I found that it happens on the HTML pages with images. Pages without
images clear history as they're supposed to.
Might this be a synchronization issue?

I would really appreciate if somebody could clarify the situation and
maybe point me to a workaround...

Thank you in advance!






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


Sponsored Links


Other Threads

1. Local Service not Registering

Essentially my problem is this, I open my Activity. It binds to a
local service that "appears" to be connected. I get a force close when
I press the back button

"IllegalArgumentException: Service not registered" when unbind is
called in my onPause method...

public void onPause() {
                super.onPause();
                if (isFinishing()) {
                        if (mConnection != null){
                        Log.i(TAG,"onPause, mConnection" + 
mConnection.toString());
                        mDbS.unbindService(mConnection);
                        }else {
                                Log.i(TAG,"mConnection is null");
                        }
The service is bound in onCreate

// bind to our sdCard database using our Service Connection
                mServiceIntent = new Intent(this,DatabaseService.class);
                if(bindService(mServiceIntent, mConnection,
Context.BIND_AUTO_CREATE)){
                        Log.e(TAG, "service bound");
                }else{
                        Log.e(TAG, "service not bound");
                }

bindService is returning true.

My Service connection is as follows. onServiceConnected is called and
goes to completion. onService Disconnected is never called (presumably
because my service is in same process)

private ServiceConnection mConnection = new ServiceConnection() {
                public final String TAG = "LoadView.ServiceConnection"; //$NON-
NLS-1$

                public void onServiceConnected(ComponentName className, IBinder
service) {
                        mDbS = ((LocalBinder<DatabaseService>) 
service).getService();
                  .....
                        stuff not relevant
                   ....
                        Log.i(TAG, "finished onServiceConnected"); //$NON-NLS-1$
                }
                public void onServiceDisconnected(ComponentName className) {
                        Log.e(TAG, "onServiceDisconnectedCalled"); //$NON-NLS-1$
                }
        };

The only thing I do a little different is that I don't use an inner
class in my service for the Binder object - I use a separate class.
This is mostly because I have several databases and wanted code I
could reuse and set up simply rather than worry about all the ins and
outs and memory leak issues.

import android.os.Binder;
import android.util.Log;

public class LocalBinder<S> extends Binder {
        private String TAG = "LocalBinder";
        private  S mService;

        @SuppressWarnings("unused")
        private LocalBinder() {
        }

        public LocalBinder(S service){
                mService = service;
        }

        public S getService() {
                return mService;
        }

        public void finalize(){
                mService = null;
                try {
                        //TODO reinstate this after Issue 8046 is resolved
                        //super.finalize();
                } catch (Throwable e) {
                        Log.e(TAG,"Unable to finalize Binder");
                }

        }
}

Any ideas?

-- 

2. Suggestions for how to deal with IMEs ignoring flags?

Hi

I've recently got my hands on an X10, and have found that the Sony
Ericsson IME handles the EditorInfo.inputType flags differently to the
default Android IME and the HTC IME (i.e. anything > 0x0 results in
the IME displaying word suggestions, which I don't want).

Given that the behaviour varies, I wanted to add some code checking
whether that particular IME was in use and so set the flags
accordingly.  However, it appears that one cannot find out which IME
is currently in use (getEnabledInputMethodList() and
getInputMethodList() both return ALL the IMEs on the phone; well, it
does in the case of the X10).

Does anyone have any suggestions as to how to identify which IME is in
use (or programmtically set the X10s IME to not display word
suggestions)?

Cheers

James

-- 

3. sms sender id aneh

4. Cm 507

5. mapview on the top part of the screen ?

6. Button in ListView Event

7. android vs normal OS