ui opt
This commit is contained in:
@@ -70,33 +70,15 @@ public class AbsMogoApplication extends Application {
|
||||
ARouter.openLog();
|
||||
}
|
||||
ARouter.init( sApp );
|
||||
TipToast.init( this, new TipToast.ToastViewGenerator() {
|
||||
@Override
|
||||
public View make( Context context, String message ) {
|
||||
if ( TextUtils.isEmpty( message ) ) {
|
||||
return null;
|
||||
}
|
||||
View contentView = LayoutInflater.from( context ).inflate( R.layout.module_commons_layout_toast, null );
|
||||
TextView txt = contentView.findViewById( R.id.module_commons_toast_msg );
|
||||
txt.setText( message );
|
||||
return contentView;
|
||||
TipToast.init( this, ( ( context, message ) -> {
|
||||
if ( TextUtils.isEmpty( message ) ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int gravity() {
|
||||
return Gravity.TOP | Gravity.CENTER_HORIZONTAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int yOffset() {
|
||||
return sApp.getResources().getDimensionPixelSize( R.dimen.module_commons_toast_y_offset );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int xOffset() {
|
||||
return 0;
|
||||
}
|
||||
} );
|
||||
View contentView = LayoutInflater.from( context ).inflate( R.layout.module_commons_layout_toast, null );
|
||||
TextView txt = contentView.findViewById( R.id.module_commons_toast_msg );
|
||||
txt.setText( message );
|
||||
return contentView;
|
||||
} ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user