4

初めてエラーが発生したときに表示メトリックを使用し"Link all references for a local rename (does not change references in other files)"て、idのshowsidを持つすべての行が解決されないようにします。ここにコードを配置しています。

 public void onConfigurationChanged(Configuration newConfig) {
            super.onConfigurationChanged(newConfig);
            try{
                emailForConfigChanges = emailTextBox.getText().toString().trim();
                passwordForConfigChanges = passwordTextBox.getText().toString().trim();

                DisplayMetrics displayMetrics = new DisplayMetrics();
                getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
                switch(displayMetrics.densityDpi){ 
                    case DisplayMetrics.DENSITY_LOW:
                        setContentView(R.layout.login_small);
*showing error in the above line "Link all references for a local rename (does not change references   in other files)"*

                        break; 
                    default:
                        setContentView(R.layout.login);
                }
            } catch(Exception e){
                e.printStackTrace();
            }

            getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
            ImageButton loginButton = (ImageButton) findViewById(R.id.loginButton);
            loginButton.setOnClickListener(this);
            ImageButton registerOrangeButton = (ImageButton) findViewById(R.id.registerOrangeButton);
            registerOrangeButton.setOnClickListener(this);
            TextView forgotPasswordText = (TextView) findViewById(R.id.forgotPasswordText);
            forgotPasswordText.setOnClickListener(this);

            passwordTextBox = (EditText) findViewById(R.id.passwordLogin);
            passwordTextBox.setText(passwordForConfigChanges);
            passwordTextBox.setOnKeyListener(this);
            emailTextBox = (EditText) findViewById(R.id.emailLogin);
            emailTextBox.setText(emailForConfigChanges);
            emailTextBox.setOnKeyListener(this);
4

1 に答える 1

4

インポートセクションを確認してください

この行の場合->"importandroid.R;" 削除する必要がある存在

ここに画像の説明を入力してください

于 2013-09-24T08:44:31.843 に答える