package jp.gihyo.mitoma.android.p021widgetstest;

import androidx.appcompat.app.AppCompatActivity;

import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        TextView textView  = findViewById(R.id.tvTitle);
        textView.setOnClickListener(new OnClickListener());
    }
    private class OnClickListener implements View.OnClickListener{
        public void onClick(View view){
            int idNo = view.getId();
            TextView textView =findViewById(idNo);
            textView.setTextColor(Color.BLUE);
            textView.setTextSize(34);
        }
    }
}