Destroy Webview

by nikhil » Fri, 29 Jan 2010 04:33:28 GMT


Sponsored Links
 I am trying to destroy the webview in the onPause method. But it
doesnt destroy and rather pulls up the android source path code..

The definition says "This method should be called after the WebView
has been removed from the view system"

What does view system mean?

--



Destroy Webview

by nikhil » Sat, 30 Jan 2010 00:22:57 GMT


 any idea?




--


Sponsored Links


Other Threads

1. Tattoo Android 2.1

Hi,

I start port rom Android 2.1 for Tattoo ( QVGA 240x320, low density,
small screen), but i have some problem with touchscreen.

I Change "ro.sf.lcd_density = 160"  to  "ro.sf.lcd_density = 120" and
some lines in build.prop

# View configuration for QVGA
view.fading_edge_length = 8
view.touch_slop = 15
view.minimum_fling_velocity = 25
view.scroll_friction = 0.008

Boot from device is ok and screen seems to be ok too.
Touchscreen is very erratic, on Unlocksim screen : 1 button display 8
on screen, 2 button display 2 (good) on screen etc etc.

There is somes faq or tools  for calibrate touchscreen ?

Thx for your help.

-- 

2. Overrided SimpleCursorAdapter bindView not being called

Hi guys,

The problem is as follows:
- My app is deriving from TabActivity that has 3 tabs
- Each tab has a ListView
- Tab1 is populated by an adapter that inherit SimpleCursorAdapter and overrided the bindView() method. This tab is displaying correctly. - Tab 2 is also populated by another adatper that inherit SimpleCursorAdapter and overrided the bindView() method. For some reason that I don't understand, the overrided bindView() is not being called. Thus the tab is not displaying correctly. Here's my code fragment: *MyApp.java* public class MyApp extends TabActivity { private TabHost mTabHost; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mTabHost = getTabHost(); mTabHost.addTab(mTabHost.newTabSpec("tab1").setIndicator("Tab1").setContent(R.id.TAB1)); mTabHost.addTab(mTabHost.newTabSpec("tab2").setIndicator("Tab2").setContent(R.id.TAB2)); mTabHost.addTab(mTabHost.newTabSpec("tab3").setIndicator("Tab3").setContent(R.id.TAB3)); mTabHost.setCurrentTabByTag("tab1"); ListView view1 = (ListView)findViewById(R.id.TAB1); populate(view1); ListView view2 = (ListView)findViewById(R.id.TAB2); populate2(view2); } private void populate(ListView view) { ... // some code that fills cursor1 ... adapter1 = new Adapter1(this, R.layout.tab1_entry, cursor1, from1, to1); view.setAdapter(adapter1); } // private void populate2(ListView view) { ... // some code that fills cursor2 // I have traced in de{*filter*} that cursor2, from2, to2 are not null ... adapter2 = new Adapter2(this, R.layout.tab2_entry, cursor2, from2, to2); view.setAdapter(adapter2); } } *Adapter1.java* public class Adapter1 extends SimpleCursorAdapter { Activity mActivity; public Adapter1(Activity activity, int layout, Cursor c, String[] from, int[] to) { super(activity, layout, c, from, to); mActivity = activity; } /** * {...@inheritdoc} */ @Override public void bindView(View view, Context context, Cursor cursor) { super.bindView(view, context, cursor); ... // Do custom binding, this is working fine ... } } *Adapter2.java* public class Adapter2 extends SimpleCursorAdapter { public Adapter2(Context context, int layout, Cursor c, String[] from, int[] to) { super(context, layout, c, from, to); } /** * {...@inheritdoc} */ @Override public void bindView(View view, Context context, Cursor cursor) { ... // Do custom binding here // But this function is never being called. // I put breakpoint here in de{*filter*}, the method is not entered ... } } * **main.xml* <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android=" http://www.***.com/ ; android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout xmlns:android=" http://www.***.com/ ; android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ListView android:id="@+id/TAB1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Tab 1" /> <ListView android:id="@+id/TAB2" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Tab 2" /> <ListView android:id="@+id/TAB3" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Tab 3" /> </FrameLayout> </LinearLayout> </TabHost> *tab1_entry.xml* <LinearLayout xmlns:android=" http://www.***.com/ ; android:layout_width="wrap_content" android:layout_height="wrap_content"> <TextView android:text="@+id/Field11" android:id="@+id/Field11" android:focusable="false" android:clickable="false" android:layout_width="fill_parent" android:layout_height="wrap_content"/> <ImageView android:id="@+id/separator1" android:layout_width="wrap_content" android:layout_height="fill_parent" android:focusable="false" android:clickable="false" android:layout_alignParentTop="true" android:layout_alignParentBottom="true" android:layout_marginRight="4px"/> <TextView android:text="@+id/Field12" android:id="@+id/Field12" android:focusable="false" android:clickable="false" android:phoneNumber="true" android:layout_width="fill_parent" android:layout_height="wrap_content"/> <ImageView android:id="@+id/separator2" android:layout_width="wrap_content" android:layout_height="fill_parent" android:focusable="false" android:clickable="false" android:layout_alignParentTop="true" android:layout_alignParentBottom="true" android:layout_marginRight="4px"/> <TextView android:text="@+id/Field13" android:id="@+id/Field13" android:phoneNumber="true" android:focusable="false" android:clickable="false" android:layout_width="fill_parent" android:layout_height="wrap_content"/> </LinearLayout> *tab2_entry.xml* <LinearLayout xmlns:android=" http://www.***.com/ ; android:layout_width="wrap_content" android:layout_height="wrap_content"> <TextView android:text="@+id/Field21" android:id="@+id/Field21" android:focusable="false" android:clickable="false" android:layout_width="fill_parent" android:layout_height="wrap_content"/> <ImageView android:id="@+id/separator3" android:layout_width="wrap_content" android:layout_height="fill_parent" android:focusable="false" android:clickable="false" android:layout_alignParentTop="true" android:layout_alignParentBottom="true" android:layout_marginRight="4px"/> <TextView android:text="@+id/Field22" android:id="@+id/Field22" android:focusable="false" android:clickable="false" android:phoneNumber="true" android:layout_width="fill_parent" android:layout_height="wrap_content"/> <ImageView android:id="@+id/separator4" android:layout_width="wrap_content" android:layout_height="fill_parent" android:focusable="false" android:clickable="false" android:layout_alignParentTop="true" android:layout_alignParentBottom="true" android:layout_marginRight="4px"/> <TextView android:text="@+id/Field23" android:id="@+id/Field23" android:phoneNumber="true" android:focusable="false" android:clickable="false" android:layout_width="fill_parent" android:layout_height="wrap_content"/> </LinearLayout> Thanks & Regards, Seamus Huang --

3. How to make a group for RadioButton as one of items in a custom ListView?

4. Use HTTP post method or Simple Java Socket Program

5. get all pendingintent

6. Downloading a file from a URL extremely slow, optimization advice needed.

7. Copy a resource to SD card on launch