|
@@ -6,6 +6,7 @@ import androidx.fragment.app.FragmentManager;
|
|
import android.os.Bundle;
|
|
import android.os.Bundle;
|
|
import android.os.Handler;
|
|
import android.os.Handler;
|
|
import android.os.Message;
|
|
import android.os.Message;
|
|
|
|
+import android.util.Log;
|
|
import android.view.Window;
|
|
import android.view.Window;
|
|
import android.view.WindowManager;
|
|
import android.view.WindowManager;
|
|
import android.widget.TextView;
|
|
import android.widget.TextView;
|
|
@@ -86,9 +87,11 @@ public class MainActivity extends AppCompatActivity {
|
|
activity.mHandler.sendEmptyMessageDelayed(MSG_UPDATE_ROOM_INFO, 20*1000);
|
|
activity.mHandler.sendEmptyMessageDelayed(MSG_UPDATE_ROOM_INFO, 20*1000);
|
|
break;
|
|
break;
|
|
case MSG_UPDATE_ROOM_INFO:
|
|
case MSG_UPDATE_ROOM_INFO:
|
|
- if (activity.roomInfoFragment != null) {
|
|
|
|
- activity.roomInfoFragment.refresh();
|
|
|
|
- }
|
|
|
|
|
|
+ Log.d("wzl", "update roomInfoFragment");
|
|
|
|
+ activity.roomInfoFragment = RoomInfoFragment.newInstance("RoomInfoFragment");
|
|
|
|
+ activity.fragmentManager.beginTransaction()
|
|
|
|
+ .replace(R.id.info_content, activity.roomInfoFragment, "RoomInfoFragment")
|
|
|
|
+ .commit();
|
|
activity.mHandler.sendEmptyMessageDelayed(MSG_GET_DATE, 40*1000);
|
|
activity.mHandler.sendEmptyMessageDelayed(MSG_GET_DATE, 40*1000);
|
|
break;
|
|
break;
|
|
}
|
|
}
|