Rightpoint / Raizlabs-Android-Style

The Raizlabs Android Style Guide
38 stars 3 forks source link

Vote: Layout vs Include #6

Closed agrosner closed 9 years ago

agrosner commented 9 years ago

When creating a layout we intend to import elsewhere (typically via an <include />) , this is to decide whether to choose: @markpragma @Lackofa7742 @dylanrjames @Mervyn-Raizlabs

  1. layout_{name}
  2. include_{name}

so for a FloatingActionButton:

  1. layout_fab -> <include layout="@layout/layout_fab"/>
  2. include_fab -> <include layout="@layout/include_fab"/>

Context: https://github.com/Raizlabs/Raizlabs-Android-Style/pull/3#discussion_r28014267

agrosner commented 9 years ago

2

orionthewake commented 9 years ago

2

dylanrjames commented 9 years ago

I don't really like either, but prefer 1

agrosner commented 9 years ago

@dylanrjames I feel layout is just too generic. include signifies that its meant to be included somewhere else.

Mervyn-Raizlabs commented 9 years ago

I prefer 1, a layout sounds generic but thats what its meant to be. We can choose to include them or use as is. Maybe prefix with sublayout or module?

Lackofa7742 commented 9 years ago

We don't do layout right now. Currently for a layout that gets imported, we call it view

Mervyn-Raizlabs commented 9 years ago

even i like view better than layout/include

agrosner commented 9 years ago

@Mervyn-Raizlabs @markpragma @Lackofa7742 @dylanrjames Its a tie at layout and include. @Lackofa7742 you've go the deciding vote.

dylanrjames commented 9 years ago

@Lackofa7742 No, view corresponds to custom views. We've always used layout. Currently in projects we're using no prefix at all or hodgepodges.

We can't use view because it conflicts. See the context link.

Lackofa7742 commented 9 years ago

Got it. in that case, I like 1

dylanrjames commented 9 years ago

Seems like we have 3 that don't like either. I could get behind sublayout like Mervyn mentioned if anyone else has strong feelings for it. Anyone feel strongly or have other suggestions?

If this stays as is by the end of the day I'll change it to layout since it's the current winner.

agrosner commented 9 years ago

layout it is.