How do you pass the gravity attribute via xml for a custom view?
问题 I'm trying to figure out how to pass android:gravity via xml for a custom view. The solution posted here (https://stackoverflow.com/a/3441986/413254) says to add the android:gravity attribute to the other attr's. When I do this, I end up with a warning saying: /Users/greg/dev/company/mobile/my_app/app/src/main/res/values/colors.xml Error:Attribute "android:gravity" has already been defined Error:Execution failed for task ':app:processStagingDebugResources'. com.android.ide.common.internal