2013-02-25 75 views
-2

衍生我想在列表视图中使用图像按钮正在使用福尔摩斯名单片段衍生当我在list..then单击该按钮,我想表现出对话框fragment..for此我想语法.. 我的XML文件是图像按钮时使用福尔摩斯列表片段

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:id="@+id/manage_stocks" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" > 

<TextView 
    android:id="@+id/lname" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignParentTop="true" 
    android:layout_marginLeft="10dp" 
    android:layout_marginTop="5dp" 
    android:gravity="left" 
    android:textColor="@android:color/black" 
    android:textAppearance="?android:attr/textAppearanceLarge" 
    /> 

<TextView 
    android:id="@+id/lysymbol" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignLeft="@id/lname" 
    android:layout_below="@id/lname" 
    android:textColor="@android:color/black" 
    android:textAppearance="?android:attr/textAppearanceMedium" /> 
<ImageButton 
    android:id="@+id/alertbutton" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignParentRight="true" 
    android:src="@drawable/alerts"/> 
</RelativeLayout> 

一些身体帮我做这个任务

感谢您对未来的任何帮助..

回答

0

看一看herehere,看看如何实现一个自定义的DialogFragment。