[여기에 이미지 설명을 입력하십시오] [1] 배경의 고정 된 크기로 장치의 절반 화면을 채우는 텍스트 뷰를 설정해야합니다. 나는이 코드를 시도하지만 나는 할 수 없다. 목표는 : 하프 스크린, 위로 나는 이미지를, 텍스트 뷰는 보여줍니다.background textview 하프 스크린
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000"
android:orientation="vertical" >
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical" >
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/luna"
android:textSize="15pt" />
<ScrollView
android:id="@+id/scrollView10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#000000" >
<TextView
android:id="@+id/textView10"
android:layout_width="match_parent"
android:layout_height="320dp"
android:background="#000000"
android:gravity="center"
android:textColor="#ffffff"
android:textSize="14sp"
android:text="jjkjkljkjkldjklsdfjkljklsdfjklsdfjklsdfjklsdfjklsdfjklsdfjklfjlsdfjkl"
android:autoLink="web|email"
android:textStyle="italic" />
</ScrollView>
</LinearLayout>
<Button
android:id="@+id/button10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Chiudi" />
</LinearLayout>
답장을 보내 주셔서 감사합니다. 괜찮아 보이지만 이미지 손실 비율 –
난 여기에 ScrollView 필요 없어 생각합니다. TextView의 텍스트가 높이를 초과하면 textView에서 스크롤을 활성화 할 수 있기 때문에 –
감사합니다! 이미지가 비율을 유지하지 않습니다. 내가 고칠 수 있니? –