package com.excelliance.open;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.excelliance.lbui.R;

/**
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 * UIActivity 只是为了方便客户在修改了“layout”和“res”后查看ui效果，这里的代码集成后的包里并不会执行
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */
public class UIActivity extends BaseActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.lebian_ui_layout);

        Button lebian_progress_l = findViewById(R.id.lebian_progress_l);
        Button lebian_progress_p = findViewById(R.id.lebian_progress_p);
        Button lebian_dialog = findViewById(R.id.lebian_dialog);
        lebian_dialog.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent activityIntent = new Intent("com.excelliance.open.action.startPromptActivity");
                activityIntent.setPackage(getPackageName());
                activityIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
                activityIntent.putExtra("dataConnection", true);
                activityIntent.putExtra("forceUpdate", false);
                activityIntent.putExtra("size", (long)10*1024*1024);
                activityIntent.putExtra("savePath", "sdcard/Android/obb/"+getPackageName());
                activityIntent.putExtra("quitKillSelf", false);
                activityIntent.putExtra("dialogtype", 1);
                startActivity(activityIntent);
            }
        });
        lebian_progress_p.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent progressIntent = new Intent("com.excelliance.open.action.startPProgressActivity");
                progressIntent.setPackage(getPackageName());
                progressIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
                startActivity(progressIntent);
            }
        });
        lebian_progress_l.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent progressIntent = new Intent("com.excelliance.open.action.startLProgressActivity");
                progressIntent.setPackage(getPackageName());
                progressIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
                startActivity(progressIntent);
            }
        });
    }
}
