package cc.winboll.studio.libappbase;

/**
 * @Author ZhanGSKen<zhangsken@qq.com>
 * @Date 2025/03/25 20:34:47
 * @Describe 应用日志窗口
 */
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import cc.winboll.studio.libappbase.LogView;
import cc.winboll.studio.libappbase.R;

public class LogActivity extends Activity {

    public static final String TAG = "LogActivity";

    LogView mLogView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_log);
        //ToastUtils.show("LogActivity onCreate");

        mLogView = findViewById(R.id.logview);
        mLogView.start();
    }

    @Override
    protected void onResume() {
        super.onResume();
        mLogView.start();
    }

	public static void startLogActivity(Context context) {
		Intent intent = new Intent(context, LogActivity.class);
        // 打开多任务窗口
        intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT);
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
        intent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
        context.startActivity(intent);
	}
}
