ah. the x,y secret. I'm using FrameLayout to adjust my TextEdit is specific X,Y's on the screen, it's possible sue to FrameLayout's margin layout. I set the EditText in the screen according to my GUI's list items, so i need the ability to set it to a specific place. If not obsolete, i would have used AbsoluteLayout.
On Feb 18, 4:43 pm, skink <[email protected]> wrote: > On Feb 18, 2:52 pm, poohtbear <[email protected]> wrote: > > > Here is the code snippet of the C'tor: > > editControl = new MyEditText(context); > > editControl.setBackgroundColor(Color.GREEN); > > editControl.setVisibility(EditText.GONE); > > editControl.setPadding(0, 0, 0, 0); > > editControl.setFocusableInTouchMode(true); > > FrameLayout.LayoutParams params = new > > FrameLayout.LayoutParams(0, 0,Gravity.TOP|Gravity.LEFT); > > params.setMargins(0, 0, 0, 0); > > editControl.setLayoutParams(params); > > // addView(editControl); > > context.addContentView(editControl, params); > > } > > i don't understand why you use such strange LayoutParams params > why can't you simply do: > > editControl = new EditText(context); > editControl.setFocusableInTouchMode(true);editControl.setBackgroundColor(Color.GREEN); > editControl.setVisibility(View.INVISIBLE); > addView(editControl); > > ? > > > Basically i didn't have to create my own layout, it allowed later on > > to use it's onSizeChnaged but basically i don't have to. > > ok so probably it will be better to use std FrameLayout -- 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

