Unable to load the image on imagebutton on create method
<p>I have to load an image for image button on create.I wrote the below code.The image is not loaded when it comes in the UI.What am i doing wrong.This is my master activity and i am inheriting this in another activities.</p>

<pre><code>super.onCreate(savedInstanceState);  
setContentView(R.layout.activity_master_page);  
TheContext = this;  
ImageButton ThePosLogoL=(ImageButton)findViewById(R.id.btnposlogo);  
ThePosLogoL.setBackgroundResource(R.drawable.smalllogo);   
</code></pre>

<p>Here is my button Layout</p>

<pre><code>&lt;ImageButton
android:id="@+id/btnposlogo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@null"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true" /&gt;   
</code></pre>
