How do I calculate the normal vector of a line segment? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about programming within the scope defined in the help center. Closed 5 months ago. The community reviewed whether to reopen this question 5 months ago and left it closed: Original close reason(s) were … Read more

An algorithm for inflating/deflating (offsetting, buffering) polygons

How would I “inflate” a polygon? That is, I want to do something similar to this: The requirement is that the new (inflated) polygon’s edges/points are all at the same constant distance from the old (original) polygon’s (on the example picture they are not, since then it would have to use arcs for inflated vertices, … Read more

Using the “animated circle” in an ImageView while loading stuff

I am currently using in my application a listview that need maybe one second to be displayed. What I currently do is using the @id/android:empty property of the listview to create a “loading” text. <TextView android:id=”@id/android:empty” android:layout_width=”match_parent” android:layout_height=”match_parent” android:background=”#FF0000″ android:text=”Loading…”/> Now, I would like to replace that with the animated circle that is used in … Read more