Sorry about my question, but i dont see any information in google.
How can i set width like "30dp" for dynamically created label in my custom
view?
For example:
var label1 = new TextView(this.Context);
label1.LayoutParameters = new
ViewGroup.LayoutParams(ViewGroup.LayoutParams.FillParent, 30);
label1.Gravity = GravityFlags.CenterVertical;
label1.SetText("test", TextView.BufferType.Normal);
this.AddView(label1);
But this height of 30 is set with normal pixels and looks different on
emulator and real device (screen dimensions is different). And i dont see
any way to set a type of pixels for layoutparams. How can i do this?
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/How-to-use-dip-or-dp-layout-dimension-for-LayoutParams-width-and-height-tp5710626.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid