Tag Archives: gui
(Android) Custom view orientation change – restore state.
Here’s one pretty simple way to get your custom view to restore its current state after an orientation change: You can of course put any values in there, for example if you need to restore fields. (quickly plotted code. Haven’t run it, but it should work)
(Android) Convert Density-independent Pixels to Pixels (dp 2 px)
A simple function to convert dp into pixels. Use when you have to pass pixels to a method and want to keep everything to scale. From Android Developer Center : pxPixels – Corresponds to actual pixels on the screen. This unit of measure is not recommended because the actual representation can vary across devices; each… Read More »
(C#) Confirmation when closing a form
Add an event handler for Form Closing and use this code. This is a really simple solution.
(C#) Scroll to bottom of a textbox