How to programmatically hide a button within Android SDK using NFC
<p>I have two buttons within my Android application. It currently shows the two buttons when you open the application. What I would like to do is to hide these buttons from the user until they have interacted with an NFC tag so if they were to open the application independently they would not be able to see them but if the application was opened by interaction with a tag they would be visible. I have programmed the application as default interaction with NFC so the application is called once the device has interacted with the phone like this:</p>

<pre><code> NfcAdapter mAdapter = NfcAdapter.getDefaultAdapter(this);

    final Button button = (Button) findViewById(R.id.button);
    button.setOnClickListener(new View.OnClickListener() {

        public void onClick(View v) {
Intent intent = new Intent();intent.setAction(android.content.Intent.ACTION_VIEW);
 File file = new File("sdcard/Download/disdat.pdf");
            intent.setDataAndType(Uri.fromFile(file), "application/pdf");
            startActivity(intent); 

        }
</code></pre>

<p>I was just wondering if anyone had any ideas on how to hide and show the buttons?</p>
