package com.example.nuria.fesp_cyl.Opciones;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import com.example.nuria.fesp_cyl.R;

public class SiguenosActivity extends AppCompatActivity{

    private Button btnT;
    private Button btnF;
    private Button btnY;
    private Uri uriUrl;

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

        btnT = findViewById(R.id.btnTwitter);
        btnT.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Code here executes on main thread after user presses button
                uriUrl = Uri.parse("https://twitter.com/FESP_UGT_CYL");
                Intent intent = new Intent(Intent.ACTION_VIEW, uriUrl);
                startActivity(intent);
            }
        });

        btnF=(Button)findViewById(R.id.btnFacebook);
        btnF.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Code here executes on main thread after user presses button
                uriUrl = Uri.parse("https://www.facebook.com/fespugtcastillaleon/");
                Intent intent = new Intent(Intent.ACTION_VIEW, uriUrl);
                startActivity(intent);
            }
        });

        btnY=(Button)findViewById(R.id.btnYoutube);
        btnY.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Code here executes on main thread after user presses button
                uriUrl = Uri.parse("https://www.youtube.com/user/fspugt");
                Intent intent = new Intent(Intent.ACTION_VIEW, uriUrl);
                startActivity(intent);
            }
        });
    }}
