어플리케이션 내에 embeded 브라우저를 연동하려고 아래와 같이 코딩하였습니다만...정상적으로 브라우저가 뜨지 않습니다.
>> webviewer.xml
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|top" android:stretchColumns="*">
<TableRow>
<Button android:text="닫기"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/webclose"></Button>
</TableRow>
</TableLayout>
<WebView
android:id="@+id/web_holder"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
>> webviewer.java
public class WebViewer extends Activity {
WebView m_webview;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.webviewer);
Button closeWeb = (Button)findViewById(R.id.webclose);
closeWeb.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
finish();
}
});
m_webview = (WebView) findViewById(R.id.web_holder);
m_webview.getSettings().setJavaScriptEnabled(true);
m_webview.loadUrl("http://m.naver.com");
}
위의 WebViewer activity를 뛰우면 닫기 버튼만 보이고 하단에 브라우저가 뜨지 않습니다.
무슨 문제인지 알려주세요..
위의 URL을 m.naver.com > www.google.com 으로 변경시 embeded 창에 뜨지 않고 별도의 브라우저가 뜨면서 google 은 접속이 됩니다.