public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.login_page);
if (android.os.Build.VERSION.SDK_INT > 9) {
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
}
loginBtn = findViewById(R.id.btnlogin);
usernameText = findViewById(R.id.etuser);
passwordText = findViewById(R.id.etpass);
其中因为fragment 不支持setContentView和findViewById,请问这个该如何更改呢?