package demo;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;

import com.supconit.hcmobile.MainActivity;
import com.supconit.hcmobile.R;

public class Main extends Activity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }

    public void click(View v) {
        Intent intent = new Intent(this, MainActivity.class);

        // todo 访问assert目录
        // intent.putExtra("launchUrl", "file:///android_asset/www/index.html");
        intent.putExtra("launchUrl", "file:///android_asset/test.html");

        // todo 访问在线地址
        // intent.putExtra("launchUrl", "https://www.baidu.com");

        // todo 访问sd卡目录
        // intent.putExtra("launchUrl", "file:///storage/emulated/0/Download/index.html");

        startActivity(intent);
    }

}

