0
私は自分の好みのアクティビティーに背景イメージを入れようとしています。私はそれを動的に作りたいと思っています。PreferencesActivityクラスからcontentViewへの参照を取得するにはどうすればよいですか?
これは(PrefrenceActivityクラスのOnCreateの上の)私のコードです:私が行方不明です何
// Set the background image
Bitmap bmp = BitmapFactory.decodeResource(getResources(),R.drawable.spash_bk);
BitmapDrawable bitmapDrawable = new BitmapDrawable(bmp);
bitmapDrawable.setAlpha(100);
LinearLayout layout = (LinearLayout) *** here i need the layout ***
layout.setBackgroundDrawable(bitmapDrawable);
は次のとおりです。私がアクションを実行できるように、誰がレイアウトへの参照を取得できますか?事前に
おかげで、 LIOR
あなたは例えばその後
<LinearLayout
android:id="@+id/my_layout_id"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:gravity="center">
...
クリーンなレイアウトでの.xmlクラスのIDを与え、あなたを構築する必要があり