Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot resolve symbol 'window' error

When I add "this.requestWindowFeature(Window.FEATURE_NO_TITLE);" to my activity, IDE redden 'Window' word and on tooltip it warns me by "cannot resolve symbol 'window'"

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.activity_splash_screen);

Any help would be appreciated.

like image 546
SalmanShariati Avatar asked Jun 20 '26 05:06

SalmanShariati


2 Answers

Add import android.view.Window; to resolve this issue.

like image 195
Amrit Pal Singh Avatar answered Jun 22 '26 20:06

Amrit Pal Singh


Press and hold ctrl key ( command on MAC ) and click on 'window' text . A orange bulb will show up on the left panel , click on it , it will ask you to import necessary module .

like image 35
roy Avatar answered Jun 22 '26 19:06

roy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!