Rectangle 27 0

public class MyWebView extends WebView
{
    Context mContext;

    public MyWebView(Context context)
    {
        super(context);
        mContext = context;
    }

    public MyWebView(Context context, AttributeSet attrs)
    {
        super(context, attrs);
        mContext = context;
    }

    public MyWebView(Context context, AttributeSet attrs, int defStyle)
    {
        super(context, attrs, defStyle);
        mContext = context;
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        if (event.getAction() == MotionEvent.ACTION_DOWN){

            int temp_ScrollY = getScrollY();
            scrollTo(getScrollX(), getScrollY() + 1);
            scrollTo(getScrollX(), temp_ScrollY);
        }
        return super.onTouchEvent(event);
    }
}

For some reason getScrollY and scrollTo are not being recognized in Eclipse. Im using PhoneGap and trying to trying to implement in my class that extends DroidGap.

html - Android webview and Twitter bootstrap fixed navbar can't be cli...

android html css twitter-bootstrap
Rectangle 27 0

webView.getSettings().setDomStorageEnabled(true);

This is unnecessary, no storage is being accessed. setJavaScriptEnabled(true) is also unnecessary for this particular example, although it's not the problem and I'm sure it's planned to be used later.

html - Twitter Bootstrap not working in Android WebView - Stack Overfl...

android html eclipse twitter-bootstrap webview
Rectangle 27 0

Tested on emulator - Android version 4.2 with Bootstrap v2.3.2

bootstrap-responsive.css
 bootstrap.css
 test.html

No need to add "android.permission.INTERNET" in Android manifest since css files are available locally within the app's asset folder.

Here's a screenshot of how it is rendered. There is no reason why you could not see it unless there are issues with the CSS files (which is again unlikely since you can see the results on browser).

html - Twitter Bootstrap not working in Android WebView - Stack Overfl...

android html eclipse twitter-bootstrap webview
Rectangle 27 0

I take it from your edit on June 4th that the problem still exists and maybe due to an issue in Android JB.

Even if not an issue in Android, bootstrap 3 does not support the Android browsers which is used by the webview in JB.

The only solution that I'm aware of is to use Intel's crosswalk project (probably via Cordova or Google's CCA) to bundle a current version of Chromium as your webview, rather then depending on the platform's webview, the capabilities and quirks of which vary enormously depending on Android version.

Downside of this is an extra 18MB, which I'm sure you don't want, but this way you get a consistent webview for your app across all versions of Android.

html - Android webview and Twitter bootstrap fixed navbar can't be cli...

android html css twitter-bootstrap