center items in a linear layout code example Example: linear layout element to center android:gravity="center"