내 앱이 인물 모드에서 잠겨 있습니다. 기본적으로 항목의 목록 (알 수없는 길이이지만 스크롤 가능)이며 앱의 하단이 고정 된 크기의 Webview가되기를 원합니다.고정 크기의 WebView 앱의 하단 부분
그래서 그게 전부 같은 : 응용 프로그램의 상단 부분 = ListView에 응용 프로그램의 하단 부분 = 웹보기
내가 고정 된 크기로 웹보기 필요가 200dp 말하고 ListView에는 나머지 공간을 얻어야한다.
아이디어가 있으십니까?
내 앱이 인물 모드에서 잠겨 있습니다. 기본적으로 항목의 목록 (알 수없는 길이이지만 스크롤 가능)이며 앱의 하단이 고정 된 크기의 Webview가되기를 원합니다.고정 크기의 WebView 앱의 하단 부분
그래서 그게 전부 같은 : 응용 프로그램의 상단 부분 = ListView에 응용 프로그램의 하단 부분 = 웹보기
내가 고정 된 크기로 웹보기 필요가 200dp 말하고 ListView에는 나머지 공간을 얻어야한다.
아이디어가 있으십니까?
지금처럼?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:layout_width="fill_parent"
a:layout_height="fill_parent" >
<WebView
a:id="@+id/webView1"
a:layout_width="match_parent"
a:layout_height="200dp"
a:layout_alignParentBottom="true"
a:layout_alignParentLeft="true" />
<ListView
a:id="@+id/listView1"
a:layout_width="match_parent"
a:layout_height="wrap_content"
a:layout_above="@id/webView1"
a:layout_alignParentTop="true"
a:layout_centerHorizontal="true" >
</ListView>
</RelativeLayout>
난 당신이 또한 단지의 LinearLayout의 순서로 목록보기와 웹보기를 넣을 수 있습니다 생각하고, 안드로이드를 설정 : layout_weight를 = "1"목록보기
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:oritation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ListView
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"/>
<WebView
android:layout_width="match_parent"
android:layout_height="200dp"/>
에 </Linearlayout>
빠른 팁 ... 무게를 설정하는 경우 높이를 0으로 설정하면 성능이 좋다고 생각합니다. – dineth
오, 고마워! 가중치를 설정하면 높이를 0dip으로 설정하는 것이 더 나은 성능을냅니다. ecplise의 ADT조차도 그걸 생각 나게 할 것입니다. 그러나 나는 그것을 잊어 버립니다 .-) –