私はAndroidプログラミングにとって全く新しいです。私はImageViewがコード化された関数の結果に応じて画像を変更したいと思っています。だから、ImageView関数
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/bg">
<ImageView
android:id="@+id/logo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:src="@drawable/logo"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/logo"
android:src="@drawable/server"/>
<ImageView
android:id="@+id/status"
android:layout_width="wrap_content"
android:layout_height="match_parent"/>
、私はImageViewのを作るために何を書くべきちょうど自体が(私は「ステータス」ImageViewのを意味し、それは最後の一つだ)何かをしますか?クリックも押さない。
ジャスト 'imageView.setImageBitmap()'や 'imageView.setImageResource呼び出します() ' –
あなたは何をしたいですか?それは明らかではありません。 – Drv
「クリックしない」とは、ImageViewの最初からイメージセットを(XMLで直接android:src = "@ drawable/image"を使用して)設定するか、コード行を必要とすることを意味しますimageView.setImageBitmap(...)/imageView.setImageResource(...)または、一定の時間が経過すると自動的に発生させますか、アプリ内のどこかで何かが起きたときに変更しますか? – LuigiPower