Using SetOnClick Listener makes my previous activity login button non clickable
<h2>This is my Login button function:</h2>

<p>This function is just authenticating user on button click but when I use <code>onClick</code>
method in another fragment constructor this button stop working.</p>

<pre><code>public void onClick(View view) {
        user_string = usernameText.getText().toString();
        pass_string = passwordText.getText().toString();
        Vibrator myVib;
        myVib = (Vibrator) this.getSystemService(VIBRATOR_SERVICE);
        myVib.vibrate(50);
        ref.authWithPassword(user_string, pass_string, authResultHandler);


        switch (view.getId()) {
            case R.id.back_login_button:
                finish();
                break;
        }
    }
</code></pre>

<h2>And this is another activity(fragment) <code>onCreate</code> function</h2>

<p>This is the constructor of another fragment and this is just sending the data to the firebase </p>

<pre><code>    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_admin);

        //firebase part
        initializefirebase();
        //casting
        Team_name = (EditText) findViewById(R.id.teamname_text);
        Category = (EditText) findViewById(R.id.actv_category);
        Lab_alloted = (EditText) findViewById(R.id.actv_lab);
        Table_alloted = (EditText) findViewById(R.id.actv_table);
        judgedby = (EditText) findViewById(R.id.actv_judge);

        final Firebase fire = new Firebase(db_url);
</code></pre>

<h2>Here is the OnClickListener method</h2>

<pre><code>        save.setOnClickListener(new View.OnClickListener() {


            @Override
            public void onClick(View v){
                participant_data participant = new participant_data();
                participant.setTeamName(Team_name.getText().toString());
                participant.setCategory(Category.getText().toString());
                participant.setJudjed_by(judgedby.getText().toString());
                participant.setLab_alloted(Lab_alloted.getText().toString());
                participant.setTable_alloted(Table_alloted.getText().toString());


                fire.child("Participants Data by admin:").setValue(participant);

                Team_name.setText("");
                Category.setText("");
                judgedby.setText("");
                Lab_alloted.setText("");
                Table_alloted.setText("");
                Toast.makeText(getApplicationContext(), "Data Send Successfully", Toast.LENGTH_SHORT).show();


            }
         });
         //onclick listener
        Toolbar toolbar = (Toolbar) findViewById(R.id.default_toolbar);
        setSupportActionBar(toolbar);
        getSupportActionBar().setDisplayShowHomeEnabled(true);

        AccountHeader headerResult = new AccountHeaderBuilder()
                .withActivity(this)
                .withHeaderBackground(R.drawable.header)
                .addProfiles(
                        new ProfileDrawerItem().withName("Test User").withEmail("TestEmail@gmail.com")).withSelectionListEnabled(false).withProfileImagesVisible(false)

//                .withOnAccountHeaderListener(new AccountHeader.OnAccountHeaderListener() {
//                    @Override
//                    public boolean onProfileChanged(View view, IProfile profile, boolean currentProfile) {
//                        return false;
//                    }
//                })
                .build();

       // new DrawerBuilder().withActivity(this).build();
        PrimaryDrawerItem item1 = new PrimaryDrawerItem().withName("Fill Participants Data").withIcon(GoogleMaterial.Icon.gmd_face);
        PrimaryDrawerItem item2 = new PrimaryDrawerItem().withName("Edit Participants Data").withIcon(GoogleMaterial.Icon.gmd_mode_edit);
        PrimaryDrawerItem item3 = new PrimaryDrawerItem().withName("Fill Judge Data").withIcon(GoogleMaterial.Icon.gmd_publish);
        PrimaryDrawerItem item4 = new PrimaryDrawerItem().withName("Upload Schedule").withIcon(GoogleMaterial.Icon.gmd_publish);

         result = new DrawerBuilder().withSelectedItem(-1)
                .withActivity(this)
                .withToolbar(toolbar)
                .withAccountHeader(headerResult)
                .addDrawerItems(
                        item1,item2,item3
                       // new DividerDrawerItem(),
                       // new DividerDrawerItem(),


                        )
                .withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() {
                    @Override
                    public boolean onItemClick(View view, int position, IDrawerItem drawerItem) {
                        Fragment fragment = null;
                        switch (position) {
                            case 1:

                                fragment = new admin_fragment_data_entry();



                        }
                        if (fragment != null) {
                            FragmentManager fragmentManager = getSupportFragmentManager();
                            FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
                            fragmentTransaction.addToBackStack(null);
                            fragmentTransaction.add(R.id.container_body, fragment);
                            fragmentTransaction.commit();
                        }

                        return false;
                    }
                }
                )
                .build();

    }
</code></pre>