Can not resolve method 'findViewById(int)'

前端 未结 9 831
孤城傲影
孤城傲影 2021-02-05 03:08

I\'m having a trouble with findViewByid but I can\'t find where the problem is.

Here\'s my FirstFragment class code:

import and         


        
9条回答
  •  礼貌的吻别
    2021-02-05 03:33

    This is how you can solve the problem:

    toggleButton1=(ToggleButton)findViewById(R.id.toggleButton1);  
    toggleButton2=(ToggleButton)findViewById(R.id.toggleButton2); 
    

提交回复
热议问题