当它出现在对话框中时,我想在单选内显示图像.
alt text http://www.freeimagehosting.net/uploads/bfb1c90d61.png
我该怎么做?
在这里你有工作解决方案。不是我的,但我使用了所描述的技术并且它有效。不要忘记img.setBounds(),它是必要的!
http://mgmblog.com/2010/06/10/arrayadapter-and-alertdialog-for-single-choice-items/
PS:原始帖子不显示单选按钮,但我的布局显示。我的单行 XML 布局文件(示例中缺少animal_row.xml)位于此处:
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/miastorow_text"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center_vertical"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:paddingLeft="6dip"
android:paddingRight="6dip"
android:textColor="#000"
/>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5956 次 |
| 最近记录: |