Answer the question
In order to leave comments, you need to log in
Android: Align Vertical and Raise 60 dp
Hello!
There is a RelativeLayout layer:
<RelativeLayout
android:id="@+id/redcircle"
android:layout_width="8dp"
android:layout_height="8dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="@drawable/circle" >
</RelativeLayout>
Answer the question
In order to leave comments, you need to log in
return
only makes sense in synchronous functions. Like this:
function calc (a, b) {
return a + b;
}
var c = calc (2, 2); // 4
document.addEventListener("mousemove", function (e) {
var coord = [];
coord[0] = e.clientX+'px';
coord[1] = e.clientY+'px';
next(coord); // вызов коллбэка
});
function next (coord) {
console.log(coord);
}
In the first variant, you have coord as a local variable.
And in the second option, you override the global coord with the local one.
Delete the selection and you will be happy
The problem was solved like this:
<RelativeLayout
android:layout_width="8dp"
android:layout_height="68dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" >
<ImageView
android:id="@+id/redcircle"
android:layout_width="8dp"
android:layout_height="8dp"
android:src="@drawable/circle" />
</RelativeLayout>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question