0
안녕하세요, 조각에 팝업 창을 추가하고 싶습니다. 아직 아무것도 가지고 있지 않은 많은 것을 시도했습니다. 누군가가 나를 도와 준다면 위대 할 것입니다.이 파편에이 popup.xml을 어떻게 추가 할 수 있습니까?
여기 내 조각 코드입니다.
public class Info extends Fragment {
public Info() {
// Required empty public constructor
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.info, container, false);
}
여기 여기 내 popup.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:src="@drawable/pozitif"
android:layout_height="wrap_content"
android:layout_marginRight="5dp" />
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:text="dfdfdsfs"
android:layout_height="wrap_content"
android:textColor="#000000"
android:layout_toRightOf="@+id/image"/>/>
<Button
android:id="@+id/dialogButtonOK"
android:layout_width="100px"
android:layout_height="wrap_content"
android:text=" Ok "
android:layout_marginTop="5dp"
android:layout_marginRight="5dp"
android:layout_below="@+id/image"
/>
</RelativeLayout>
나는 아무것도 이해하지 못했습니다 ... – murty
흠. 이 비디오를 확인하십시오. https://www.youtube.com/watch?v=4HbcTS1bYsc –