Display small portion of HTML file in WebView

by mansur » Wed, 21 Apr 2010 10:39:59 GMT


Sponsored Links
 Hi All,

We have a large HTML which contents 1000's of lines. But we want to
show content of the HTML file that fits a
single screen.  We want provide a '>'  kind of to show the next
contents of the same HTML file.

Our objective is to only display the HTML contents that fits the
screen.Similar to reader application  For user, it seems there are
several pages.

Is there any way in which we can achieve this functionality. Whether
WebView has any function related to full fill the requirement.

Thanks and Regards,
Mansur Agasar

--



Other Threads

1. Bluetooth connection refused

hi erveryone, i have a problem when i use BluetoothSocket.connect(),
it cause the "connection refused" error as follow:


11-21 00:25:11.086: DEBUG/dalvikvm(16199): De{*filter*} has detached;
object registry had 1 entries
11-21 00:25:11.086: INFO/ActivityManager(85): Start proc
com.liqiang.bluetooth for activity
com.liqiang.bluetooth/.MainActivity: pid=16206 uid=10075 gids={3002,
3001}
11-21 00:25:11.096: INFO/AndroidRuntime(16199): NOTE: attach of thread
'Binder Thread #3' failed
11-21 00:25:11.146: DEBUG/dalvikvm(16206): De{*filter*} has detached;
object registry had 1 entries
11-21 00:25:11.226: VERBOSE/RenderScript_jni(164): surfaceDestroyed
11-21 00:25:13.566: WARN/KeyCharacterMap(16206): No keyboard for id
65540
11-21 00:25:13.576: WARN/KeyCharacterMap(16206): Using default
keymap: /system/usr/keychars/qwerty.kcm.bin
11-21 00:25:14.046: INFO/ActivityManager(85): Displayed activity
com.liqiang.bluetooth/.MainActivity: 2966 ms (total 2966 ms)
11-21 00:25:14.496: INFO/ActivityManager(85): Starting activity:
Intent { cmp=com.liqiang.bluetooth/.DeviceListActivity }
11-21 00:25:14.866: INFO/ActivityManager(85): Displayed activity
com.liqiang.bluetooth/.DeviceListActivity: 336 ms (total 336 ms)
11-21 00:25:15.546: ERROR/BluetoothEventLoop.cpp(85): event_filter:
Received signal org.bluez.Adapter:PropertyChanged from /org/bluez/
13302/hci0
11-21 00:25:15.546: VERBOSE/BluetoothEventRedirector(11131): Received
android.bluetooth.adapter.action.DISCOVERY_STARTED
11-21 00:25:15.686: DEBUG/dalvikvm(11131): GC_FOR_MALLOC freed 8312
objects / 545176 bytes in 61ms
11-21 00:25:16.376: ERROR/BluetoothEventLoop.cpp(85): event_filter:
Received signal org.bluez.Adapter:DeviceFound from /org/bluez/13302/
hci0
11-21 00:25:16.386: DEBUG/BluetoothService(85):
updateDeviceServiceChannelCache(00:1C:26:D4:B6:8A)
11-21 00:25:16.406: VERBOSE/BluetoothEventRedirector(11131): Received
android.bluetooth.device.action.FOUND
11-21 00:25:16.406: INFO/DeviceListActivity(16206): ACTION_FOUND----->
11-21 00:25:16.576: ERROR/BluetoothEventLoop.cpp(85): event_filter:
Received signal org.bluez.Adapter:DeviceFound from /org/bluez/13302/
hci0
11-21 00:25:16.576: DEBUG/BluetoothService(85):
updateDeviceServiceChannelCache(00:26:5E:97:37:97)
11-21 00:25:16.596: VERBOSE/BluetoothEventRedirector(11131): Received
android.bluetooth.device.action.FOUND
11-21 00:25:16.596: INFO/DeviceListActivity(16206): ACTION_FOUND----->
11-21 00:25:20.417: ERROR/BluetoothEventLoop.cpp(85): event_filter:
Received signal org.bluez.Adapter:PropertyChanged from /org/bluez/
13302/hci0
11-21 00:25:20.417: ERROR/BluetoothService.cpp(85):
stopDiscoveryNative: D-Bus error in StopDiscovery:
org.bluez.Error.Failed (Invalid discovery session)
11-21 00:25:20.426: VERBOSE/BluetoothEventRedirector(11131): Received
android.bluetooth.adapter.action.DISCOVERY_FINISHED
11-21 00:25:20.426: INFO/DeviceListActivity(16206):
ACTION_DISCOVERY_FINISHED---->
11-21 00:25:20.446: DEBUG/BluetoothTest(16206): onActivityResult -1
11-21 00:25:20.446: DEBUG/BluetoothTest(16206): onActivityResult----
requestCode 1
11-21 00:25:20.706: ERROR/BluetoothService.cpp(85):
stopDiscoveryNative: D-Bus error in StopDiscovery:
org.bluez.Error.Failed (Invalid discovery session)
11-21 00:25:21.986: ERROR/BluetoothService.cpp(85):
stopDiscoveryNative: D-Bus error in StopDiscovery:
org.bluez.Error.Failed (Invalid discovery session)
11-21 00:25:22.556: ERROR/BluetoothEventLoop.cpp(85): event_filter:
Received signal org.bluez.Adapter:DeviceCreated from /org/bluez/13302/
hci0
11-21 00:25:22.566: ERROR/BluetoothEventLoop.cpp(85): event_filter:
Received signal org.bluez.Adapter:PropertyChanged from /org/bluez/
13302/hci0
11-21 00:25:22.566: ERROR/BluetoothEventLoop.cpp(85): event_filter:
Received signal org.bluez.Device:PropertyChanged from /org/bluez/13302/
hci0/dev_00_1C_26_D4_B6_8A
11-21 00:25:22.596: INFO/BluetoothEventLoop.cpp(85):
agent_event_filter: Received method org.bluez.Agent:RequestPinCode
11-21 00:25:22.596: DEBUG/BluetoothService(85): 00:1C:26:D4:B6:8A bond
state 10 -> 11 (0)
11-21 00:25:22.606: VERBOSE/BluetoothEventRedirector(11131): Received
android.bluetooth.device.action.BOND_STATE_CHANGED
11-21 00:25:22.616: INFO/ActivityManager(85): Starting activity:
Intent { act=android.bluetooth.device.action.PAIRING_REQUEST
flg=0x10000000
cmp=com.android.settings/.bluetooth.BluetoothPairingDialog (has
extras) }
11-21 00:25:23.119: WARN/ActivityManager(85): Activity pause timeout
for HistoryRecord{44b675d0 com.liqiang.bluetooth/.MainActivity}
11-21 00:25:23.426: INFO/ActivityManager(85): Displayed activity
com.android.settings/.bluetooth.BluetoothPairingDialog: 313 ms (total
313 ms)
11-21 00:25:29.426: DEBUG/dalvikvm(15812): GC_EXPLICIT freed 969
objects / 70920 bytes in 87ms
11-21 00:25:36.066: ERROR/BluetoothEventLoop.cpp(85): event_filter:
Received signal org.bluez.Device:PropertyChanged from /org/bluez/13302/
hci0/dev_00_1C_26_D4_B6_8A
11-21 00:25:36.066: DEBUG/BluetoothService(85): 00:1C:26:D4:B6:8A bond
state 11 -> 12 (0)
11-21 00:25:36.086: VERBOSE/BluetoothEventRedirector(11131): Received
android.bluetooth.device.action.BOND_STATE_CHANGED
11-21 00:25:36.116: WARN/System.err(16206): java.io.IOException:
Connection refused
11-21 00:25:36.116: WARN/System.err(16206):     at
android.bluetooth.BluetoothSocket.connectNative(Native Method)
11-21 00:25:36.116: WARN/System.err(16206):     at
android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:204)
11-21 00:25:36.116: WARN/System.err(16206):     at
com.liqiang.bluetooth.MainActivity.connect(MainActivity.java:226)
11-21 00:25:36.116: WARN/System.err(16206):     at
com.liqiang.bluetooth.MainActivity.access$2(MainActivity.java:207)
11-21 00:25:36.116: WARN/System.err(16206):     at
com.liqiang.bluetooth.MainActivity$1.onClick(MainActivity.java:93)
11-21 00:25:36.116: WARN/System.err(16206):     at
android.view.View.performClick(View.java:2408)
11-21 00:25:36.116: WARN/System.err(16206):     at android.view.View
$PerformClick.run(View.java:8816)
11-21 00:25:36.116: WARN/System.err(16206):     at
android.os.Handler.handleCallback(Handler.java:587)
11-21 00:25:36.116: WARN/System.err(16206):     at
android.os.Handler.dispatchMessage(Handler.java:92)
11-21 00:25:36.127: WARN/System.err(16206):     at
android.os.Looper.loop(Looper.java:123)
11-21 00:25:36.127: WARN/System.err(16206):     at
android.app.ActivityThread.main(ActivityThread.java:4627)
11-21 00:25:36.127: WARN/System.err(16206):     at
java.lang.reflect.Method.invokeNative(Native Method)
11-21 00:25:36.127: WARN/System.err(16206):     at
java.lang.reflect.Method.invoke(Method.java:521)
11-21 00:25:36.127: WARN/System.err(16206):     at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-21 00:25:36.127: WARN/System.err(16206):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-21 00:25:36.137: WARN/System.err(16206):     at
dalvik.system.NativeStart.main(Native Method)

