Fixed
Status Update
Comments
uc...@google.com <uc...@google.com> #2
Thank you for suggesting this enhancement. We value the feedback from our community and hope to review your suggestion in an upcoming sprint.
ni...@google.com <ni...@google.com>
ju...@google.com <ju...@google.com>
ju...@google.com <ju...@google.com>
ju...@google.com <ju...@google.com>
ju...@google.com <ju...@google.com>
ju...@google.com <ju...@google.com>
lb...@gmail.com <lb...@gmail.com> #3
Thank you. Please also do the same for other similar properties, such as padding.
ju...@google.com <ju...@google.com> #4
You're welcome. These are the attributes that I support with the change:
layout_width
layout_height
layout_margin
layout_marginHorizontal
layout_marginVertical
layout_marginStart
layout_marginLeft
layout_marginTop
layout_marginEnd
layout_marginRight
layout_marginBottom
layout_row
layout_rowSpan
layout_rowWeight
layout_column
layout_columnSpan
layout_columnWeight
layout_gravity
layout_alignWithParentIfMissing
layout_toStartOf
layout_toLeftOf
layout_toEndOf
layout_toRightOf
layout_above
layout_below
layout_alignBaseline
layout_alignStart
layout_alignLeft
layout_alignTop
layout_alignEnd
layout_alignRight
layout_alignBottom
layout_alignParentStart
layout_alignParentLeft
layout_alignParentTop
layout_alignParentEnd
layout_alignParentRight
layout_alignParentBottom
layout_centerInParent
layout_centerHorizontal
layout_centerVertical
Please file a separate issue for further support (which should be MUCH easier). Thanks.
layout_width
layout_height
layout_margin
layout_marginHorizontal
layout_marginVertical
layout_marginStart
layout_marginLeft
layout_marginTop
layout_marginEnd
layout_marginRight
layout_marginBottom
layout_row
layout_rowSpan
layout_rowWeight
layout_column
layout_columnSpan
layout_columnWeight
layout_gravity
layout_alignWithParentIfMissing
layout_toStartOf
layout_toLeftOf
layout_toEndOf
layout_toRightOf
layout_above
layout_below
layout_alignBaseline
layout_alignStart
layout_alignLeft
layout_alignTop
layout_alignEnd
layout_alignRight
layout_alignBottom
layout_alignParentStart
layout_alignParentLeft
layout_alignParentTop
layout_alignParentEnd
layout_alignParentRight
layout_alignParentBottom
layout_centerInParent
layout_centerHorizontal
layout_centerVertical
Please file a separate issue for further support (which should be MUCH easier). Thanks.
tn...@google.com <tn...@google.com> #5
Juan, what about all the constraint layout attributes?
Examples:
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Examples:
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
ju...@google.com <ju...@google.com> #6
I'll talk to Nicolas about a canonical order for them. Adding attributes should be much easier now that the foundation is in place.
lb...@gmail.com <lb...@gmail.com> #7
What about padding?
ju...@google.com <ju...@google.com> #8
This is the order I'll use for the View attributes (including padding):
alpha
background
clickable
contentDescription
drawingCacheQuality
duplicateParentState
id
requiresFadingEdge
fadeScrollbars
fadingEdgeLength
filterTouchesWhenObscured
fitsSystemWindows
isScrollContainer
focusable
focusableInTouchMode
focusedByDefault
hapticFeedbackEnabled
keepScreenOn
keyboardNavigationCluster
layerType
layoutDirection
longClickable
minHeight
minWidth
nextClusterForward
nextFocusDown
nextFocusLeft
nextFocusRight
nextFocusUp
onClick
outlineSpotShadowColor
outlineAmbientShadowColor
padding
paddingHorizontal
paddingVertical
paddingBottom
paddingLeft
paddingRight
paddingTop
paddingStart
paddingEnd
saveEnabled
rotation
rotationX
rotationY
scaleX
scaleY
scrollX
scrollY
scrollbarSize
scrollbarStyle
scrollbars
scrollbarDefaultDelayBeforeFade
scrollbarFadeDuration
scrollbarTrackHorizontal
scrollbarThumbHorizontal
scrollbarThumbVertical
scrollbarTrackVertical
scrollbarAlwaysDrawHorizontalTrack
scrollbarAlwaysDrawVerticalTrack
stateListAnimator
transitionName
soundEffectsEnabled
tag
textAlignment
textDirection
transformPivotX
transformPivotY
translationX
translationY
translationZ
visibility
theme
alpha
background
clickable
contentDescription
drawingCacheQuality
duplicateParentState
id
requiresFadingEdge
fadeScrollbars
fadingEdgeLength
filterTouchesWhenObscured
fitsSystemWindows
isScrollContainer
focusable
focusableInTouchMode
focusedByDefault
hapticFeedbackEnabled
keepScreenOn
keyboardNavigationCluster
layerType
layoutDirection
longClickable
minHeight
minWidth
nextClusterForward
nextFocusDown
nextFocusLeft
nextFocusRight
nextFocusUp
onClick
outlineSpotShadowColor
outlineAmbientShadowColor
padding
paddingHorizontal
paddingVertical
paddingBottom
paddingLeft
paddingRight
paddingTop
paddingStart
paddingEnd
saveEnabled
rotation
rotationX
rotationY
scaleX
scaleY
scrollX
scrollY
scrollbarSize
scrollbarStyle
scrollbars
scrollbarDefaultDelayBeforeFade
scrollbarFadeDuration
scrollbarTrackHorizontal
scrollbarThumbHorizontal
scrollbarThumbVertical
scrollbarTrackVertical
scrollbarAlwaysDrawHorizontalTrack
scrollbarAlwaysDrawVerticalTrack
stateListAnimator
transitionName
soundEffectsEnabled
tag
textAlignment
textDirection
transformPivotX
transformPivotY
translationX
translationY
translationZ
visibility
theme
ju...@google.com <ju...@google.com> #9
Sorry. id goes first.
id
alpha
background
clickable
contentDescription
drawingCacheQuality
duplicateParentState
requiresFadingEdge
fadeScrollbars
fadingEdgeLength
filterTouchesWhenObscured
fitsSystemWindows
isScrollContainer
focusable
focusableInTouchMode
focusedByDefault
hapticFeedbackEnabled
keepScreenOn
keyboardNavigationCluster
layerType
layoutDirection
longClickable
minHeight
minWidth
nextClusterForward
nextFocusDown
nextFocusLeft
nextFocusRight
nextFocusUp
onClick
outlineSpotShadowColor
outlineAmbientShadowColor
padding
paddingHorizontal
paddingVertical
paddingBottom
paddingLeft
paddingRight
paddingTop
paddingStart
paddingEnd
saveEnabled
rotation
rotationX
rotationY
scaleX
scaleY
scrollX
scrollY
scrollbarSize
scrollbarStyle
scrollbars
scrollbarDefaultDelayBeforeFade
scrollbarFadeDuration
scrollbarTrackHorizontal
scrollbarThumbHorizontal
scrollbarThumbVertical
scrollbarTrackVertical
scrollbarAlwaysDrawHorizontalTrack
scrollbarAlwaysDrawVerticalTrack
stateListAnimator
transitionName
soundEffectsEnabled
tag
textAlignment
textDirection
transformPivotX
transformPivotY
translationX
translationY
translationZ
visibility
theme
id
alpha
background
clickable
contentDescription
drawingCacheQuality
duplicateParentState
requiresFadingEdge
fadeScrollbars
fadingEdgeLength
filterTouchesWhenObscured
fitsSystemWindows
isScrollContainer
focusable
focusableInTouchMode
focusedByDefault
hapticFeedbackEnabled
keepScreenOn
keyboardNavigationCluster
layerType
layoutDirection
longClickable
minHeight
minWidth
nextClusterForward
nextFocusDown
nextFocusLeft
nextFocusRight
nextFocusUp
onClick
outlineSpotShadowColor
outlineAmbientShadowColor
padding
paddingHorizontal
paddingVertical
paddingBottom
paddingLeft
paddingRight
paddingTop
paddingStart
paddingEnd
saveEnabled
rotation
rotationX
rotationY
scaleX
scaleY
scrollX
scrollY
scrollbarSize
scrollbarStyle
scrollbars
scrollbarDefaultDelayBeforeFade
scrollbarFadeDuration
scrollbarTrackHorizontal
scrollbarThumbHorizontal
scrollbarThumbVertical
scrollbarTrackVertical
scrollbarAlwaysDrawHorizontalTrack
scrollbarAlwaysDrawVerticalTrack
stateListAnimator
transitionName
soundEffectsEnabled
tag
textAlignment
textDirection
transformPivotX
transformPivotY
translationX
translationY
translationZ
visibility
theme
lb...@gmail.com <lb...@gmail.com> #10
This is the "wrong" order as I've written in the description:
paddingLeft
paddingRight
paddingTop
paddingStart
paddingEnd
Reason is that left and start go together, as they are usually the same thing, just as right&end.
paddingLeft
paddingRight
paddingTop
paddingStart
paddingEnd
Reason is that left and start go together, as they are usually the same thing, just as right&end.
tn...@google.com <tn...@google.com> #11
style should be up front next to id.
tn...@google.com <tn...@google.com> #12
Also, I hope you don't have to add the full list of View attributes to a sort list.
That's going to look weird for layouts when you're using some widget *other* than view; typically these subclasses will add additional attributes; in that case you'd end up with those attributes outside the view alphabetical list which might be weird.
I think the general sorting algorithm should be
- id
- style
- layout parameters, semi-alphabetical
- non-layout parameters, semi-alphabetical
Semi-alphabetical here means "alphabetical, but using logical directions/orientations", e.g. you'd sort "<prefix>Top<suffix>" after "<prefix>Bottom</suffix>" etc. That's much easier to do with a Comparator than if you have to provide a list of attribute names to the IDE XML arranger.
That's going to look weird for layouts when you're using some widget *other* than view; typically these subclasses will add additional attributes; in that case you'd end up with those attributes outside the view alphabetical list which might be weird.
I think the general sorting algorithm should be
- id
- style
- layout parameters, semi-alphabetical
- non-layout parameters, semi-alphabetical
Semi-alphabetical here means "alphabetical, but using logical directions/orientations", e.g. you'd sort "<prefix>Top<suffix>" after "<prefix>Bottom</suffix>" etc. That's much easier to do with a Comparator than if you have to provide a list of attribute names to the IDE XML arranger.
dr...@gmail.com <dr...@gmail.com> #13
B.T.W, I have created a open source plugin to handle the sorting. It fits all Android Studio versions and if you are interested you can have a try:
LayoutFormatter
https://github.com/drakeet/LayoutFormatter
A formatter for your Android layout XML files. More powerful, and easier to use.
LayoutFormatter
A formatter for your Android layout XML files. More powerful, and easier to use.
Description
layout_toEndOf
layout_toLeftOf
layout_toRightOf
layout_toStartOf
It's bad order, because "layout_toEndOf" should most of the times be the same as "layout_toRightOf", and "layout_toStartOf" should most of the times be the same as "layout_toLeftOf" .
What I request is that the order will be as such:
layout_toLeftOf
layout_toStartOf
layout_toRightOf
layout_toEndOf