У меня есть очень простой макет активности Android, такой как:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ImageView id="@+id/blaimg"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
Теперь, когда я делаю следующее из onOptionsItemSelected
:
ImageView imgView = (ImageView)findViewById(R.id.blaimg);
, содержимое imgView
всегда ноль!Что я делаю не так?
Спасибо!