내 XML : SDK 3 (1.5) 및 SDK에서안드로이드 : 상대 레이아웃 문제
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView android:id="@+id/Title" android:text="title"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:singleLine="true" android:layout_alignParentTop="true" />
<EditText android:id="@+id/ReplyText" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:gravity="top"
android:layout_below="@+id/Title" android:layout_above="@+id/Save" />
<!-- <WebView android:id="@+id/webview" android:layout_width="fill_parent"-->
<!-- android:layout_height="fill_parent" android:layout_below="@+id/Title"-->
<!-- android:layout_above="@+id/Save"/>-->
<Button android:text="Save" android:id="@+id/Save"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" />
</RelativeLayout>
출력 9 (2.3)
질문 : 왜 글고 1.5 버전에서 표시되지 않는 이유는 무엇입니까? 그것은 두 버전에서 완벽하게 웹보기를 표시
WebView mWebView = (WebView) findViewById(R.id.webview);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.loadData("test", "text/html", "utf-8");
mWebView.setWebViewClient(new WebViewClient());
: 나는에서 onCreate 메서드에서 추가 약간의 코드를 웹보기 와 글고 치기를 교체하는 경우 때문에
,이 용액이 있어야합니다.
목표 : 머리글과 바닥 글 요소를 그림과 같이 표시하고 가운데 요소의 나머지 높이를 전체 높이/너비로 설정하고 싶습니다.
android:layout_below="@+id/Title" android:layout_above="@+id/Save"
@+id
수단은 새 ID를 추가하고,이 경우에 당신은 (이미 정의 된 ID에 다스 려하는 당신이 android:id="@+id/Title"
에서 그들을 정의 :이 문제가 될 수 있지만,이 잘못된 경우