서버에 연결되어있을 때 이미지를 표시하고 싶습니다. (저는 SIP 응용 프로그램을 개발 중입니다). ... 명령어 기능에서 UI 변경
public void onRegistrationDone(String localProfileUri, long expiryTime) {
updateStatus("Registered to server.");
Log.d("SUCCEED","Registration DONE");
setContentView(R.layout.connected);
}
내가 연결하고 분리 할 때 이미지를 추가 한 후 원하는 : 나는이 (텍스트 뷰와 이미지로 만든 XML 파일 [connected.xml])를 만들어,하지만 FC를했습니다 이 문제를 어떻게 해결할 수 있습니까? 대단히 감사합니다.
편집 : XML :
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView
android:id="@+id/sipLabel"
android:textSize="20sp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<ViewFlipper
android:id="@+id/flipper"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView android:id="@+id/disconnected" android:src="@drawable/disconnected" android:layout_below="@id/sipLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_weight="0.35" android:gravity="center"
/>
</RelativeLayout>
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView android:id="@+id/connected" android:src="@drawable/connected" android:layout_below="@id/sipLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_weight="0.35" android:gravity="center"
/>
</RelativeLayout>
</ViewFlipper>
</RelativeLayout>
@rekaszeru : 저는이 ViewFlipper를 정말 좋아합니다! 제가 따라 올 수있는 가이드를 들려 주시겠습니까? 고맙습니다. – androniennn
'ViewFlipper'의 샘플 사용법은 내 업데이트를 참조하십시오. – rekaszeru
@rekaszeru : 음,이 멋진 답변에 감사드립니다. 이 주석으로 두 번째 상대성을 편집하십시오! (두 번째가 아닌;)). – androniennn