package com.example.eiraj.listviewseefrgmentsfiirst;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
    TextView textView= (TextView) findViewById(R.id.textView);
    public void show(View view){
        textView.setVisibility(View.VISIBLE);
    }
    public void hide(View view){
       textView.setVisibility(View.INVISIBLE);
    }
    @Override
    protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.activity_main);
   }
}
here two buttons are being used to show data and hide data but whenever I try to run it emulator shows the message unfortunately uihide stopped also I downloaded the apk to run it on my phone but same message came there
 
     
     
     
    