[英]How to make clickable and open custom alert dialog in android listview?
[英]How To Make Custom Alert Dialog Display Correctly
有麻煩使此客戶對話框看起來正確。
這是我的布局代碼
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_root"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<!-- android:padding="8dp" -->
<ImageView android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginRight="10dp"
/>
<ScrollView
android:paddingTop="2.0dip"
android:paddingBottom="5.0dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFF"
android:textSize="4dp"
android:padding="5.0dip" />
</ScrollView>
<CheckBox
android:id="@+id/checkBox1"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:gravity="center_vertical"
android:text="Do Not Show Me This Again"
android:textColor="#FFF" >
</CheckBox>
</RelativeLayout>
這是http://dl.dropbox.com/u/68717396/sddsds.png的屏幕截圖,對the腳的線條感到抱歉,但是該線條在哪里,這是滾動視圖的結尾,我希望它盡可能多地填充文本,並保持復選框略高(不裁剪或其他任何內容),只需利用所有空間即可。
也許這可以幫助:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_root"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<!-- android:padding="8dp" -->
<ImageView android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginRight="10dp"
/>
<ScrollView
android:paddingTop="2.0dip"
android:paddingBottom="5.0dip"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@id/checkBox1" >
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFF"
android:textSize="10dp"
android:padding="5.0dip" />
</ScrollView>
<CheckBox
android:id="@+id/checkBox1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="Do Not Show Me This Again"
android:textColor="#FFF" >
</CheckBox>
</RelativeLayout>
我不知道這是否是您想要的結果。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.