android – 链接本地重命名的所有引用(不更改其他文件中的引用)

使用显示指标第一次出现错误链接本地重命名的所有引用(不更改其他文件中的引用)”,以便所有具有id显示id的行都不会被解析.我将放置代码.帮助我.

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);

解决方法

请检查导入部分

如果这一行 – > “import android.R;”存在你应该删除

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...