On Feb 18, 2:52 pm, poohtbear <eyaltg...@gmail.com> 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en