package com.example.Fruits;

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

import androidx.appcompat.app.AppCompatActivity;

public class WordSearchActivity extends AppCompatActivity {
    private EditText mEditUrl;
    private Button mBtnOpen;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.word_search_activity);

        mEditUrl = (EditText) findViewById(R.id.edit_url);
        mBtnOpen = (Button) findViewById(R.id.btn_open);
        mBtnOpen.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(WordSearchActivity.this, WebViewActivity.class);
                String url = mEditUrl.getText().toString();
                intent.putExtra("url", url);
                startActivity(intent);
            }
        });
    }

}