anything idea?
thanks

-- 

2. can't find my location through gps

Location location=locationManager.getLastKonwLocation(provider);
i find that location==null;
through my G4 i can find my location but int System 1.5 i find
nothing,who can tell me why?

this is code :
public void onCreate()
    {

        super.onCreate();
        //PengPengShare.tv.setText("");
        init();
    }
    /*
    public void onStart(Intent intent,int startId)
    {
        super.onStart(intent, startId);
        //init();
        PengPengShare.tv.setText("");
    }*/
    private final LocationListener locationListener=new
LocationListener()
    {

                @Override
                public void onLocationChanged(Location location) {
                        // TODO Auto-generated method stub
                        upadateWithNewLocation(location);
                }

                @Override
                public void onProviderDisabled(String provider) {
                        // TODO Auto-generated method stub
                        upadateWithNewLocation(null);
                }

                @Override
                public void onProviderEnabled(String provider) {
                        // TODO Auto-generated method stub

                }

                @Override
                public void onStatusChanged(String provider, int status, Bundle
extras) {
                        // TODO Auto-generated method stub

                }

    };
    private void init() {
                // TODO Auto-generated method stub
        /*€GPS         boolean gpsEnabled =
Settings.Secure.isLocationProviderEnabled( getContentResolver(),
LocationManager.GPS_PROVIDER );
         if(gpsEnabled)
         {
         //GPS
 
Settings.Secure.setLocationProviderEnabled( getContentResolver(),
LocationManager.GPS_PROVIDER, false );
         }
         else
         {
         //GPS
 
Settings.Secure.setLocationProviderEnabled( getContentResolver(),
LocationManager.GPS_PROVIDER, true);
         }*/

        
locManager=(LocationManager)getSystemService(Context.LOCATION_SERVICE);
                criteria=new Criteria();
                criteria.setAccuracy(0);
                //€                /*
                   criteria.setAccuracy(Criteria.ACCURACY_FINE);//            criteria.setAltitudeRequired(false);//           criteria.setBearingRequired(false);//            criteria.setCostAllowed(true);//
           criteria.setPowerRequirement(Criteria.POWER_LOW);// 
        //ps
        /*Settings.Secure.putString(getContentResolver(),
                Settings.Secure.LOCATION_PROVIDERS_ALLOWED,
                 "network");
        Settings.Secure.putString(getContentResolver(),
                  Settings.Secure.LOCATION_PROVIDERS_ALLOWED,
                 "gps");*/
                criteria.setAltitudeRequired(false);
            criteria.setBearingRequired(false);
            criteria.setCostAllowed(false);
            criteria.setPowerRequirement(Criteria.POWER_LOW);
            provider=locManager.getBestProvider(criteria, true);
            location=locManager.getLastKnownLocation(provider);
            //€            if(location==null)
            {
                 //upadateWithNewLocation(location);
            locManager.requestLocationUpdates(provider, 10, 10,
locationListener);

            //locationManager.removeUpdates(locationListener);
        }}
        private void upadateWithNewLocation(Location location2) {
                // TODO Auto-generated method stub
                if(location!=null)
                {
                jingDu=location.getLongitude();
                weidu=location.getLatitude();
                PengPengShare.tv.setText(jingDu+"");
                PengPengShare.tv2.setText(weidu+"");

                //-1
                //Socket€€
                /*SendLocation send=new SendLocation();
                //€€socket€                send.sendJingduLocation(jingDu);
                send.sendWeiduLocation(weidu);*/
        }
                else
                        {

                        PengPengShare.tv.setText("hha");
           //isGetLocation=false;//
            //AlertDialog ad=new
AlertDialog.Builder(context).setIcon(R.drawable.icon).setTitle("quot;)
            //.setPositiveButton("OK",null).setMessage("quot;).create();
            //ad.show();
                        Log.i("ssss","sssss");
                        }
                        }
        public void onDestroy()
    {
        super.onDestroy();
        //locManager.addGpsStatusListener(listener);
    }
}

-- 

3. eGalax touch support

4. FACEBOOK ANDROID SDK API Problem to get access token

5. App shows up on PC search but not on mobile device search

6. Activity Lifecycle

7. Make Text View Editable upon longclick