增加了对滑动按钮的显示隐藏的控制
This commit is contained in:
@@ -217,10 +217,13 @@ public class OchBusFragment extends BaseOchFragment< OchBusFragment, OchBusPrese
|
||||
* @param launch true-收车,false-出车
|
||||
*/
|
||||
public void changeOperationStatus( boolean launch ) {
|
||||
isOperationStatus = launch;
|
||||
if ( launch ) {
|
||||
tvOperationStatus.setText( "收车" );
|
||||
showSlidePanle("准备发车");
|
||||
} else {
|
||||
tvOperationStatus.setText( "出车" );
|
||||
hideSlidePanel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ public abstract class BaseOchFragment<V extends IView, P extends Presenter<V>> e
|
||||
protected SlidePanelView slidePanelView;
|
||||
private CheckedTextView ctvAutopilotStatus;
|
||||
protected TextView tvOperationStatus;
|
||||
public boolean isOperationStatus;//false-收车,true-出车
|
||||
private FrameLayout flStationPanelContainer;
|
||||
private Group groupTestPanel;
|
||||
|
||||
@@ -131,8 +132,10 @@ public abstract class BaseOchFragment<V extends IView, P extends Presenter<V>> e
|
||||
*/
|
||||
public void showSlidePanle(String text) {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
slidePanelView.setText(text);
|
||||
slidePanelView.setVisibility(View.VISIBLE);
|
||||
if (isOperationStatus) {
|
||||
slidePanelView.setText(text);
|
||||
slidePanelView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user