私は2つのイメージビュー(切断されているときは赤、接続されているときは緑)を表示するViewFlipperを持っていますが、奇妙な結果があります.接続すると赤い画像が表示されることがあります.red-green-赤を返します(接続している場合でも)。JAVAコードは次のとおりです。
public void onRegistrationDone(String localProfileUri, long expiryTime) {
updateStatus("Enregistré au serveur.");
Log.d("SUCCEED","Registration DONE");
final ViewFlipper flipper = (ViewFlipper)findViewById(R.id.flipper);
flipper.postDelayed(new Runnable() {
public void run() {
flipper.showNext();
}
},2000);}
ビューは赤い画像で開始され、接続すると (2 秒後)、通常は次の画像が表示されます。
何が問題なのですか?どうもありがとうございました。
編集: XML ファイル (ハンドラー)
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" 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"
/>
<ImageView android:id="@+id/status" android:layout_below="@id/sipLabel"
android:layout_width="fill_parent" android:scaleType="center"
android:layout_height="fill_parent" android:layout_weight="0.35" android:gravity="center"
/>
</LinearLayout>