sathya subbiah wrote: > Hi Mark, > > Thanks for the reply. Have resolved the issue. Since I have set the X > and Y parameter as 0 and 0 and tried to override it in the createBitmap > function it gave error. I have another query. Can you please let me know > is it possible to a view(For example: ImageButton or TextView) to a > ViewGroup. I am able to add the View successfully to the ViewGroup > object, but the view is not visible on screen. > > Play_Button = new ImageButton(context); > > LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams( > LinearLayout.LayoutParams.FILL_PARENT, > LinearLayout.LayoutParams.FILL_PARENT); > > > > Play_Button.setImageResource(com.android.internal.R.drawable.tt_player_icon_play); > Play_Button.setLayoutParams(layoutParams); > > If I try to add it to ViewGroup it is getting added but no display is > seen on screen. Can you please let me know what am I missing?
It is impossible to say based on what you have provided here. Use the hierarchyviewer tool to examine your running activity and see if that tells you anything (e.g., it is being drawn off-screen). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

