package com.example.kraft_300.framelayout;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

    private TextView textview = null;
    private ImageView imageview = null;

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

        textview = (TextView) findViewById(R.id.textview1);
        imageview = (ImageView)findViewById(R.id.image1);
    }

    public void image_click(View view) {
        imageview.setVisibility(View.INVISIBLE);  // GONE
        textview.setVisibility(View.VISIBLE);
    }

    public void textview_click(View view) {
        imageview.setVisibility(View.VISIBLE);
        textview.setVisibility(View.INVISIBLE);
    }
}
