0
IMPOSIBLE访问在OnCreate中我把这个片段:机器人负载片段做的ImageView
if(internet == true){
Fragment fragment = null;
fragment = new PasarProjectos();
/*if(esLandscape == true){
contenedor_salvado = findViewById(R.id.contenedor_info);
}*/
if (fragment != null) {
FragmentManager fm = getSupportFragmentManager();
Bundle args = new Bundle();
args.putBoolean("esLandscape", esLandscape);
fragment.setArguments(args);
fm.beginTransaction().add(R.id.container, fragment).commit();
}
findViewById(R.id.imageView17).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(PasarProjNoMenu.this, InicioNoLogin.class));
}
});
}else{
startActivity(new Intent(PasarProjNoMenu.this, InicioNoLogin.class));
}
和完成的的onCreate
的方法后来我打电话,我尝试本地化另一种观点的另一种方法
public void ensenarProjMismaPantalla(String id_s) { //un inflate rellenando los datos y punto
Log.d("La acción ","rellenar campo primero");
ImageView imageView = (ImageView) findViewById(R.id.fotoProj);
}
我知道的imageview是连续的; y在屏幕上,因为我可以在应用程序运行时看到它,但该应用程序会抛出nullpointerexception错误
请写在那里你调用这个方法:'ensenarProjMismaPantalla()' – walkmn
进入片段“PasarProjectos.java” –
我离开的代码放到一个答案 –