I have this element in my layout XML:
<FrameLayout android:id="@+id/FrameLayout01"
android:layout_width="320sp" android:layout_height="380sp"
android:layout_gravity="center" android:background="#99CC33">
</FrameLayout>
And I want to get its position on the screen with getTop()
, getBottom()
,... but I want to do it only once.
I was trying to do it on the onCreate(), but those methods return all 0 as response.
Any tips?