Just what the error says, no ActionBarLayoutParams
constructor takes a float. You need one of the available graivty constants for the gravity
But it looks like you are importing the wrong LayoutParams
. If this is for a LinearLayout
and not ActionBar
then you need to be importing LinearLayout.LayoutParams
import android.widget.LinearLayout.LayoutParams