Gravity could contain:

Gravity.CENTER

Gravity.CENTER_HORIZONTAL

Gravity.CENTER_VERTICAL

Dim Mask As Int =

Center = Bit.And(Label1.Gravity, Mask)

If Center = Gravity.CENTER...

(so I did not have to think of the English translation )

[P.S. little help... for you

Or MUST I use:

Gravity.CENTER

Gravity.CENTER_HORIZONTAL

Gravity.CENTER_VERTICAL

Dim Mask As Int =

**? <------**Center = Bit.And(Label1.Gravity, Mask)

If Center = Gravity.CENTER...

(so I did not have to think of the English translation )

[P.S. little help... for you

B4X:

```
Log(Gravity.BOTTOM) ' 80
Log(Gravity.CENTER) ' 17
Log(Gravity.CENTER_HORIZONTAL)' 1
Log(Gravity.CENTER_VERTICAL) ' 16
Log(Gravity.FILL) ' 119
Log(Gravity.LEFT) ' 3
Log(Gravity.NO_GRAVITY) ' 0
Log(Gravity.RIGHT) ' 5
Log(Gravity.TOP) ' 48
```

Or MUST I use:

B4X:

```
Center = Bit.AND(Label1.Gravity, Gravity.Center)
Center = Bit.OR(Center, Bit.AND(Label1.Gravity, Gravity.CENTER_HORIZONTAL))
Center = Bit.OR(Center, Bit.AND(Label1.Gravity, Gravity.CENTER_VERTICAL))
If Center = Gravity.Center Then
Log("Center")
End If
```

Last edited: