heres how I constructed my main layout :
Using xml Syntax Highlighting
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout
- android:id="@+id/widget28"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical"
- xmlns:android="http://schemas.android.com/apk/res/android"
- >
- <AbsoluteLayout
- android:id="@+id/widget29"
- android:layout_width="320px"
- android:layout_height="50px"
- >
- <TextView
- android:id="@+id/widget31"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginBottom="5px"
- android:text=""
- android:textSize="18sp"
- android:typeface="monospace"
- android:layout_x="87px"
- android:layout_y="10px"
- >
- </TextView>
- </AbsoluteLayout>
- <AbsoluteLayout
- android:id="@+id/widget33"
- android:layout_width="320px"
- android:layout_height="330px">
- <WebView android:id="@+id/webview" android:layout_width="320px"
- android:layout_height="330px" />
- </AbsoluteLayout>
- <AbsoluteLayout
- android:id="@+id/widget34"
- android:layout_width="320px"
- android:layout_height="50px"
- >
- <ImageView
- android:id="@+id/widget35"
- android:layout_width="48px"
- android:layout_height="48px"
- android:layout_x="14px"
- android:layout_y="1px"
- android:background="@drawable/idisk">
- </ImageView>
- <ImageView
- android:id="@+id/widget55"
- android:layout_width="48px"
- android:layout_height="48px"
- android:layout_x="82px"
- android:layout_y="1px"
- android:background="@drawable/idiskgreen">
- </ImageView>
- <ImageView
- android:id="@+id/widget56"
- android:layout_width="48px"
- android:layout_height="48px"
- android:layout_x="149px"
- android:layout_y="1px"
- android:background="@drawable/movie">
- </ImageView>
- <ImageView
- android:id="@+id/widget57"
- android:layout_width="48px"
- android:layout_height="48px"
- android:layout_x="216px"
- android:layout_y="1px"
- android:background="@drawable/photo">
- </ImageView>
- </AbsoluteLayout>
- </LinearLayout>
Parsed in 0.003 seconds, using GeSHi 1.0.8.4
The java looks like this:
Using java Syntax Highlighting
- public class MainView extends Activity {
- WebView webview;
- /** Called when the activity is first created. */
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
- try{
- webview = (WebView) findViewById(R.id.webview);
- webview.getSettings().setJavaScriptEnabled(true);
- webview.loadUrl("http://m.twitter.com");
- } catch(Exception e){
- e.printStackTrace();
- }
Parsed in 0.010 seconds, using GeSHi 1.0.8.4
the web view takes up the whole screen although I want it to display in the certain area in the screen. Is there any other way to do it? Please help