You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
624 B

package com.community.pocket.ui.main.ui.share;
import android.content.Context;
import android.widget.Toast;
import com.community.pocket.R;
import com.community.pocket.util.CustomMessage;
/**
* 弹窗响应
*
* @param <T>
*/
public abstract class ToastResponse<T extends CustomMessage> extends Response<T> {
public void toast(Context context) {
if (getBody() != null) {
Toast.makeText(context, context.getString(getBody().getMsg(), getArgs()), Toast.LENGTH_LONG).show();
} else {
Toast.makeText(context, R.string.unknow_error, Toast.LENGTH_LONG).show();
}
}
}