opt ui
This commit is contained in:
@@ -12,6 +12,7 @@ import com.mogo.commons.mvp.IView;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.och.view.FrameAnimImageView;
|
||||
import com.mogo.och.view.SlidePanelView;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
@@ -27,6 +28,8 @@ public abstract class BaseOchFragment<V extends IView, P extends Presenter<V>> e
|
||||
private CheckedTextView ctvAutopilotStatus;
|
||||
private FrameLayout flStationPanelContainer;
|
||||
|
||||
private FrameAnimImageView fivNoticeHead;
|
||||
|
||||
private final SlidePanelView.OnSlidePanelMoveToEndListener onSlideToEndListener = () -> {
|
||||
// 此处做一个代理,处理一下共有情况
|
||||
hideSlidePanel();
|
||||
@@ -47,9 +50,11 @@ public abstract class BaseOchFragment<V extends IView, P extends Presenter<V>> e
|
||||
tvNotice = findViewById(R.id.module_mogo_och_notice);
|
||||
ctvAutopilotStatus = findViewById(R.id.module_mogo_och_autopilot_status);
|
||||
flStationPanelContainer = findViewById(R.id.module_mogo_och_station_panel_container);
|
||||
fivNoticeHead = findViewById(R.id.module_mogo_och_notice_head);
|
||||
|
||||
LayoutInflater.from(getContext()).inflate(getStationPanelViewId(), flStationPanelContainer);
|
||||
slidePanelView.setOnSlidePanelMoveToEndListener(onSlideToEndListener);
|
||||
fivNoticeHead.setAnimRes(sHappy1);
|
||||
|
||||
checkCallView(MogoApisHandler.getInstance().getApis().getStatusManagerApi().isCallViewShow());
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().registerStatusChangedListener("Och", StatusDescriptor.CALL_VIEW, callViewListener);
|
||||
@@ -78,10 +83,14 @@ public abstract class BaseOchFragment<V extends IView, P extends Presenter<V>> e
|
||||
public void showNotice(String notice) {
|
||||
tvNotice.setText(notice);
|
||||
tvNotice.setVisibility(View.VISIBLE);
|
||||
fivNoticeHead.setVisibility(View.VISIBLE);
|
||||
fivNoticeHead.startAnim();
|
||||
}
|
||||
|
||||
public void hideNotice(){
|
||||
tvNotice.setVisibility(View.GONE);
|
||||
fivNoticeHead.setVisibility(View.GONE);
|
||||
fivNoticeHead.stopAnim();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -113,4 +122,36 @@ public abstract class BaseOchFragment<V extends IView, P extends Presenter<V>> e
|
||||
* @return 站点面板view
|
||||
*/
|
||||
public abstract int getStationPanelViewId();
|
||||
|
||||
private final int[] sHappy1 = {
|
||||
R.drawable.ic_happy1_00000,
|
||||
R.drawable.ic_happy1_00001,
|
||||
R.drawable.ic_happy1_00002,
|
||||
R.drawable.ic_happy1_00003,
|
||||
R.drawable.ic_happy1_00004,
|
||||
R.drawable.ic_happy1_00005,
|
||||
R.drawable.ic_happy1_00006,
|
||||
R.drawable.ic_happy1_00007,
|
||||
R.drawable.ic_happy1_00008,
|
||||
R.drawable.ic_happy1_00009,
|
||||
R.drawable.ic_happy1_00010,
|
||||
R.drawable.ic_happy1_00011,
|
||||
R.drawable.ic_happy1_00012,
|
||||
R.drawable.ic_happy1_00013,
|
||||
R.drawable.ic_happy1_00014,
|
||||
R.drawable.ic_happy1_00015,
|
||||
R.drawable.ic_happy1_00016,
|
||||
R.drawable.ic_happy1_00017,
|
||||
R.drawable.ic_happy1_00018,
|
||||
R.drawable.ic_happy1_00019,
|
||||
R.drawable.ic_happy1_00020,
|
||||
R.drawable.ic_happy1_00021,
|
||||
R.drawable.ic_happy1_00022,
|
||||
R.drawable.ic_happy1_00023,
|
||||
R.drawable.ic_happy1_00024,
|
||||
R.drawable.ic_happy1_00025,
|
||||
R.drawable.ic_happy1_00026,
|
||||
R.drawable.ic_happy1_00027,
|
||||
R.drawable.ic_happy1_00028
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user