implementing OnClickListener for a fragment on android

前端 未结 4 1094
忘了有多久
忘了有多久 2021-01-05 10:18

I have a sliding menu project and inside home layout another layout is called as a fragment :

this is the HomeFragment.java :

package info.androidhiv         


        
4条回答
  •  清歌不尽
    2021-01-05 10:51

    first...you should findView in rootView such as

    btnCheckFalAction = (Button) rootView.findViewById(R.id.btnCheckFal);
    

    then you can finish Button's operation

提交回复
热议问题